cec: don't send a deck status update when sending an active source message for panaso...
authorLars Op den Kamp <lars@opdenkamp.eu>
Sun, 1 Jan 2012 22:24:41 +0000 (23:24 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Sun, 1 Jan 2012 22:24:41 +0000 (23:24 +0100)
src/lib/CECProcessor.cpp
src/lib/implementations/CECCommandHandler.cpp
src/lib/implementations/CECCommandHandler.h
src/lib/implementations/VLCommandHandler.cpp

index e5a29eebc6e369c0188db49dd86900c6f0b7b3e5..c13a29bddf0120372651835afcc08b8afb4205b2 100644 (file)
@@ -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);
     }
index 4656110bfbdf981c51b3d0cb6953fb4ce1f6f477..336baba0af07e6a1648c74e9bf9e2360c759dee1 100644 (file)
@@ -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)
 {
 }
 
index 929f74d705701601034d3d3b86eb62594c76b01f..70763c8e3182cb15508f83d2cf144f2b2250a871 100644 (file)
@@ -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;
   };
index 257a8f398c463b9ba1cd10d0c1f6cc3072e555c1..dfef4a09e75dfa46e8c66572e0dfd663dc58bec1 100644 (file)
@@ -39,6 +39,7 @@ using namespace CEC;
 CVLCommandHandler::CVLCommandHandler(CCECBusDevice *busDevice) :
     CCECCommandHandler(busDevice)
 {
+  m_bOPTSendDeckStatusUpdateOnActiveSource = false;
 }
 
 bool CVLCommandHandler::InitHandler(void)