Dmitry Tsarevich
4965fd09a6
Log pipe size mutate / access errors
...
See `set pipe size failed` in Logs, but hard to guess why.
Now should be able to debug pipe size issues.
2024-01-26 05:07:05 +03: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
004e4415d3
Pass filename by reference for performance
2022-07-14 09:59:09 -04:00
Isaac Connor
44d88edbbb
Fix some build warnings on arm
2021-11-09 17:01:13 -05:00
Peter Keresztes Schmidt
80b08a2075
Convert path buffers depending on PATH_MAX to std::string
2021-07-06 10:33:17 +02:00
Isaac Connor
3cd9bdccd5
style and performance improvements reported by cppcheck
2021-05-09 16:39:38 -04:00
Isaac Connor
b0b95b57f8
packet can be const
2021-04-20 13:59:54 -04:00
Isaac Connor
320dfff5b2
Remove unused non blocking case
2021-04-20 13:59:07 -04:00
Isaac Connor
4f71538334
Remove the unused non_blocking code
2021-04-20 12:58:55 -04:00
Isaac Connor
d84e4a14fb
Use a define when setting pipe size
2021-03-22 17:49:59 -04:00
Isaac Connor
8a1d13b6cd
perror => Error()
2021-03-21 09:17:03 -04:00
Isaac Connor
6ab8bee581
Increase debug level for fifo writing
2021-03-17 12:48:59 -04:00
Peter Keresztes Schmidt
32f8bc8e31
Fifo: Fix a crash on shutdown
...
outfile can be undefined if the fifo couldn't be opened correctly.
Only try to close outfile on shutdown when it is valid.
2021-03-06 23:39:59 +01:00
Peter Keresztes Schmidt
d9568a98c0
Drop zm_thread which has been replaced by STL implementations
2021-03-04 10:55:46 +01:00
Peter Keresztes Schmidt
a78236d05c
Fifo: Fix some missing c_str()s for formatting logs
2021-03-03 23:31:53 +01:00
Peter Keresztes Schmidt
1dfa41923b
Fifo: F_{G,S}ETPIPE_SZ is Linux specific
2021-03-03 23:31:53 +01:00
Isaac Connor
3dc4bf265e
Use braces
2021-03-02 10:15:21 -05:00
Isaac Connor
205ed4c510
EAGAIN happens when no one is listening. Make it a debug
2021-03-02 10:14:25 -05:00
Isaac Connor
b09fe1d17c
Create fifo if it doesn't exist already
2021-03-01 16:49:27 -05:00
Isaac Connor
1d73087e5b
Split zm_fifo up into zm_fifo, zm_fifo_debug and zm_fifo_stream. Implement a Fifo class to keep the filehandle open.
2021-03-01 16:47:18 -05:00
Isaac Connor
78062a03ef
Add writePacket and write static function to write h264 packet stream and audio stream to a fifo for the zm_rtsp_server to read from
2021-03-01 16:46:48 -05:00
Peter Keresztes Schmidt
f43507dce0
Use the power of smart pointers to manage Monitor instances
2021-02-07 21:20:45 +01:00
Peter Keresztes Schmidt
0dbc39ee25
Cleanup and reorganize includes
...
With this commit a unified structure for includes is introduced.
The general rules:
* Only include what you need
* Include wherever possible in the cpp and forward-declare in the header
The includes are sorted in a local to global fashion. This means for the include order:
0. If cpp file: The corresponding h file and an empty line
1. Includes from the project sorted alphabetically
2. System/library includes sorted alphabetically
3. Conditional includes
2021-02-04 18:02:01 +01:00
Peter Keresztes Schmidt
5a57efdfe2
Replace deprecated C header includes with the C++ ones.
2021-02-04 05:39:03 +01:00
Isaac Connor
e0a30ab5e0
Only log an error if we haven't been given sigpipe.
2020-11-22 17:28:53 -05:00
Isaac Connor
660636c0e2
loop if we get egain when flocking. Warn when format not specified.
2020-11-22 16:54:42 -05:00
Isaac Connor
65d4c43cc2
Use BOUNDARY instead of ZoneMinderFrame. If we get EAGAIN when flocking, try again.
2020-11-20 16:29:10 -05:00
Isaac Connor
d2a203014f
rename diagpipe-r so that we don't have to create directories in SOCKS_DIR
2020-11-13 17:05:03 -05:00
Isaac Connor
de74a15ab1
Move diag_fifo pipes in SOCKS_DIR instead of assigned Storage area. Storage areas could be a fs that cannot handle sockets or fifos like NFS.
2020-11-12 11:53:51 -05: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
6a87ae0fa7
fix compile warning by copying two bytes, which will grab the \0 after the \n
2019-06-27 10:24:51 -04:00
Isaac Connor
763fe16a04
Google code style, merge some fprintf's
2019-06-27 10:20:23 -04:00
Mitch Capper
eb005e8b9c
FIFO support for zoneminder zone debugging ( #2594 )
...
Adds fifo options for diagnostic images for much lower impact diagnostics mode. Diagnostic images are only written when there is a client listening for them (otherwise they are skipped). Also added a json stream for the detection data so you can see in real time the pixels or blobs detected for the motion. This allows for easy real time stream of both delta and reference images (as video streams) along with the detection numbers.
2019-05-16 15:37:03 -04:00