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
Isaac Connor
43e7e612c5
Have to turn off DB logging when logging from a db query or else we infinite loop
2021-03-11 13:07:47 -05:00
Isaac Connor
f2553220b6
Implement xop::Authenticator::GetFailedResponse to return a 401
2021-03-11 11:45:39 -05:00
Isaac Connor
874e61d681
remove Base64 include from live555
2021-03-11 09:26:50 -05:00
Isaac Connor
644d6d34a4
Must init video_stream_id and audio_stream_id
2021-03-10 17:23:44 -05:00
Isaac Connor
5d968358f7
Need to use ZM::make_unique because std::make_unique is c++14
2021-03-10 16:35:03 -05:00
Isaac Connor
000df68f72
include memory
2021-03-10 16:17:26 -05:00
Isaac Connor
15bd3276d2
fix define
2021-03-10 13:50:42 -05:00
Isaac Connor
aadee4ea65
add a Query String parse in zm_utils
...
add an authenticator to use with RtspServer
2021-03-10 13:20:14 -05:00
Isaac Connor
562e7c7e80
Add authentication
2021-03-10 13:19:41 -05:00
Isaac Connor
a0957fbd10
remove debug
2021-03-10 13:19:30 -05:00
Isaac Connor
b1f6eb127b
Switch from live555 to PHZ76/RtspServer
2021-03-10 11:01:04 -05:00
Isaac Connor
831cf8af56
remove zm_video.h which is no longer relevant
2021-03-08 22:14:47 -05:00
Isaac Connor
41085c9e5c
Remove final bits of zm_video writer.
2021-03-08 22:14:13 -05:00
Isaac Connor
46bf765f80
Set heartbeat on startup. Fix logic in ShmValid
2021-03-08 18:31:01 -05:00
Isaac Connor
e38e8a2775
Actually use zmc_heartbeat_time. Set it on every capture and use it in ShmValid to determine if zmc has gone away.
2021-03-08 09:30:53 -05:00
Isaac Connor
c0990a7982
Merge pull request #3190 from Carbenium/db-locking
...
Fix SQL queries with missing lock
2021-03-06 18:51:02 -05: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
0796a2262e
Utils: Replace stringtf with a type-safe version that can't overflow
2021-03-06 00:12:18 +01:00
Peter Keresztes Schmidt
9e77324de4
Replace raw mysql_query calls with the zmDb* functions
...
With this we can make sure we have proper locking of our DB connection at all times.
2021-03-06 00:12:18 +01:00
Isaac Connor
c96cb1dd8d
Put back terminate_
2021-03-05 14:21:18 -05:00
Isaac Connor
cfb8e062c1
Add deleting sources to RTSPServerThread::Stop(). Delete redundant terminate
2021-03-05 14:18:51 -05:00
Isaac Connor
ebd29a3cb9
use the timeout version of read_into so that we don't stay blocked while we have been told to exit. If getNextFrame returns -1 sleep for a second.
2021-03-05 14:18:12 -05:00
Isaac Connor
07339e443b
Add RTSP Server shutdown code
2021-03-05 14:13:24 -05:00
Isaac Connor
f99b8896ec
Don't unlock the mutex around openFile. It is a recursive mutex so we should be able to stay locked
2021-03-05 14:13:10 -05:00
Isaac Connor
0af68a0914
Implement read_into with a timeout
2021-03-05 14:12:44 -05:00
Isaac Connor
1ff4e5bc8d
Fix not keeping enough video packets in packetqueue to satisfy pre_event_count
2021-03-05 10:02:21 -05:00
Admin
fa22129966
Make last_alarm_count last alarmed frame while only in ALARM state to make post_event_count counts since here not alone alarmed frames that don't shot alarms.
2021-03-04 20:20:02 +01:00
Isaac Connor
5f476df194
Fix invalid read when no mAudioStream
2021-03-04 13:35:39 -05:00
Isaac Connor
d20521569d
Only add width and height if they have a value
2021-03-04 13:26:10 -05:00
Isaac Connor
7da1e48456
Fix delete=>delete[] on header. If we read_into the buffer more all our pointers can be invalidated. So use offsets instead
2021-03-04 13:26:10 -05:00
Isaac Connor
eb36c9e919
add getFrequencyIndex and use it to correctly set the frequency index
2021-03-04 13:26:10 -05:00
Isaac Connor
1adeda6241
Add debugging of sql
2021-03-04 13:26:10 -05:00
Peter Keresztes Schmidt
5ffaebf70d
RtpCtrlThread: Add a missing include
2021-03-04 19:21:09 +01:00
Isaac Connor
0a8b34843c
Merge pull request #3188 from Carbenium/drop-zm-thread
...
Drop our custom threading code
2021-03-04 13:02:51 -05:00
Isaac Connor
5259b78065
Fix event notes not getting populated.
2021-03-04 11:12:27 -05:00
Isaac Connor
f986b6a5e2
Clear packet counts on clear so that camera restarts don't incremenet the stream_id's and cause memory consumption
2021-03-04 07:46:39 -05: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
15bb9969da
Timer: Unused, let's remove it
...
Currently there is no need for this functionality.
Since it depends on Thread and ThreadData (which will be removed) let's drop this as well.
If need would arise for such functionality a new implementation with a modern API should be written.
2021-03-03 23:38:15 +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
69185e2204
RtpSource: Convert ThreadData with std::condition_variable
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
Peter Keresztes Schmidt
c7f9cc3368
LibvlcCamera: Convert ThreadData with std::condition_variable
2021-03-03 23:31:53 +01:00
Peter Keresztes Schmidt
c78e174e78
RTSPServerThread: Convert to std::thread
2021-03-03 23:31:53 +01:00
Peter Keresztes Schmidt
8f0431d85b
RtpDataThread: Convert to std::thread
2021-03-03 23:31:53 +01:00