Commit Graph

4466 Commits

Author SHA1 Message Date
Peter Keresztes Schmidt 11cfa86de3 Image: Fix Wtype-limits warnings in Annotate
line[c] is a char. There is no possibility for it to be larger than 0xff. Remove these checks.
2021-04-12 08:58:56 +02:00
Peter Keresztes Schmidt 7e1c580130 define: Add macro to annotate intended switch fallthroughs
Follow-up to 814953b331
It turns out [[gcc::fallthrough]] and -Wimplicit-fallthrough were only implemented in GCC 7 and throws a warning on older GCCs.
Add the FALLTHROUGH macro to handle GCC < 7 as found on Xenial.

Warning from GCC 5.5:
/home/runner/work/zoneminder/zoneminder/src/zm_remote_camera_http.cpp:624:13: warning: attributes at the beginning of statement are ignored [-Wattributes]
             [[gnu::fallthrough]];
2021-04-11 23:39:35 +02:00
Isaac Connor f077ec6145 Take first PTS into account when calculating last pts for figuring out which input to use. 2021-04-11 16:35:16 -04:00
Isaac Connor dab89622af Not having a video stream isn't actually bad. Change log to debug 2021-04-11 13:29:24 -04:00
Isaac Connor 594cebbcb1 Increase debugging level of input choice 2021-04-11 13:23:21 -04:00
Isaac Connor 939a0f40e6 Include image_count in debug line 2021-04-11 13:22:37 -04:00
Isaac Connor 4255f78602 Use monitor->Importance in passing severity of log message about failed to Prime Capture 2021-04-11 12:59:18 -04:00
Isaac Connor ed29021179 Rough in an importance setting in monitor that we can use to decrease the log level of certain events like PrimeCapture for cameras that we don't care about 2021-04-11 12:59:18 -04:00
Isaac Connor aadfa1e6e1 Remove warning on fail to Prime. zmc will log it 2021-04-11 12:59:18 -04:00
Isaac Connor d05f03eacd Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2021-04-11 12:45:07 -04:00
Isaac Connor 526b44b377 fix crash by using the correct FormatContext when dumping stream info 2021-04-11 12:44:59 -04:00
Peter Keresztes Schmidt 627f972fac LocalCamera: Fix Wformat warnings reported by Clang 2021-04-11 18:00:12 +02:00
Isaac Connor f50bfab0aa
Merge pull request #3212 from Carbenium/sdp-deprec
SessionDescriptor: Fix a ffmpeg deprecation warning
2021-04-11 11:53:18 -04:00
Peter Keresztes Schmidt 9f643ddd00 MonitorStream: Actually use the MAX_SLEEP_USEC variable meant for this class 2021-04-11 14:39:08 +02:00
Peter Keresztes Schmidt 2d062c1f99 Fifo+EventStream: Remove unused private fields 2021-04-11 14:26:37 +02:00
Peter Keresztes Schmidt c255e78b97 SessionDescriptor: Fix a ffmpeg deprecation warning
AVStream::codec is deprecated. The replacement AVStream::codecpar is initialized at the end of the method from the codec context.
2021-04-11 11:41:53 +02:00
Peter Keresztes Schmidt 0203e744a5 RtspThread: Fix a stack-buffer-overflow reported by ASAN
==8109==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fab9b156480 at pc 0x7fabaebef57b bp 0x7fab9b154640 sp 0x7fab9b153df0
READ of size 32 at 0x7fab9b156480 thread T2
    #0 0x7fabaebef57a  (/lib/x86_64-linux-gnu/libasan.so.5+0xb857a)
    #1 0x561c0a9e24eb in bool std::__equal<true>::equal<char>(char const*, char const*, char const*) /usr/include/c++/8/bits/stl_algobase.h:814
    #2 0x561c0a9dfa8e in bool std::__equal_aux<char*, char*>(char*, char*, char*) /usr/include/c++/8/bits/stl_algobase.h:831
    #3 0x561c0a9dd982 in bool std::equal<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >
, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(__gnu_cxx::__normal_iterator<char*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::c
har_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>
> >) /usr/include/c++/8/bits/stl_algobase.h:1049
    #4 0x561c0a9cf75a in RtspThread::Run() /root/zoneminder/src/zm_rtsp.cpp:411
    #5 0x561c0a9df6e9 in void std::__invoke_impl<void, void (RtspThread::*)(), RtspThread*>(std::__invoke_memfun_deref, void (RtspThread::*&&)(), RtspThread*&
&) /usr/include/c++/8/bits/invoke.h:73
    #6 0x561c0a9dd4ae in std::__invoke_result<void (RtspThread::*)(), RtspThread*>::type std::__invoke<void (RtspThread::*)(), RtspThread*>(void (RtspThread::
*&&)(), RtspThread*&&) (/root/zoneminder/cmake-build-debug-remote/src/zmc+0x1544ae)
    #7 0x561c0a9e6a1a in decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std:🧵:_Invoker<std::tuple<void (RtspThread::*)(), RtspThread*> >
::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /usr/include/c++/8/thread:244
    #8 0x561c0a9e698d in std:🧵:_Invoker<std::tuple<void (RtspThread::*)(), RtspThread*> >::operator()() /usr/include/c++/8/thread:253
    #9 0x561c0a9e68ff in std:🧵:_State_impl<std:🧵:_Invoker<std::tuple<void (RtspThread::*)(), RtspThread*> > >::_M_run() /usr/include/c++/8/threa
d:196
    #10 0x7fabaca57b2e  (/lib/x86_64-linux-gnu/libstdc++.so.6+0xbbb2e)
    #11 0x7fabae50dfa2 in start_thread /build/glibc-vjB4T1/glibc-2.28/nptl/pthread_create.c:486
    #12 0x7fabac7354ce in clone (/lib/x86_64-linux-gnu/libc.so.6+0xf94ce)
