From aa9d2cbac3c31c97c81c8e95f8dc96b59bd83ce9 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 11 Jan 2014 18:07:17 +0100 Subject: [PATCH] streamts: put zapit back into standby after streaming additionally, update copyright info Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/573dc62736b188fd5c896040d6d43b84bd905022 Author: Stefan Seyfried Date: 2014-01-11 (Sat, 11 Jan 2014) --- src/driver/streamts.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index d31bfcec6..eefaeb591 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -3,6 +3,8 @@ Copyright (C) 2011-2012 CoolStream International Ltd + Copyright (C) 2010-2012, 2014 Stefan Seyfried + based on code which is Copyright (C) 2002 Andreas Oberritter Copyright (C) 2001 TripleDES @@ -512,6 +514,15 @@ void CStreamManager::run() mutex.unlock(); } } + /* this is a cheap check */ + if (streams.empty() && + CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_standby) { + /* this check is more expensive (goes through the socket) */ + if (g_Zapit->getMode() != 0) { + printf("CStreamManager::run: put zapit into standby...\n"); + g_Zapit->setStandby(true); + } + } } } }