Don't connect to the monitor when doing an eventStream

This commit is contained in:
Isaac Connor 2017-11-07 09:34:47 -05:00
parent 4b8a8e7b56
commit c3cfd096c7
1 changed files with 9 additions and 2 deletions

View File

@ -27,6 +27,7 @@
#include "zm_stream.h"
#include "zm_video.h"
#include "zm_ffmpeg_input.h"
#include "zm_monitor.h"
#ifdef __cplusplus
extern "C" {
@ -108,11 +109,17 @@ class EventStream : public StreamBase {
}
void setStreamStart( int init_event_id, unsigned int init_frame_id=0 ) {
loadInitialEventData( init_event_id, init_frame_id );
loadMonitor( event_data->monitor_id );
if ( !(monitor = Monitor::Load( event_data->monitor_id, false, Monitor::QUERY )) ) {
Fatal( "Unable to load monitor id %d for streaming", event_data->monitor_id );
return;
}
}
void setStreamStart( int monitor_id, time_t event_time ) {
loadInitialEventData( monitor_id, event_time );
loadMonitor( monitor_id );
if ( !(monitor = Monitor::Load( event_data->monitor_id, false, Monitor::QUERY )) ) {
Fatal( "Unable to load monitor id %d for streaming", monitor_id );
return;
}
}
void setStreamMode( StreamMode p_mode ) {
mode = p_mode;