2021-04-11 11:37:03 +02:00
Peter Keresztes Schmidt 0c3244d011 comms/Socket: Mark methods which are not meant to be overridden as non-virtual
This fixes the remaining Woverloaded-virtual warnings.
2021-04-11 01:28:23 +02:00
Peter Keresztes Schmidt eacd9d4d36 comms: Add override specifier where necessary 2021-04-11 01:28:23 +02:00
Peter Keresztes Schmidt 3d2614b429 comms: Quick-fix a crash in ZM::Socket::Accept
mLocalAddr is always nullptr and not used anywhere. So just use a local variable for
the time being.
The comms types will need an API rework since the current one is rather convoluted.
Postpone fixing this properly until then.
2021-04-11 01:28:23 +02:00
Peter Keresztes Schmidt d7224261f7 comms: Implement ZM::Pipe::isClosed so we have a non-abstract class 2021-04-11 01:28:23 +02:00
Peter Keresztes Schmidt 3b705c15fe build: Store all generated sources in CMAKE_BINARY_DIR
config.h is already generated there so move zm_config_data.h and zm_config_define.h
there as well. Also limit the scope of CMAKE_BINARY_DIR as include directory to the zm target.
All in all this makes zm_config_data and zm_config_define available when building the tests target.
2021-04-11 01:28:23 +02:00
Peter Keresztes Schmidt 7dee86b104 comms: auto-format 2021-04-11 00:23:17 +02:00
Peter Keresztes Schmidt f8fc768486 FifoSource: Adapt to changed xop::AVFrame API 2021-04-11 00:08:26 +02:00
Isaac Connor 1ccc416224 Merge branch 'release-1.34' 2021-04-09 20:00:47 -04:00
Isaac Connor 6f28c16915 Uwse the db queue for event updates 2021-04-09 19:45:55 -04:00
Isaac Connor d9dc61265d Fix DisableAlarms. Use signal when capture fails instead of erroneously using TRIGGER_OFF. Add status to DumpSettings so that we can query it with zmu. 2021-04-09 17:46:11 -04:00
Isaac Connor 4bd490d121 Set signal=true if capture succeeds. 2021-04-08 11:37:27 -04:00
Isaac Connor 2d7479cb59 reintroduce Start() methods to analysis and decoding thread 2021-04-07 20:36:38 -04:00
Isaac Connor a63186444b Replace char arrays with std::strings in monitor class. 2021-04-07 14:15:55 -04:00
Isaac Connor cb7e365e35 Add locking increment_it. I think we need it. 2021-04-06 13:55:09 -04:00
Peter Keresztes Schmidt 817da4e621 Monitor: Make decoder a unique_ptr
The DecoderThread object is owned by the Monitor. Signal this by using unique_ptr.
2021-04-06 12:50:05 +02:00
Peter Keresztes Schmidt fee5ecd72f Monitor: Make analysis_thread a unique_ptr
The AnalysisThread object is owned by the Monitor. Signal this by using unique_ptr.
2021-04-06 12:50:05 +02:00
Isaac Connor 4c988860d5 Close events in a background thread. Add a ton more debugging 2021-04-05 12:56:13 -04:00
Peter Keresztes Schmidt e92125afd9 utils: remove unused curl include 2021-04-04 01:18:34 +02:00
Peter Keresztes Schmidt b5f3682d4e utils: some more reshuffling/grouping and formatting 2021-04-04 01:18:34 +02:00
Peter Keresztes Schmidt 545f0dbb96 utils: cleanup Base64Encode 2021-04-04 00:39:40 +02:00
Peter Keresztes Schmidt e330f8553d utils: cleanup Split and Join 2021-04-04 00:30:18 +02:00
Peter Keresztes Schmidt 39a896f5b6 utils: cleanup StartsWith 2021-04-03 23:51:12 +02:00
Peter Keresztes Schmidt 3dbf13e00b utils: cleanup ReplaceAll 2021-04-03 23:50:35 +02:00
Peter Keresztes Schmidt 664cd649f8 utils: cleanup Trim (was trimSet) and TrimSpaces 2021-04-03 23:30:59 +02:00
Isaac Connor 405be70430 Use packetqueue unlock to also notify 2021-04-02 21:26:01 -04:00
Isaac Connor 87fc35dbe6 Add LOW_PRIORITY to fps status updates 2021-04-02 13:09:32 -04:00
Isaac Connor bcd0e84a31 do sws_scale from decoded image to Image using a member context and avframe to save a few cycles 2021-04-01 13:22:57 -04:00
Isaac Connor 8aceccd496 improve the message when max video packets is exceeded 2021-04-01 11:53:57 -04:00
Isaac Connor 0e00cb0289 use the new packetqueue::unlock to unlock packets and wake up decoding thread 2021-04-01 11:52:47 -04:00
Isaac Connor 6459cfb4bc introduce packetqueue::unlock to unlock packets and notify anyone waiting. Also check for iterators pointing to packets when not keeping keyframes. Loop with waiting when we can't lock a packet 2021-04-01 11:52:28 -04:00
Isaac Connor f52ead7cda introduce packetqueue::unlock to unlock packets and notify anyone waiting. Also check for iterators pointing to packets when not keeping keyframes. Loop with waiting when we can't lock a packet 2021-04-01 11:52:25 -04:00
Isaac Connor 1c9bc5c27f code doc and spacing 2021-04-01 11:51:18 -04:00
Isaac Connor 22d713cd9c fix packetqueue corruption. Can't wait after grabbing the packet. 2021-03-31 16:49:19 -04:00
Isaac Connor ddb62a27c6 Fix queue full message. Remove test for empty queue. We don't care if the queue is empty. Improve debug logging. 2021-03-31 16:49:19 -04:00
Isaac Connor fd23b3e284 Adjust debug levels 2021-03-31 16:49:19 -04:00
Isaac Connor c73393579d Handle event creation failing gracefullyish 2021-03-31 12:06:33 -04:00
Isaac Connor eed6a57800 remove unused member sd 2021-03-31 12:06:14 -04:00
Isaac Connor 9b4eee02d8 Make sure id is initialized to 0 so that we can test if event creation worked 2021-03-31 12:06:03 -04:00
Isaac Connor 4fb73505b9 backport change to not initialize db in logger which fixes small memleak. 2021-03-31 12:05:30 -04:00
Isaac Connor a1364a2b2b delete packet_lock if failed trylock 2021-03-30 16:14:42 -04:00
Isaac Connor 649f7906de Need to track locked status so that if we fail a trylock we remember it and don't try to unlock later 2021-03-30 16:14:42 -04:00
Isaac Connor e92dcf1457 Add special case for older ffmpeg that has different AV_CODEC define numbers 2021-03-30 14:28:40 -04:00
Isaac Connor c7754e5be8 Default to port 5900 2021-03-30 11:37:00 -04:00
Isaac Connor 8c6f03a4e4 Move waiting for decoding down into motion detection section. Add a test for successful decode. Decode may not provide an image. 2021-03-30 09:16:45 -04:00
Isaac Connor 3202db1b33 Move waiting for decoding down into motion detection part, which is what needs it. Not sure why it was up so high. This should allow more ram freeing for people with analysis fps set to something. 2021-03-30 09:16:44 -04:00
Isaac Connor 0bfbdd6121 Use our new CODEC define to cleanup the code 2021-03-30 09:15:28 -04:00
Isaac Connor d3ed11cc5b add a simple define to make codec/codecpar access easier 2021-03-30 09:15:28 -04:00
Isaac Connor 1c7ae103ea receiving a signal is not a reason to fail a capture. It is a reason to retry 2021-03-29 18:01:10 -04:00
Isaac Connor 0a364f3b80 fix weird logic in ReadData 2021-03-29 11:54:55 -04:00
Isaac Connor 6c428c0156 Properly print out timeval 2021-03-29 09:58:09 -04:00
Isaac Connor 9463cf8565 I can't imagine what fps_report_interval has to do with event being longer than section_length. Use analysis_image_count in log 2021-03-29 09:57:57 -04:00
pmccarty e3349c54fa Fix logic to detect libvnc shared library. 2021-03-27 10:58:30 -04:00
Isaac Connor 1d99bd5cb3 Merge branch 'max_queue_size' 2021-03-26 17:03:52 -04:00
Isaac Connor 1275948744 add cast to fix compile 2021-03-26 17:03:49 -04:00
Isaac Connor 8e40067d13 Update locks 2021-03-26 17:01:45 -04:00
Isaac Connor 52cb182ae3 Load max_image_buffer_count in monitor and set it in packetqueue. rename max_video_packet_count to pre_event_video_count in packetqueue and adjust logic. When queuing packets check to ensure that we aren't going over. Delete packets from front if possible, do not queue packet if not possible 2021-03-26 14:26:37 -04:00
Isaac Connor 3655b25b7c spacing 2021-03-26 08:16:26 -04:00
Isaac Connor d0a390b42f decrease logging of nal counts 2021-03-26 08:15:55 -04:00
Isaac Connor b6187a8e91 Allow setting the frame size 2021-03-25 13:39:07 -04:00
Isaac Connor 7038263e3b implement a nal splitter for udp transmission 2021-03-25 13:12:52 -04:00
Isaac Connor 0c7542d20d set hType 2021-03-25 13:12:21 -04:00
Isaac Connor 292bad8718 We can use >= instead of > to avoid an unneeded reallocation. Reduce duplicated code. 2021-03-25 12:52:41 -04:00
Isaac Connor 3f8b9db3d9 fix UriEncode returning a string that is longer than the c_str 2021-03-24 13:29:17 -04:00
Isaac Connor 79115e79f8 Fix jwt-cpp failing signature validation 2021-03-24 13:28:40 -04:00
Isaac Connor e5a464f090 fix reverse logic on testing stop_ 2021-03-23 13:53:07 -04:00
Isaac Connor d1b816658b code style cleanups and add debug to tell which library we are using 2021-03-23 13:52:35 -04:00
Isaac Connor 1bfc61a5b7 change log level to debug when monitor is not decoding 2021-03-23 10:32:59 -04:00
Isaac Connor 456afac0ec Must initialize stop_ 2021-03-23 10:07:55 -04:00
Isaac Connor e51fe9eb4a add tail_count to encode option 2021-03-22 21:31:09 -04:00
Isaac Connor 0a8b89fecd Use pts instead of timestamp in our nal 2021-03-22 17:49:59 -04:00
Isaac Connor 96a96f4865 add jwt token as a std:;string 2021-03-22 17:49:59 -04:00
Isaac Connor 8bc22880a4 use modern threads. Add a separate thread for sending data. 2021-03-22 17:49:59 -04:00
Isaac Connor cfff9723af Remove h264markers cuz it's in zm_rtsp_server_frame.h 2021-03-22 17:49:59 -04:00
Isaac Connor d2efb51b0d rearrange a bit, put back setting width and height on video source even though it isn't used yet. Remove signal blocking stuff that we don't use 2021-03-22 17:49:59 -04:00
Isaac Connor d84e4a14fb Use a define when setting pipe size 2021-03-22 17:49:59 -04:00
Isaac Connor b5f64f1c69 Merge branch 'master' of github.com:/ZoneMinder/zoneminder 2021-03-22 12:41:36 -04:00
Isaac Connor 9cb5887332 better debug logging when choosing codec 2021-03-22 12:41:30 -04:00
Isaac Connor b8b20917be setKeepKeyframes when not PASSTHROUGH 2021-03-22 12:05:22 -04:00
Isaac Connor 2d4b4b6022 If we already tried decoding a packet, don't try again. Also we really shouldn't be decoding in videostore. 2021-03-22 12:05:05 -04:00
Isaac Connor 3f3bc50acb Add keep_keyframes setting. When NOT doing passthrough we don't actually have to store all packets since last keyframe, so don't do it. SImplifies clearPackets() logic a lot and will save ram for those people. 2021-03-22 12:04:32 -04:00
Isaac Connor 6d5cbe2583 Make incorrect dimensions non-fatal if the monitor dimensions are larger than what is expected, so at least there is enough ram to store the image 2021-03-22 11:02:32 -04:00
Peter Keresztes Schmidt 67d7872e9a Eliminate non-thread-safe calls to gmtime
gmtime uses an internal static storage to which a pointer is given as return value.
Due to this it is not safe to call gmtime from multiple threads since the same static storage is used.

