From ecb57f8f04aae8cf52eab98e6273a015a2a0eb14 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 12 Apr 2017 13:40:17 -0400 Subject: [PATCH] change bool recording to a timeval. --- src/zm_remote_camera.h | 2 +- src/zm_remote_camera_http.h | 2 +- src/zm_remote_camera_rtsp.cpp | 4 ++-- src/zm_remote_camera_rtsp.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/zm_remote_camera.h b/src/zm_remote_camera.h index f25f3f4b4..d15b0127c 100644 --- a/src/zm_remote_camera.h +++ b/src/zm_remote_camera.h @@ -90,7 +90,7 @@ public: virtual int PreCapture() = 0; virtual int Capture( Image &image ) = 0; virtual int PostCapture() = 0; - virtual int CaptureAndRecord( Image &image, bool recording, char* event_directory )=0; + virtual int CaptureAndRecord( Image &image, timeval recording, char* event_directory )=0; }; #endif // ZM_REMOTE_CAMERA_H diff --git a/src/zm_remote_camera_http.h b/src/zm_remote_camera_http.h index db76ef3e6..a22efa27c 100644 --- a/src/zm_remote_camera_http.h +++ b/src/zm_remote_camera_http.h @@ -59,7 +59,7 @@ public: int PreCapture(); int Capture( Image &image ); int PostCapture(); - int CaptureAndRecord( Image &image, bool recording, char* event_directory ) {return(0);}; + int CaptureAndRecord( Image &image, timeval recording, char* event_directory ) {return(0);}; }; #endif // ZM_REMOTE_CAMERA_HTTP_H diff --git a/src/zm_remote_camera_rtsp.cpp b/src/zm_remote_camera_rtsp.cpp index fbb1b9b9d..096b69ccb 100644 --- a/src/zm_remote_camera_rtsp.cpp +++ b/src/zm_remote_camera_rtsp.cpp @@ -392,7 +392,7 @@ int RemoteCameraRtsp::Capture( Image &image ) { //Function to handle capture and store -int RemoteCameraRtsp::CaptureAndRecord(Image &image, bool recording, char* event_file ) { +int RemoteCameraRtsp::CaptureAndRecord(Image &image, timeval recording, char* event_file ) { AVPacket packet; uint8_t* directbuffer; int frameComplete = false; @@ -407,7 +407,7 @@ int RemoteCameraRtsp::CaptureAndRecord(Image &image, bool recording, char* event return (-1); //Video recording - if ( recording ) { + if ( recording.tv_sec ) { // The directory we are recording to is no longer tied to the current event. // Need to re-init the videostore with the correct directory and start recording again // Not sure why we are only doing this on keyframe, al diff --git a/src/zm_remote_camera_rtsp.h b/src/zm_remote_camera_rtsp.h index 79f656ac5..8ed8b713c 100644 --- a/src/zm_remote_camera_rtsp.h +++ b/src/zm_remote_camera_rtsp.h @@ -86,7 +86,7 @@ public: int PreCapture(); int Capture( Image &image ); int PostCapture(); - int CaptureAndRecord( Image &image, bool recording, char* event_directory ); + int CaptureAndRecord( Image &image, timeval recording, char* event_directory ); }; #endif // ZM_REMOTE_CAMERA_RTSP_H