From bf2cb5fb1f4cc5ac0bd3cf22ece7f18aa8fd4251 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 8 Aug 2020 10:21:06 -0400 Subject: [PATCH] Add PrimeCapture to zm_remote_camera_http. PrimeCapture is used to determine if we can connect and so by not implementing it, monitors like this say capturing even though they are not. --- src/zm_remote_camera_http.cpp | 12 ++++++++++++ src/zm_remote_camera_http.h | 1 + 2 files changed, 13 insertions(+) diff --git a/src/zm_remote_camera_http.cpp b/src/zm_remote_camera_http.cpp index bff7d83c1..35ba5b58c 100644 --- a/src/zm_remote_camera_http.cpp +++ b/src/zm_remote_camera_http.cpp @@ -1069,6 +1069,18 @@ int RemoteCameraHttp::GetResponse() { return( 0 ); } +int RemoteCameraHttp::PrimeCapture() { + if ( sd < 0 ) { + Connect(); + if ( sd < 0 ) { + return -1; + } + mode = SINGLE_IMAGE; + buffer.clear(); + } + return 0; +} + int RemoteCameraHttp::PreCapture() { if ( sd < 0 ) { Connect(); diff --git a/src/zm_remote_camera_http.h b/src/zm_remote_camera_http.h index d2bc96848..d9154608c 100644 --- a/src/zm_remote_camera_http.h +++ b/src/zm_remote_camera_http.h @@ -55,6 +55,7 @@ public: int ReadData( Buffer &buffer, unsigned int bytes_expected=0 ); int GetData(); int GetResponse(); + int PrimeCapture(); int PreCapture(); int Capture( Image &image ); int PostCapture();