Commit Graph

215 Commits

Author SHA1 Message Date
Isaac Connor
697db024e1 Add more debug 2024-11-28 19:24:22 -05:00
Isaac Connor
52c41d166b When deleting packets in queuePacket if it is a keyframe, then delete everything from the beginning, so that we don't get a huge time gap between the first packet and the next 2024-11-28 17:01:13 -05:00
Isaac Connor
dadd9e24df when counting keyframe interval in clearPackets start at 0. Reset max_keyframe_interval when clearing packetqueue. This prevents errors in log when using ondemand capture 2024-10-24 10:23:29 -04:00
Isaac Connor
8496ce637a When every frame is a keyframe, make max_keyframe_interval=1 instead of 0 as 0 is the uninitialised state 2024-10-24 10:11:31 -04:00
Isaac Connor
c294ad09ff Must obtain lock in free_it 2024-08-07 15:22:35 -04:00
Isaac Connor
5d67c452b9 Don't pass zm_packet by reference 2024-08-07 12:26:24 -04:00
Isaac Connor
930a0e8e8f Fix simplified tail counting 2024-08-07 12:26:24 -04:00
Isaac Connor
2779839c55 Simplify code that counts the distance from analysis it to pktqueue.end 2024-08-07 12:26:24 -04:00
Isaac Connor
79a8e96086 Add get_packet_no_wait for tasks that should not wait indefinitely 2024-08-01 18:00:42 -04:00
Isaac Connor
1b36941add Check for iterator pointing to first packet. This is a special case. 2024-07-29 16:11:31 -04:00
Isaac Connor
703520b727 Revert "Simplify code that counts the distance from analysis it to pktqueue.end"
This reverts commit 27fcad7d85.
2024-07-23 10:38:10 -04:00
Isaac Connor
27fcad7d85 Simplify code that counts the distance from analysis it to pktqueue.end 2024-07-19 14:44:29 -04:00
Isaac Connor
e8aaee4b21 Put back code that looks for iterators when cleaning packet queue. event thread can now have an iterator that follows analysis 2024-07-13 10:01:00 -04:00
Isaac Connor
13efaf4f83 Allow prev_dts==dts because it is really common and zm_videostore will correct it. 2024-06-14 18:34:33 -04:00
Aaron Kling
c4683d90a9 Format code using astyle google format
Commands used:
astyle --style=google --indent=spaces=2 --keep-one-line-blocks src/*.cpp
astyle --style=google --indent=spaces=2 --keep-one-line-blocks src/*.h
2024-03-26 13:43:58 -05:00
Isaac Connor
ef215b1427 Slight code improvements, mostly for readability 2024-01-08 13:06:03 -05:00
Isaac Connor
f07612c25f Only calculate keyframe interval using video stream 2023-12-06 12:25:30 -05:00
Isaac Connor
09081be010 Fix again the infinite loop in counting keyframes 2023-09-11 11:29:54 -04:00
Isaac Connor
1f4ed44371 Fix infinite loop looking for keyframe interval 2023-09-08 14:16:31 -04:00
Isaac Connor
5953b88085 Count keyframes on queuePacket so that analysis Ready() will start when out of order packets are present 2023-08-23 11:41:54 -04:00
Isaac Connor
ca513c0a74 Add deleting status to debug 2023-01-10 12:07:35 -05:00
Isaac Connor
d079439005 Merge branch 'reports' of http://github.com/ConnorTechnology/zoneminder into reports 2022-09-12 19:40:27 +02:00
Isaac Connor
f610cd5e1b Don't trust zm_packet->packet to not be null 2022-09-01 13:04:40 +02:00
Isaac Connor
8558ade8f1 Merge branch 'master' into misc_fixes 2022-08-25 18:33:06 -04:00
Isaac Connor
85795c30ee Remove warning about maxImageBuffer. It will be handled in queuePacket as it was before, only now we actually tell about the keyframe interval. It is entirely common to not get to another keyframe due to locked packets during event writing. 2022-08-19 13:33:22 -04:00
Isaac Connor
de3ffa72c8 set decoded=true and notify when deleting packets from queue. Analysing might be waiting on the packet. 2022-08-19 13:33:22 -04:00
Isaac Connor
765714d976 Keep track of max_keyframe_interval and log it when complaining 2022-08-19 13:33:22 -04:00
Isaac Connor
11846ed208 Don't need max_keyframe_interval. Whether our it is still pointing at the front is enough. Only log the warning if the packetqueue is full and we couldn't find another keyframe. 2022-08-19 13:33:22 -04:00
Isaac Connor
2922202355 Detect out of order packets 2022-08-19 13:33:22 -04:00
Isaac Connor
0fa41c4aae Fix warnings about keyframe interval and maximagebuffer count on jpeg streams. 2022-08-19 13:33:22 -04:00
Isaac Connor
7cfa529eb6 keyframe_interval gets reset so can give erroneous logs. Use a second variable to start the actual found keyframe interval. Use a const ref to prevent copying in notify_all 2022-08-19 13:33:22 -04:00
Isaac Connor
39afe4fd24 Remove warning about maxImageBuffer. It will be handled in queuePacket as it was before, only now we actually tell about the keyframe interval. It is entirely common to not get to another keyframe due to locked packets during event writing. 2022-08-12 11:05:23 -04:00
Isaac Connor
42d8be01ce set decoded=true and notify when deleting packets from queue. Analysing might be waiting on the packet. 2022-08-11 20:40:03 -04:00
Isaac Connor
cdc356f547 Keep track of max_keyframe_interval and log it when complaining 2022-08-11 13:23:13 -04:00
Isaac Connor
71986a815a Don't need max_keyframe_interval. Whether our it is still pointing at the front is enough. Only log the warning if the packetqueue is full and we couldn't find another keyframe. 2022-08-11 12:56:11 -04:00
Isaac Connor
1f978f0ac2 Detect out of order packets 2022-08-10 17:57:11 -04:00
Isaac Connor
3136f26e40 Fix warnings about keyframe interval and maximagebuffer count on jpeg streams. 2022-08-10 10:31:57 -04:00
Isaac Connor
eb9ccf41f2 keyframe_interval gets reset so can give erroneous logs. Use a second variable to start the actual found keyframe interval. Use a const ref to prevent copying in notify_all 2022-08-08 13:58:22 -04:00
Isaac Connor
b40423d720 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2022-08-02 20:57:48 -04:00
Isaac Connor
6f02096098 Notify all packets when doing packetqueue:stop so prevent deadlock when waiting for decode 2022-08-02 20:44:45 -04:00
Isaac Connor
a9cc417a8b Fix logic around warning about keyframe interval being larger than max image buffer count. 2022-08-02 13:02:12 -04:00
Doug Nazar
8d2c9c1fd7 Fix warning about Pre Event Image Count setting. 2022-07-30 22:32:48 -04:00
Doug Nazar
110cc436a3 Switch from av_init_packet() to av_packet_alloc()
Remove all uses of deprecated av_init_packet() and switch any stack
based AVPackets to unique_ptrs allocated with av_packet_alloc().

Ensure that all code paths call av_packet_unref() after use to reset
before next usage.
2022-07-29 14:56:26 -04:00
Isaac Connor
4d31089707 Only decremember warned_count if > 0. Fixes too much logging. Add warning about keyframe interval being > max image buffer setting. 2022-07-29 13:49:34 -04:00
Isaac Connor
576448e906 Fix memleak when not doing passthrough 2022-07-14 13:10:43 -04:00
Isaac Connor
64a9120ea7 packet_counts is always true here 2022-07-14 10:42:01 -04:00
Isaac Connor
a515c3a899 clean out the if0'd out reorder code 2022-06-17 17:25:08 -04:00
Isaac Connor
cfed17051b Fix ram leak due to logic inversion 2022-06-17 13:27:07 -04:00
Isaac Connor
4a6ef4e628 Reduce logging in clearPackets 2022-06-16 14:11:36 -04:00
Isaac Connor
ac763ac7f9 Fix a poorly worded debug 2022-06-08 16:45:56 -04:00