From f740dbde59b50aaff0d2df406c54f39fc89ac735 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 12 Jan 2014 15:26:34 +0100 Subject: [PATCH] zapit: improve the lockPlayBack "nonblank-Hack" Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9476627ac58a635554a12be7b8e10c171fc10ee0 Author: Stefan Seyfried Date: 2014-01-12 (Sun, 12 Jan 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/zapit/include/zapit/zapit.h | 2 +- src/zapit/src/zapit.cpp | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/zapit/include/zapit/zapit.h b/src/zapit/include/zapit/zapit.h index 72faaa14b..d519da0be 100644 --- a/src/zapit/include/zapit/zapit.h +++ b/src/zapit/include/zapit/zapit.h @@ -195,7 +195,7 @@ class CZapit : public OpenThreads::Thread void LoadVolumeMap(); void SaveChannelPids(CZapitChannel* channel); virtual void ConfigFrontend(); - bool StopPlayBack(bool send_pmt); + bool StopPlayBack(bool send_pmt, bool blank = true); virtual void leaveStandby(); static CZapit * zapit; diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index 5104c71bc..4c5b4574b 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -1693,10 +1693,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd) { CZapitMessages::commandBoolean msgBool; CBasicServer::receive_data(connfd, &msgBool, sizeof(msgBool)); - /* hack. if standby true, dont blank video */ - standby = true; - StopPlayBack(msgBool.truefalse); - standby = false; + StopPlayBack(msgBool.truefalse, false); playbackStopForced = true; lock_channel_id = live_channel_id; SendCmdReady(connfd); @@ -2205,7 +2202,7 @@ bool CZapit::StartPlayBack(CZapitChannel *thisChannel) return true; } -bool CZapit::StopPlayBack(bool send_pmt) +bool CZapit::StopPlayBack(bool send_pmt, bool blank) { if(send_pmt) CCamManager::getInstance()->Stop(live_channel_id, CCamManager::PLAY); @@ -2234,7 +2231,7 @@ bool CZapit::StopPlayBack(bool send_pmt) audioDecoder->Stop(); /* hack. if standby, dont blank video -> for paused timeshift */ - videoDecoder->Stop(standby ? false : true); + videoDecoder->Stop(standby ? false : blank); #endif #ifdef USE_VBI videoDecoder->StopVBI();