Isaac Connor
f4d77116ea
Add SetVideoWriterStartTime(starting_packet->timestamp);. We use shared->data->recording.tv_sec etc... but since we don't set it, it is always 0.
2022-08-16 16:37:45 -04:00
Isaac Connor
82b71d5b12
Don't update notes from this frame on continuous recording. Fixes #3550
2022-08-16 16:32:33 -04:00
Isaac Connor
aa030afcb6
Make checkCommandQueue it's own thread, meaning we use blocking I/O and will still respond when it takes forever to send a jpeg. Make warning about broken stream into a Debug. The signal doesn't set zm_terminate fast enough.
2022-08-15 17:58:56 -04:00
Isaac Connor
82ff0c1082
Merge pull request #3574 from peat-psuwit/for-upstream/zmdb-thread-init
...
db: start the processing thread after all fields are initialized
2022-08-13 16:02:14 -04:00
Isaac Connor
1cf0245aca
Don't set AVFMT_TS_NONSTRICT. Crashes on ffmpeg 5. Fixes #3497
2022-08-12 18:21:58 -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
cec9e32a79
Use new packetqueue.stopping() to not wait when the packetqueue is stopping
2022-08-11 15:23:49 -04:00
Isaac Connor
1f9746e6c0
Add bool stopping() to packetqueue.
2022-08-11 15:10:49 -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
d1222d2fa7
Merge pull request #3572 from jp-bennett/master
...
Adds Janus Restream and Profile Override
2022-08-09 18:15:39 -04:00
Isaac Connor
165ccf5820
Merge branch 'master' of github.com:ZoneMinder/zoneminder
2022-08-09 15:48:06 -04:00
Isaac Connor
3034636501
Provide support for libaom-av1
2022-08-09 15:47:39 -04:00
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
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
Ratchanan Srirattanamet
d0a7b51283
db: start the processing thread after all fields are initialized
...
Initializing `zmDbQueue::mThread` with initializer list makes the thread
start in the middle of object initialization. This means `zmDbQueue::
process()` could start and reach mCondition.wait(lock); before `std::
wait_condition`'s constructor, which causes deadlock.
To make sure thread won't start before object initialize, move
`mThread`'s initialization to constructor's body.
This _at last_ solves the random zmu deadlock issue that has plagued my
setup for almost a year.
2022-08-08 03:13:08 +07:00
Isaac Connor
cad80eb37d
Revert "Fix memleak due to not deleting okpt in VideoStore destructor"
...
This reverts commit 896a05c65d .
2022-08-06 09:54:23 -04:00
Isaac Connor
896a05c65d
Fix memleak due to not deleting okpt in VideoStore destructor
2022-08-06 09:47:25 -04:00
ovargasp
a0f6ba1455
Modify zmu
...
Adds option to get monitor triggered status.
2022-08-04 20:31:12 -06: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
c40cedc15c
Simply code about zm_terminate, replace fixed 60 second max sleep time with ZM_WATCH_MAX_DELAY
2022-08-02 20:45:45 -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
baf65819cb
add notify_all functions
2022-08-02 20:43:20 -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
Isaac Connor
30271283ba
Make CMD_LIST available to specific monitors as well as all monitors.
2022-08-02 14:19:57 -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
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
acbdf1854d
Add guard to handle resetting AVPacket after use.
...
Also handle allocation failures.
2022-07-29 14:56:38 -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
7f192c4e47
Merge pull request #3551 from dougnazar/fix_crash
...
Fix zmc Segfault on 1.36.20
2022-07-28 16:28:32 -04:00
Isaac Connor
33943acbc4
Code style, spacing. Move check for trailing slash into the if specified janus_path part
2022-07-28 16:27:28 -04:00
Isaac Connor
f463246e43
Log reorder_queue_size
2022-07-28 15:46:01 -04:00
Isaac Connor
5cb5132bf7
Fix crash due to double delete of Janus_Manager
2022-07-28 15:26:32 -04:00
Isaac Connor
b2bcd9bc25
Merge pull request #3545 from dougnazar/misc_fixes
...
Misc fixes
2022-07-27 12:42:44 -04:00
Doug Nazar
590697bd80
Add padding to shared_data to re-align fields on 32bit
2022-07-27 12:25:47 -04:00
Isaac Connor
bd304ecbec
include ffmpeg.h. Fixes #3539
2022-07-26 19:09:16 -04:00
Isaac Connor
8a8a5fd5c0
rename Onvif_Alarm_Txt to ONVIF_Alarm_Text
2022-07-23 16:09:01 -04:00
Doug Nazar
c030416500
Fix truncation warning.
2022-07-22 19:52:09 -04:00
Doug Nazar
3b69a51ff8
Try to fix warning again that printf might exceed buffer.
...
The last fix worked on GCC 11 & 12 but broke GCC 8.
2022-07-22 12:00:42 -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
5b44ee729d
Fix sendfile calling convention taking into account possible null offset parameter.
2022-07-16 10:05:46 +00:00
Doug Nazar
df414fc028
Need to cast duration to system_clock resolution.
2022-07-16 10:03:54 +00:00
Doug Nazar
3c5e44dfe5
Need unistd.h for getpid().
2022-07-16 10:03:16 +00:00