Isaac Connor
5fc52ae6df
Handle iterator pointing to end
2021-01-30 20:34:09 -05:00
Isaac Connor
be893fe9e4
Since we loop in here, need to lock the packetqueue
2021-01-27 11:48:32 -05:00
Isaac Connor
e73e6aaabc
check for terminating before locking packetqueue. Handle when pre_event_count==0
2021-01-26 12:23:44 -05:00
Isaac Connor
a0df09dcaa
Have to check for lock on video keyframe as well
2021-01-25 12:07:56 -05:00
Isaac Connor
66c78e5a9b
Merge branch 'zma_to_thread' into rtsp_server
2021-01-19 13:43:25 -05:00
Isaac Connor
b1b72ec85b
Improve debugging. Add parenthesis to fix test for end. I think the * dereference is not being applied at the right time.
2021-01-19 09:46:08 -05:00
Isaac Connor
f44f920bf2
spacing
2021-01-14 10:31:29 -05:00
Isaac Connor
3423d8ed05
Only delete packets up to the next video keyframe. Don't be too aggressive
2021-01-12 14:13:12 -05:00
Isaac Connor
e706b4ba33
Hitting beginning of queue can happen on stream startup. So in that case make it a debug. Once the stream has been going for a while there should always be enough packets in the queue so make it a warning
2021-01-11 17:18:14 -05:00
Isaac Connor
ebe3a9b6a7
Must notify before waiting in destructor. Fix leaks
2021-01-11 13:46:50 -05:00
Isaac Connor
514e0d2e93
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-11 13:46:50 -05:00
Isaac Connor
c70e2ccfc2
Must notify before waiting in destructor. Fix leaks
2021-01-07 15:12:44 -05:00
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