From: Lars Op den Kamp Date: Sun, 1 Jan 2012 22:24:41 +0000 (+0100) Subject: cec: don't send a deck status update when sending an active source message for panaso... X-Git-Tag: upstream/2.2.0~1^2~42^2~13 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7b74fdfb8d43b0044fc3e55f5f8d9263ed636e3b;p=deb_libcec.git cec: don't send a deck status update when sending an active source message for panasonic TVs --- diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index e5a29ee..c13a29b 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -428,7 +428,8 @@ bool CCECProcessor::SetActiveSource(cec_device_type type /* = CEC_DEVICE_TYPE_RE bReturn = m_busDevices[addr]->TransmitActiveSource(); if (bReturn && (m_busDevices[addr]->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE || - m_busDevices[addr]->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE)) + m_busDevices[addr]->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE) && + m_busDevices[addr]->GetHandler()->SendDeckStatusUpdateOnActiveSource()) { bReturn = ((CCECPlaybackDevice *)m_busDevices[addr])->TransmitDeckStatus(CECDEVICE_TV); } diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 4656110..336baba 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -47,7 +47,8 @@ CCECCommandHandler::CCECCommandHandler(CCECBusDevice *busDevice) : m_iTransmitRetries(CEC_DEFAULT_TRANSMIT_RETRIES), m_bHandlerInited(false), m_iUseCounter(0), - m_expectedResponse(CEC_OPCODE_NONE) + m_expectedResponse(CEC_OPCODE_NONE), + m_bOPTSendDeckStatusUpdateOnActiveSource(true) { } diff --git a/src/lib/implementations/CECCommandHandler.h b/src/lib/implementations/CECCommandHandler.h index 929f74d..70763c8 100644 --- a/src/lib/implementations/CECCommandHandler.h +++ b/src/lib/implementations/CECCommandHandler.h @@ -85,6 +85,8 @@ namespace CEC virtual bool MarkReady(void); virtual bool InUse(void); + virtual bool SendDeckStatusUpdateOnActiveSource(void) const { return m_bOPTSendDeckStatusUpdateOnActiveSource; }; + protected: virtual bool HandleActiveSource(const cec_command &command); virtual bool HandleDeckControl(const cec_command &command); @@ -139,6 +141,7 @@ namespace CEC bool m_bHandlerInited; uint8_t m_iUseCounter; cec_opcode m_expectedResponse; + bool m_bOPTSendDeckStatusUpdateOnActiveSource; CMutex m_receiveMutex; CCondition m_condition; }; diff --git a/src/lib/implementations/VLCommandHandler.cpp b/src/lib/implementations/VLCommandHandler.cpp index 257a8f3..dfef4a0 100644 --- a/src/lib/implementations/VLCommandHandler.cpp +++ b/src/lib/implementations/VLCommandHandler.cpp @@ -39,6 +39,7 @@ using namespace CEC; CVLCommandHandler::CVLCommandHandler(CCECBusDevice *busDevice) : CCECCommandHandler(busDevice) { + m_bOPTSendDeckStatusUpdateOnActiveSource = false; } bool CVLCommandHandler::InitHandler(void)