Commit Graph

5807 Commits

Author SHA1 Message Date
Isaac Connor
e7d4fa334d Initialize lastPTS and only set lastAudioPTS if the stream is audio. 2024-09-25 10:53:47 -04:00
Isaac Connor
07d221569d Let higher ups deal with non-video non-audio packets. Might fix a memleak 2024-09-24 19:30:30 -04:00
Isaac Connor
37fef75eff Handle 0 frame_mod 2024-09-24 17:23:23 -04:00
Isaac Connor
4af6e6eee0 Do not output anything to stdout when logging is happening when the db is closed. 2024-09-23 11:43:55 -04:00
Isaac Connor
312a15801e Using last_delta really doesn't work. Instead let's use remaining time/remaining frames. 2024-09-20 18:54:54 -04:00
Isaac Connor
331390ea20 Move Poller_Healthy and Trigger state into Amcrest_API and ONVIF modules. Add lastTopic and lastValue to onvif. Add values to event notes. Reverse logic for event ending to look for false, as the value could be other things like isMotion or IsPeople. 2024-09-18 12:27:26 -04:00
Isaac Connor
7c8738e976 Correct log in debug statusment 2024-09-16 17:22:27 -04:00
Isaac Connor
e68fb77e4b Take frame_mod into account when calculating time to sleep. Fixes rate not really working. 2024-09-16 16:41:00 -04:00
Isaac Connor
1f1b5951f5 Handle when soap isn't defined 2024-09-16 13:46:35 -04:00
Isaac Connor
60adcd73e9 Add zm_monitor_onvif.cpp to CMakeLists.txt 2024-09-16 13:40:00 -04:00
Isaac Connor
9b9f0159ad Move onvif event listener code to zm_monitor_onvif.cpp. In the Poll thread, if listener is not healthy, restart it. Fixes #4099 2024-09-16 13:40:00 -04:00
Isaac Connor
0af441912f If an invalid port is specified, don't actually start the rtp threads. They don't get used in RTP/RTSP. Fixes #3759 2024-09-13 13:20:26 -04:00
Isaac Connor
e4543d8f33 CHange hasViewers to wait 10 seconds before returning false. 1 second seems to be too much. 2024-08-29 14:43:50 -04:00
Isaac Connor
1deccb8cf4 Instead of just exiting, set zm_terminate to true so we exit gracefully 2024-08-22 19:09:15 -04:00
Isaac Connor
c1ffd32f1e Fix cameras not appearing online because we aren't ever updating the Monitor_Status record 2024-08-21 18:08:31 -04:00
Isaac Connor
5379f2273b Only use fps_report_interval for logging and MQTT. Update the db entry every 10 seconds 2024-08-20 16:10:17 -04:00
Isaac Connor
05e91f852d Use wallclock timestamps when doing audio as well 2024-08-20 15:21:29 -04:00
Isaac Connor
6b44fda57f Don't need to delete packetqueue_it, as free_it does that. 2024-08-20 15:21:29 -04:00
Isaac Connor
d968e243ff Implement mode=single for events, so that we can efficiently just grab a single frame 2024-08-19 18:26:35 -04:00
Isaac Connor
251f66cb0b Merge branch 'master' of github.com:ZoneMinder/zoneminder 2024-08-14 13:23:43 -04:00
Isaac Connor
5237641efe Fix calculation for when to send a keepalive image. Possible fixes #4101 2024-08-13 16:38:14 -04:00
Isaac Connor
fcf9d41c29 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2024-08-07 16:32:32 -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
52d41fe3ce Sometimes the initial keyframe packet will have AV_NOPTS for pts and dts. When this happenes, set last_dts to -1 instead of 0, so that when the next packet comes in and sets the first_dts value, the resulting dts will be 0 which is > -1. 2024-08-02 13:24:39 -04:00
Isaac Connor
9aa5b65ffa Use packetqueue.unlock so that we wakeup event threads waiting on the packet. 2024-08-02 10:37:54 -04:00
Isaac Connor
912b1818b7 Use get_packet_no_wait and a sleep so that if told to close we give up on getting a packet 2024-08-01 18:01:28 -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
74f9deebfe Free starting_packet_lock earlier so theoretically event can grab it sooner 2024-07-30 13:14:32 -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
42b74d8ad4 Further separate wallclock timestamp logic from passthrough logic. Should fix negaitve timestamps 2024-07-29 10:17:59 -04:00
Isaac Connor
1ae223bfc1 Don't incremenet event it until we are done with the packet 2024-07-26 10:49:02 -04:00
Isaac Connor
ae34457031 Take importance into count when logging failure to read packet.
Clear reorder_queue_size from opts as it only applies to avformat
2024-07-24 12:07:56 -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
435bee1a84 Log actual return code value for ONVIF PullPointSubscription 2024-07-22 13:39:30 -04:00
Isaac Connor
76226ca69c When using wallclock timestamps, redo the calc and set video_first_dts 2024-07-19 14:44:51 -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
4adc6e2545 Make second segfault Fatal as Panic doesn't exit 2024-07-10 12:55:16 -04:00
Isaac Connor
0ee624933f Do not reorder packets if doing encoding as we use wallclock timestamps 2024-07-09 09:03:00 -04:00
Isaac Connor
578bf2335b Add const to PpopulateFrame 2024-07-09 08:22:56 -04:00
Isaac Connor
7665c63da0 Add datetime as a zms option 2024-07-09 08:14:15 -04:00
Isaac Connor
a993ddb584 POpulateFrame can be const 2024-07-09 08:13:16 -04:00
Isaac Connor
89b19d2439 Limit segfaults to 1 2024-07-08 08:53:44 -04:00
Isaac Connor
63a2ed4b06 Take Importance into accoutn when logging Unable to read from stream 2024-07-08 08:39:41 -04:00
Isaac Connor
53122eba85 Add WallClockTImestamps to actual SQL load 2024-07-06 17:51:38 -04:00
Isaac Connor
ca770b9cd7 If WallClockTimetsamps is set, use the wallclock timestamp in the ZMPacket to override ptd, dts in the packet. Please note that it gets converted to in_stream->timebase and then to out_stream time_base. 2024-07-06 17:21:20 -04:00
Isaac Connor
cbe0c7c9e2 Add loading wallclock setting from db and provide accessor function 2024-07-06 17:20:31 -04:00