cec: retry 'activate source' every 10 seconds if it failed
[deb_libcec.git] / src / lib / implementations / CECCommandHandler.h
index be1f6436ad8f64636c346c9a20a7966bdf13d0be..6e0121fdee49886dc4b3db09b47465d8175aa9e6 100644 (file)
@@ -77,7 +77,7 @@ namespace CEC
       m_waitingFor.clear();
     }
 
-    bool Wait(cec_opcode opcode, uint32_t iTimeout = 2000)
+    bool Wait(cec_opcode opcode, uint32_t iTimeout = CEC_DEFAULT_TRANSMIT_WAIT)
     {
       CResponse *response = GetEvent(opcode);
       return response ? response->Wait(iTimeout) : false;
@@ -162,6 +162,8 @@ namespace CEC
 
     virtual void SignalOpcode(cec_opcode opcode);
 
+    virtual bool ActiveSourcePending(void);
+
   protected:
     virtual bool HandleActiveSource(const cec_command &command);
     virtual bool HandleDeckControl(const cec_command &command);
@@ -203,7 +205,6 @@ namespace CEC
     virtual size_t GetMyDevices(std::vector<CCECBusDevice *> &devices) const;
     virtual CCECBusDevice *GetDevice(cec_logical_address iLogicalAddress) const;
     virtual CCECBusDevice *GetDeviceByPhysicalAddress(uint16_t iPhysicalAddress) const;
-    virtual CCECBusDevice *GetDeviceByType(cec_device_type type) const;
 
     virtual bool SetVendorId(const cec_command &command);
     virtual void SetPhysicalAddress(cec_logical_address iAddress, uint16_t iNewAddress);
@@ -219,5 +220,7 @@ namespace CEC
     bool                                  m_bOPTSendDeckStatusUpdateOnActiveSource;
     cec_vendor_id                         m_vendorId;
     CWaitForResponse                     *m_waitForResponse;
+    bool                                  m_bActiveSourcePending;
+    PLATFORM::CMutex                      m_mutex;
   };
 };