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
Isaac Connor
65858eb104
Merge pull request #3189 from rabsym/Make_last_alarm_count_last_alarmed_frame_while_in_ALARM_state_only
...
Make last_alarm_count last alarmed frame while only in ALARM state to…
2021-03-04 15:48:50 -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
Isaac Connor
8f4c3aff88
Merge pull request #3187 from Carbenium/fix-bsd
...
Fix build on FreeBSD
2021-03-03 18:36:24 -05: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
Peter Keresztes Schmidt
71edb9d830
RtpCtrlThread: Convert to std::thread
2021-03-03 23:31:53 +01:00
Peter Keresztes Schmidt
ff2bfb58da
RtspThread: Fix an unguarded SQL query causing race conditions
2021-03-03 23:31:53 +01:00
Peter Keresztes Schmidt
8f941c75cd
RtspThread: Convert to std::thread
2021-03-03 23:31:53 +01:00
Peter Keresztes Schmidt
e67626b4e2
logger: Move log_mutex to std::recursive_mutex
2021-03-03 23:31:53 +01:00
Isaac Connor
20fe6153d5
Don't treat data packets as video
2021-03-03 15:52:39 -05:00
Isaac Connor
d34d2e2398
Use a define to deal with the codec/codecpar version problem
2021-03-03 15:43:59 -05:00
Isaac Connor
253ed928ec
Fix using wrong stream to set codec_type
2021-03-03 15:24:11 -05:00
Isaac Connor
8a33fb6665
Include codec_type in stream and packet dumps
2021-03-03 15:23:58 -05:00
Isaac Connor
de0bbf7e04
Instead of fatal error triggering, turn off file logging and log the error elsewhere
2021-03-03 14:31:43 -05:00
Isaac Connor
8aebcf7337
Fix ['mid'] not being defined. Use instead
2021-03-03 12:51:27 -05:00
Isaac Connor
eaaf04420a
Keep track of stream last_pts. So we can at least try to sync streams
2021-03-03 12:45:05 -05:00
Isaac Connor
3149ba276f
audio_in_stream_id is dprecated
2021-03-03 12:44:45 -05:00
Isaac Connor
ed88719cd1
Merge branch 'second_ffmpeg_url'
2021-03-03 12:07:44 -05:00
Isaac Connor
fda0656f84
Bump version to 1.35.20 to pick up SecondPath db change
2021-03-03 12:07:33 -05:00
Isaac Connor
b87d859f72
Set the packet's stream_index to the packetqueue stream. Rename get_ functions to get
2021-03-03 12:06:34 -05:00
Isaac Connor
a90ec5b15d
Deprecate video_in_stream_index and audio_in_stream_index as they are not useful
2021-03-03 12:03:36 -05:00
Isaac Connor
ce4e133c94
Add loading SecondPath in monitor
2021-03-03 09:56:33 -05:00
Isaac Connor
a01a24ec36
Add loading SecondPath in monitor
2021-03-03 09:56:33 -05:00
Isaac Connor
9310825d93
Add get_video_stream and get_audio_stream.
2021-03-03 09:56:31 -05:00
Isaac Connor
e31c87193d
Make Open() return 1 instead of 0
2021-03-03 09:55:57 -05:00
Isaac Connor
4cc1da8b89
Add SecondFormatContext and open it using an FFmpeg_Input
2021-03-03 09:55:57 -05:00
Isaac Connor
86541779d9
Add SecondFormatContext
2021-03-03 09:55:57 -05:00