Use gmtime_r instead which allows to pass in a tm struct.

Fixes:
https://github.com/ZoneMinder/zoneminder/security/code-scanning/32
2021-03-21 21:42:02 +01:00
Peter Keresztes Schmidt 4e8c7d1f7c Eliminate non-thread-safe calls to localtime
localtime uses an internal static storage to which a pointer is given as return value.
Due to this it is not safe to call localtime from multiple threads since the same static storage is used.

Use localtime_r instead which allows to pass in a tm struct.

Fixes:
https://github.com/ZoneMinder/zoneminder/security/code-scanning/24
https://github.com/ZoneMinder/zoneminder/security/code-scanning/25
https://github.com/ZoneMinder/zoneminder/security/code-scanning/26
https://github.com/ZoneMinder/zoneminder/security/code-scanning/27
https://github.com/ZoneMinder/zoneminder/security/code-scanning/28
https://github.com/ZoneMinder/zoneminder/security/code-scanning/30
https://github.com/ZoneMinder/zoneminder/security/code-scanning/31
https://github.com/ZoneMinder/zoneminder/security/code-scanning/33
https://github.com/ZoneMinder/zoneminder/security/code-scanning/58
https://github.com/ZoneMinder/zoneminder/security/code-scanning/59
https://github.com/ZoneMinder/zoneminder/security/code-scanning/63
https://github.com/ZoneMinder/zoneminder/security/code-scanning/64
https://github.com/ZoneMinder/zoneminder/security/code-scanning/65
2021-03-21 21:42:02 +01:00
Peter Keresztes Schmidt 7e86e1ef40 utils: Make TimevalToString thread-safe 2021-03-21 21:42:02 +01:00
Isaac Connor 7c9eb42ebb
Merge branch 'master' into 3197-record-event-close-mode 2021-03-21 13:03:26 -04:00
Isaac Connor 6d9a4ed661 If the analysis thread is falling behind, we can't count the packets after it in the number of packets to keep in queue. So figure out how many there are and add that to the max_video_packet count to keep so that we always have enough to satisfy pre_event_count 2021-03-21 12:28:33 -04:00
Isaac Connor 8a1d13b6cd perror => Error() 2021-03-21 09:17:03 -04:00
Isaac Connor a042e4bf77 spacing 2021-03-20 19:27:18 -04:00
SirLouen db7e9edcab Issue #3197 Improvement 2021-03-21 00:00:36 +01:00
SirLouen 33f98a0d40 Issue #3197 Add RECORD to Event_Close_Mode time 2021-03-20 20:02:52 +01:00
Isaac Connor 53133ba051 add token as an alternative to jwt_token 2021-03-18 17:43:31 -04:00
Peter Keresztes Schmidt 7a4c34ec7e RemoteCameraHttp: Fix a log message 2021-03-18 20:02:20 +01:00
Isaac Connor edefbfcad6 Remove assumptions about Analysis being about motion detection. Fixes mem leaks in Monitor mode 2021-03-18 09:24:27 -04:00
Isaac Connor f4506a8f35 We always need an analysis thread. 2021-03-17 23:41:00 -04:00
Isaac Connor ccb1bc1a7d Have to wait until we are finished with the packet before unlocking. 2021-03-17 16:11:31 -04:00
Isaac Connor fb28c6b365 Fix login in Decode for non-ffmpeg monitors 2021-03-17 15:53:14 -04:00
Isaac Connor 079d3361a2 Rework to read content_length bytes at once. Micro-optimisation 2021-03-17 15:52:55 -04:00
Isaac Connor 284fe52b5f fix double stop/free of decoder and analysis threads 2021-03-17 12:57:45 -04:00
Isaac Connor c39ec5873b don't include zm_utils in decoder_thread 2021-03-17 12:50:13 -04:00
Isaac Connor 2b34d09b84 Move analysis_thread into Monitor. Don't do extra gettimeofday if no delays are set. Fix status update on terminate 2021-03-17 12:49:50 -04:00
Isaac Connor feafaa29bf improve debug logging 2021-03-17 12:49:12 -04:00
Isaac Connor 6ab8bee581 Increase debug level for fifo writing 2021-03-17 12:48:59 -04:00
Isaac Connor 0b4f04c4d5 notify in clear before taking lock to increase chance of other threads exiting. Handle terminate case in get_packet 2021-03-17 12:48:42 -04:00
Isaac Connor 9ca5f49d82 Move analysis_thread into Monitor 2021-03-17 12:48:08 -04:00
Isaac Connor dca34544ec move analysis thread into monitor. populate analysis_it and decoder_it in Prime instead of constantly checking for them. Handle cases where LockedPacket are null due to shutdown 2021-03-17 12:47:52 -04:00
Isaac Connor a8d31ca686 After moving analysis thread into monitor, I don't know how to handle the shared_ptr stuff 2021-03-17 12:46:55 -04:00
Isaac Connor 657a5edda4 If decoding disabled, set signal and last_write_time in the Capture thread. So that zm_watch knows we are alive 2021-03-17 10:11:06 -04:00
Isaac Connor 6a2e237902 Fix delete packet before deleting lock on packet 2021-03-17 10:07:03 -04:00
Isaac Connor 74616d1061 Update CaptureFPS SQL to just do an update and don't use static sql. TThis may fix a signal 6 crash that we have been seeing 2021-03-17 10:06:45 -04:00
Isaac Connor 14ef8336b9 If ffmpeg and decoding Disabled don't stream 2021-03-16 20:10:00 -04:00
Isaac Connor fe17d7bb23 Add checks for aliveness of monitor in streaming. If decoding disabled can't view stream. 2021-03-16 20:09:14 -04:00
Isaac Connor 1daafd7f85 add GetType 2021-03-16 20:08:08 -04:00
Isaac Connor 12ed02a5b0 Move trigger detection before motion detection. Only wait for decoding if decoding is enabled 2021-03-16 20:07:59 -04:00
Isaac Connor 8fa989f8e9 Increase debug level of input selection 2021-03-16 20:07:06 -04:00
Isaac Connor c0242e7369 Fix memleak when connect fails 2021-03-16 13:28:00 -04:00
Isaac Connor 028f2dd626 Debug extra error log and code style 2021-03-16 13:27:27 -04:00
Isaac Connor 5e54a63bd5 Only load zones if doing something other than QUERY. Only delete decoder if there is one. 2021-03-16 13:26:40 -04:00
Isaac Connor ebf1b7cbdc Only output to stdout if mTerminalLevel is something. zms for example SHOULD not output to stdout, ever except maybe when running from terminal to debug 2021-03-16 13:26:06 -04:00
Isaac Connor 9d239219de Break out early if no more buffer. Saves a couple cycles 2021-03-16 12:08:45 -04:00
Isaac Connor 76267bc57f put back deleting the raw image when not saving jpegs. We only need it for the snapshot and that should be the alarmed image anyways. 2021-03-16 12:08:11 -04:00
Isaac Connor 2b0e3d0d2c Merge branch 'decoder_thread' 2021-03-15 17:05:36 -04:00
Isaac Connor 9903e909af Rework locking in ZMPacket by using a new class called ZMLockedPacket. 2021-03-15 17:05:30 -04:00
Isaac Connor baf73fea7b Ensure that we disconnect when ShmValid fails 2021-03-15 15:11:12 -04:00
Isaac Connor 6a11b23aaf Add decoder thread 2021-03-15 15:08:59 -04:00
Isaac Connor b238a2bc25 Implement decoder thread, locking is broken 2021-03-15 15:08:43 -04:00
Isaac Connor f4e60be444 If we failed to bind libvnc then fail Prime to prevent crash 2021-03-14 22:08:48 -04:00
Isaac Connor e0d54a6d11 remove deprecated reset and tidy up a bit 2021-03-13 16:30:41 -05:00
Isaac Connor c9170a87b2 Allow users with Monitors::View to generate and cancel events 2021-03-12 09:26:56 -05:00
Isaac Connor 786adc5511 Spacing 2021-03-11 13:48:52 -05:00
Isaac Connor 28490816dc Use new zmDbDoUpdate to end the event 2021-03-11 13:48:42 -05:00
Isaac Connor cbec5b2800 Implement zmDbDoUpdate which returns -mysql_errer or # of rows modified 2021-03-11 13:48:16 -05:00
Isaac Connor b5f45b0987 fix alignment of help 2021-03-11 13:16:44 -05:00
Isaac Connor 86a26ef3b1 nvsnprintf won't exceed the buffer but it can hit the end of it so adding the ending ]\n can overflow. Test and prevent. 2021-03-11 13:16:32 -05:00