Commit Graph

1188 Commits

Author SHA1 Message Date
Jonathan Bennett
d41792ae00 Adds Janus options Profile-ID Override and Use RTSP Restream to work around camera issues 2022-08-09 00:54:41 -05:00
Isaac Connor
6e5b9b56ed Only load linked monitors if doing capture 2022-08-03 11:55:44 -04:00
Isaac Connor
b40423d720 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2022-08-02 20:57:48 -04:00
Isaac Connor
89631a8531 Fix spelling 2022-08-02 20:47:07 -04:00
Isaac Connor
a03189046e Rename zmc_heartbeat_time to heartbeat_time. Set it during waiting for prime and capturing. 2022-08-02 17:54:27 -04:00
Doug Nazar
f4dd897ef4 Convert AVFrame* to custom unique_ptr (av_frame_ptr).
Switch all owning AVFrame* variables to av_frame_ptr for
automatic cleanup.

Use AVBufferRef to store frame data in AVFrame where appropriate
so that it can be freed automatically with it's AVFrame.

Handle allocation errors.
2022-07-30 13:21:11 -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
5cb5132bf7 Fix crash due to double delete of Janus_Manager 2022-07-28 15:26:32 -04:00
Isaac Connor
8a8a5fd5c0 rename Onvif_Alarm_Txt to ONVIF_Alarm_Text 2022-07-23 16:09:01 -04:00
Isaac Connor
95530a4f7d Merge pull request #3529 from dougnazar/fix_printf_formats
Fix printf formats & enable large file support for 32-bit
2022-07-20 11:44:26 -07:00
ovargasp
981769b9db Allows users to set an specific "Onvif alarm text" for each monitor (#3535)
* Allows users to set an specific "Onvif alarm text" for each monitor

With this personalization the cameras that use strings different to "MotionAlarm"
such as Dahua, will be able to process their Onvif alarms. To make it easier, the change
sets a default "Alarm Text"  value for it to work out of the box and then allows to
modify it according to the particular necessities of each brand. It consists of
a new column on table Monitors, changes on Monitors.h, Monitors.cpp and a change
on UI to manage the value of Alarm Text per camera.

Updated es_la.php language file.

Co-authored-by: ovargasp <ovargasp@hoitmail.com>
2022-07-20 12:51:13 -05:00
Doug Nazar
3b21153757 Fix various printf formats for 32bit, 32bit w/_FILE_OFFSET_BITS=64 and 64-bit 2022-07-16 03:18:18 -04:00
Isaac Connor
e4bd2d351a Merge branch 'master' into monitorlink_expressions 2022-07-14 14:42:56 -04:00
Isaac Connor
43649e1e36 Don't need to test for event 2022-07-14 10:25:19 -04:00
Isaac Connor
cc7c8376dd Rough in a MonitorLink_Expression object 2022-06-29 09:48:10 -04:00
Isaac Connor
8c121127ad fix lined monitor zone parsing 2022-06-26 22:10:51 -04:00
Isaac Connor
f78fb772ae Remove debug and dead code 2022-06-23 14:31:21 -04:00
Isaac Connor
aeca49d427 Stop the packetque first before stopping threads that may be in it. Only call clearPackets for video packets 2022-06-17 17:24:14 -04:00
Isaac Connor
3d9e8ae83c Add extra debug to figure out hangs on close 2022-06-17 16:31:33 -04:00
Isaac Connor
83683a5f8c Always free alarm_image.HoldBuffer. Fixes crashes in rtsp_server. Remove some debug 2022-06-17 10:36:49 -04:00
Isaac Connor
a2b4e39ddc replace USE_Y_CHANNEL with monitor::analysis_image setting. 2022-06-15 11:33:44 -04:00
Isaac Connor
f0a12a53d0 move loading and unloading of zones and linked monitors into connect/disconnect because sinze zones cache the monitor object, the destructor never gets called. Also merge Blending of ref_image to motion detection code to reduce redundant if's and remove one unnecessary blend 2022-06-08 23:30:09 -04:00
Isaac Connor
98ef850b5e Only parse and load LinkedMonitors if doing Capture. 2022-06-07 20:51:58 -04:00
Isaac Connor
07e32025df Just store the linked_monitors string instead of parsing and loading of related objects. Only call ReloadLinkedMonitors if doing analysis. Convert zone id's to unsigned 2022-06-07 18:36:25 -04:00
Isaac Connor
31f172409d Add a bunch of debug. Fix populating zone_scores. Redo ReloadLinkedMonitors using objects intead of ids. Add storing zone score in zone_scores 2022-06-07 18:14:31 -04:00
Isaac Connor
bf9e8f3b63 Add check for wrong zone count. Switch order to put zone scores after triggerdata because monitorlink doesn't load videostoredata 2022-06-07 12:18:42 -04:00
Isaac Connor
5cd2af4851 revert due to crashing 2022-06-07 11:49:52 -04:00
Isaac Connor
fe3f30c538 Add pointer to zone scores 2022-06-07 11:36:21 -04:00
Isaac Connor
9f4008879f Handle monitor_id:zone_id formatting in LinkedMonitors. Load ZoneCount when loading a monitor. 2022-06-07 09:43:43 -04:00
Isaac Connor
8788627d20 Fix endlessly auto-resuming 2022-05-30 15:44:48 -04:00
Isaac Connor
2410843851 Use now() instead of packet timestamp for last_write_time. This prevents zmwatch from restarting the monitor just because it is falling behind. Add a warning about decoding falling behind 2022-05-18 12:00:56 -04:00
Isaac Connor
039c318a19 Fix warning about missing initializers 2022-05-13 16:40:56 -04:00
Isaac Connor
ef05e8d5c2 Wake up everyone waiting in packetqueue before joining the event thread so that we don't lock 2022-05-12 11:02:36 -04:00
Isaac Connor
08cae161f6 Add debugging to help figure out misordered of packets on event creation 2022-05-10 20:22:57 -04:00
Isaac Connor
997c1197cf Implement decoding=Keyframes + OnDemand 2022-05-10 14:25:34 -04:00
Isaac Connor
27ba6a8159 Shorten the time we hold the event lock when closing the event 2022-05-05 09:06:44 -04:00
Isaac Connor
9779ab1830 Fix lockup on logrot by not releasing the event lock 2022-05-02 09:55:51 -04:00
Isaac Connor
133500fc7a Add a notify_all before waiting in case decoder is waiting in packetqueue 2022-04-28 16:41:36 -04:00
Isaac Connor
a0a7c5c5a5 INF logging of alarm frames in alert state should be debug 2022-04-28 16:18:37 -04:00
Isaac Connor
6f967f7a0b Simplify openEvent. Move packetqeue clearing below event closing as packets might be in use 2022-04-28 10:36:06 -04:00
Isaac Connor
a047cedd47 Initialize Poll_Trigger_State(false),
+  Event_Poller_Healthy(false),
2022-04-20 09:10:46 -04:00
Isaac Connor
f8366864b5 Remove dead code 2022-04-18 18:05:32 -04:00
Isaac Connor
9235b696ed Add index of packet that we have seen before 2022-04-04 16:26:52 -04:00
Isaac Connor
166ed2631f reference shared_data->recording instead of recording. Fix recording changing to ONMOTION due to use of = instead of == in an if 2022-04-03 16:53:14 -04:00
Isaac Connor
9cb59aced9 Fix last_write_index not incrementing hence live view broken 2022-04-01 12:40:59 -04:00
Isaac Connor
ed0f244c70 Don't use packet->index to calculate index into shmem. If we are skipping the increase might not be monotonic 2022-03-29 17:19:31 -04:00
Isaac Connor
39d45e527c Switch from DecodingEnabled to DecodingOption. Implement the logic in ::Decode. 2022-03-28 17:44:44 -04:00
Isaac Connor
75833abbe7 Move convertContext code to it's own function for readability. Use it to clean up code in Decode 2022-03-26 20:32:05 -04:00
Isaac Connor
9f404f7b97 Add test for event before calling event->Duration. 2022-03-26 12:47:26 -04:00
Isaac Connor
1c9c3d34f5 Free up raw images early when not recording also. Also free up decoded frame ram 2022-03-25 13:50:12 -04:00