From 657fc5cad579e88ae1b5b961b2a337a772183832 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 7 Jan 2022 11:52:19 -0500 Subject: [PATCH] convert function to relevant capturing/analysing --- src/zm_stream.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/zm_stream.cpp b/src/zm_stream.cpp index aba98e0c3..e1560647b 100644 --- a/src/zm_stream.cpp +++ b/src/zm_stream.cpp @@ -46,16 +46,16 @@ bool StreamBase::loadMonitor(int p_monitor_id) { return false; } - if ( monitor->GetFunction() == Monitor::NONE ) { - Info("Monitor %d has function NONE. Will not be able to connect to it.", monitor_id); + if (monitor->Capturing() == Monitor::CAPTURING_NONE) { + Info("Monitor %d has capturing == NONE. Will not be able to connect to it.", monitor_id); return false; } - if ( monitor->isConnected() ) { + if (monitor->isConnected()) { monitor->disconnect(); } - if ( !monitor->connect() ) { + if (!monitor->connect()) { Error("Unable to connect to monitor id %d for streaming", monitor_id); monitor->disconnect(); return false; @@ -69,8 +69,8 @@ bool StreamBase::checkInitialised() { Error("Cannot stream, not initialised"); return false; } - if (monitor->GetFunction() == Monitor::NONE) { - Info("Monitor %d has function NONE. Will not be able to connect to it.", monitor_id); + if (monitor->Capturing() == Monitor::CAPTURING_NONE) { + Info("Monitor %d has capturing == NONE. Will not be able to connect to it.", monitor_id); return false; } if (!monitor->ShmValid()) {