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
Isaac Connor
84993c6c02
Comment out debugging. This is fast path stuff and this code seems to work.
2022-05-30 10:22:53 -04:00
Isaac Connor
71a1e81dd7
Change has_warned to warned_count, so that we can stop excess locked packet warnings too
2022-05-25 09:50:52 -04:00
Isaac Connor
e9e9bf525c
Log keyframe interval seen when clearing queue.
2022-05-19 15:53:57 -04:00
Isaac Connor
7ec97403d2
Introduce packetqueue::stop which just sets the deleting flag and sends out a notify. The idea is to call it before clear().
2022-05-12 11:02:19 -04:00
Isaac Connor
0bbc6321d5
ifdef out the packet re-ordering code. It may be bogus.
2022-04-29 18:38:23 -04:00
Isaac Connor
9935e4011c
Remove check for pktQueue.size(). We know that there are packets in it
2022-04-28 16:43:31 -04:00
Isaac Connor
a80a8532f9
Use notify_all instead of notify_one. If the analysis thread wakes up first, can then wait on packet and decoder won't wake up until next capture
2022-04-28 16:41:51 -04:00
Isaac Connor
dbe8981378
Reduce warnings by setting has_warned = false in the correct spot. Add code comments
2022-04-28 10:36:06 -04:00
Isaac Connor
6c17bc36bc
Add check for deleting or terminating. Decrement packet counts in clear so that debugging makes more sense
2022-04-28 10:36:06 -04:00
Isaac Connor
55efd859c3
If deleting don't bother queuing
2022-04-07 13:11:56 -04:00
Isaac Connor
034dda5b6c
Only bump iterators if we are pushing onto the back of the queue. If we are re-ordering, can do nothing about the iterators. Show if iterator points to the packet in dumpQueue.
2022-04-04 16:27:43 -04:00
Isaac Connor
5a78a765d1
Add in re-ordering of packets based on dts.
2022-04-03 16:24:21 -04:00
Isaac Connor
bdffa10cc6
limit logging of full packetqueue
2022-03-27 13:14:40 -04:00
Isaac Connor
2768975f96
Only notify one. Anyone waiting is waiting on a lock and only 1 process can get that lock, so only one should try.
2022-02-08 10:12:29 -05:00
Isaac Connor
8c13aa7d3a
Cleanup LockedPacket, use RAII
2022-02-08 10:10:00 -05:00
Isaac Connor
8e689340ce
Don't need to check for end of queue as we already did that when adding packet to the queue
2022-02-08 10:06:32 -05:00
Isaac Connor
fe01af6966
Don't need to test for end() because we added our packet to the queue and still have the lock
2022-02-08 09:57:56 -05:00
Isaac Connor
4be9c6cdd2
Code comments and make warning when the first packet in queue is locked.
2021-11-24 12:42:31 -05:00
Isaac Connor
9d37fbcd8e
Fix some build warnings on arm
2021-11-12 15:11:48 -05:00
Isaac Connor
e1d49ea172
fix index -> image_index
2021-10-17 15:13:34 -04:00