Commit Graph

70 Commits

Author SHA1 Message Date
Isaac Connor abc402878b remove analysis_it and correctly manage external iterators. Fix testing for ability to remove packets from packetqueue. Fix some cases where the order of testing zm_terminate and packet locking is important 2021-01-07 09:43:53 -05:00
Isaac Connor 284b9f963f Merge branch 'master' into zma_to_thread 2020-12-29 12:18:26 -05:00
Isaac Connor 9be7547c8b Look at stream index instead of image_index when finding first keyframe in packetqueue 2020-12-27 12:32:46 -05:00
Isaac Connor 16662f79ce spacing and code stylez 2020-12-27 12:03:44 -05:00
Isaac Connor a1917d83d0 Merge branch 'master' into zma_to_thread 2020-12-22 19:52:09 -05:00
Isaac Connor 91057b9546 Clean up video_packet_count stuff. use packet_counts instead. Use more efficient logic for managing the # of video packets on the queue. Rewrite clearQueue to not use reverse iterators. Implement get_starting_packet to return an iterator to the packet that SHOULD start an event. So it takes into account pre_event_count and keyframe rules. 2020-12-22 10:20:44 -05:00
Isaac Connor a502a86b00 Instead of pointing analsysis_it to begin, point it to the end, which is the newly pushed packet. Add back queue clearing 2020-12-15 16:01:18 -05:00
Isaac Connor 99e7ae3505 Merge branch 'master' into rtsp_server 2020-12-15 10:14:19 -05:00
Isaac Connor f544c18541 add debug testing 2020-12-12 18:53:12 -05:00
Isaac Connor f54b8fff44 use mutex and condition_variable to manage signalling. Lots of debugging and fixes 2020-12-09 15:01:24 -05:00
Isaac Connor a39a656373 Merge branch 'master' into zma_to_thread 2020-09-29 11:02:40 -04:00
Isaac Connor e163a3c93a spacing more debug 2020-09-25 16:20:19 -04:00
Peter Keresztes Schmidt 8f980a1168 Convert NULL/0 to nullptr
The 0 -> nullptr changes should definitely improve readability.
2020-08-26 22:03:40 +02:00
Isaac Connor 3641797500 Merge branch 'master' into zma_to_thread 2020-07-22 13:14:40 -04:00
Isaac Connor 4ff341a0f5 Merge branch 'master' into zma_to_thread 2020-05-02 18:03:42 -04:00
Isaac Connor 0947c3ef24 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2019-11-30 15:37:09 -05:00
Isaac Connor 927165a934 debug the recording_started timestamp and warning when we can't fine a frame before the requested time 2019-11-30 15:37:05 -05:00
Isaac Connor 09fcbad666 Merge branch 'master' into zma_to_thread 2019-11-30 14:59:39 -05:00
Selva Nair 2e7fad68d1 Properly compute video buffer length when analysis fps is set
Currently the number of video frames kept in the buffer is set as the
pre_event_count. This falls short when the capture fps is larger
than the analysis fps. Fix by computing the retained video duration
as pre_event_count/analysis_fps

No change if analysis fps is not set.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2019-11-15 21:55:40 -05:00
Isaac Connor 6a56de41f0 fix parameter order 2019-10-18 13:39:52 -04:00
Isaac Connor 3b586a2abe include stream index and packet queue size in debug message 2019-10-11 13:53:18 -04:00
Isaac Connor 396be10d6f Merge branch 'master' into zma_to_thread 2019-08-22 12:57:00 -04:00
Isaac Connor 0ab4f9fce0 More debugging in packetqueue. 2019-06-27 21:49:43 -04:00
Isaac Connor ac7d4869de We need to seek back pre_event_count video frames, not any frames 2019-06-27 15:36:13 -04:00
Isaac Connor dd57fd95ce Clean up cruft from videostore api. Fix packetqueue clear_unwanted_packets to take a pre_event_count and take it into consideration when finding the right spot in the queue to start recording. 2019-06-27 11:11:14 -04:00
Isaac Connor dab9544845
Revert audio sync fixes (#2646)
* Reference /run/zm instead of /var/run/zm because systemd-tmpfiles complains about it

* Spacing, google code style and tabs to spaces

* Revert the work I did to srt packets by dts after changing their time_base.  It doesn't work.  Instead since dts doesn't actually matter to playback, only ffmpeg storing, munge it to whatever is neccessary to make ffmpeg happy.
2019-06-24 11:27:47 -04:00
Isaac Connor 470da03322 Merge sync fixes from storageareas 2019-06-20 15:14:20 -04:00
Isaac Connor acb95709e6 Fix issues with too much audio in events by storing packets in the queue with their timestamps converted to AV_TIME_BASE_Q, so that we can sort video and audio packets together. 2019-06-11 10:19:42 -04:00
Isaac Connor c44967f770 fix push to push_front 2019-05-27 12:47:38 -04:00
Isaac Connor 663f941963 If we can't find a packet before ours in the queue, then stick it at the front of the queue, not the end. 2019-05-27 12:31:18 -04:00
Isaac Connor c91da4a7f5 if no packet found, still append to end 2019-05-03 14:58:29 -04:00
Isaac Connor aec8311deb implement sorting incoming packets in the packetqueue 2019-05-03 13:48:05 -04:00
Isaac Connor 077ad75516 Merge branch 'storageareas' into origin/zma_to_thread 2019-04-25 12:41:48 -04:00
Isaac Connor 240abd824b Don't use image_index anymore 2019-02-26 09:45:40 -05:00
Isaac Connor 448294f593 wip 2019-02-25 10:21:43 -05:00
Isaac Connor 7d6286d517 Merge branch 'storageareas' into zma_to_thread 2019-02-18 16:23:17 -05:00
Isaac Connor 87d1390fed Merge branch 'storageareas' into h265 2019-01-16 15:20:17 -05:00
Isaac Connor 84c812725e spacing, improve debug. WHen looking for starting keyframe in packetqueue, use <= instead of <. 2019-01-14 14:00:45 -05:00
Isaac Connor b16cd7ec84 Merge branch 'h265' into zma_to_thread 2018-11-20 12:38:17 -05:00
Isaac Connor 5ab1126260 Merge branch 'storageareas' into zma_to_thread 2018-10-20 17:31:14 -04:00
Isaac Connor 33c903a644 properly initialize packet_counts 2018-10-15 11:13:10 -04:00
Isaac Connor 45a1a1b1e8 Make packetqueue keep track of audio vs video packet counts. 2018-10-15 10:51:56 -04:00
Isaac Connor 0ec391354c Merge branch 'fix_zms_from_mp4' into h265 2018-09-13 16:18:28 -04:00
Isaac Connor cd6dd28280 Merge branch 'zma_to_thread' of github.com:connortechnology/ZoneMinder into zma_to_thread 2018-08-17 16:15:30 -04:00
Isaac Connor abb6d4f7d9 fixup some logic, remove redundant call to clearQueue, increase first_video_packet_index when clearing video frames from front in queuePacket 2018-08-17 16:06:03 -04:00
Isaac Connor 59b0160144 use ++it instead of it++ 2018-08-13 10:01:16 -04:00
Isaac Connor 0428d8687d put the ++ in front instead 2018-04-14 17:04:00 -04:00
Isaac Connor 8518278476 coverity scan fixes/cleanups 2018-04-12 11:29:35 -04:00
Isaac Connor a419906361 Merge branch 'storageareas' into zma_to_thread 2018-03-09 09:03:19 -05:00
Isaac Connor 10a30452fb fix logic when clearing queue, we were deleting packets endlessly. 2018-02-15 14:08:21 -05:00