From: Lars Op den Kamp Date: Wed, 21 Dec 2011 22:54:19 +0000 (+0100) Subject: cec: disable background polling. let the client request this info when needed X-Git-Tag: upstream/2.2.0~1^2~43^2~25 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=811e424489f88c84596172253fd999b2b75a91c8;p=deb_libcec.git cec: disable background polling. let the client request this info when needed --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index 5423b4f..0aa8760 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -55,7 +55,6 @@ CCECProcessor::CCECProcessor(CLibCEC *controller, const char *strDeviceName, cec m_strDeviceName(strDeviceName), m_controller(controller), m_bMonitor(false), - m_busScan(NULL), m_iStandardLineTimeout(3), m_iRetryLineTimeout(3), m_iLastTransmission(0) @@ -162,8 +161,6 @@ bool CCECProcessor::Start(const char *strPort, uint16_t iBaudRate /* = 38400 */, m_busDevices[CECDEVICE_TV]->GetHandler()->InitHandler(); m_controller->AddLog(CEC_LOG_DEBUG, "processor thread started"); - m_busScan = new CCECBusScan(this); - m_busScan->CreateThread(true); return true; } else @@ -299,13 +296,6 @@ void *CCECProcessor::Process(void) m_controller->CheckKeypressTimeout(); } - if (m_busScan) - { - m_busScan->StopThread(); - delete m_busScan; - m_busScan = NULL; - } - if (m_communication) m_communication->Close(); @@ -555,24 +545,6 @@ bool CCECProcessor::SwitchMonitoring(bool bEnable) { CLockObject lock(&m_mutex); m_bMonitor = bEnable; - - if (!bEnable) - { - if (!m_busScan) - { - m_busScan = new CCECBusScan(this); - m_busScan->CreateThread(true); - } - } - else - { - if (m_busScan) - { - m_busScan->StopThread(); - delete m_busScan; - m_busScan = NULL; - } - } } if (bEnable)