- if (frame[2] <= CEC_USER_CONTROL_CODE_MAX)
- m_controller->SetCurrentButton((cec_user_control_code) frame[2]);
- }
- break;
- case CEC_OPCODE_USER_CONTROL_RELEASE:
- m_controller->AddKey();
- break;
- default:
- frame.shift(2);
- m_controller->AddCommand((cec_logical_address) initiator, (cec_logical_address) destination, opCode, &frame);
- break;
- }
- }
- else if (destination == (uint8_t) CECDEVICE_BROADCAST)
- {
- CStdString strLog;
- if (opCode == CEC_OPCODE_REQUEST_ACTIVE_SOURCE)
- {
- strLog.Format(">> %i requests active source", initiator);
- m_controller->AddLog(CEC_LOG_DEBUG, strLog.c_str());
- BroadcastActiveSource();
- }
- else if (opCode == CEC_OPCODE_SET_STREAM_PATH)
- {
- if (frame.size() >= 4)
- {
- int streamaddr = ((int)frame[2] << 8) | ((int)frame[3]);
- strLog.Format(">> %i requests stream path from physical address %04x", initiator, streamaddr);
- m_controller->AddLog(CEC_LOG_DEBUG, strLog.c_str());
- if (streamaddr == m_physicaladdress)
- BroadcastActiveSource();
- }
- }
- else
- {
- cec_frame params = frame;
- frame.shift(2);
- m_controller->AddCommand((cec_logical_address) initiator, (cec_logical_address) destination, opCode, ¶ms);
- }
- }
- else
- {
- CStdString strLog;
- strLog.Format("ignoring frame: destination: %u != %u", destination, (uint16_t)m_iLogicalAddress);
- m_controller->AddLog(CEC_LOG_DEBUG, strLog.c_str());
- }
+ return addresses;
+}
+
+bool CCECProcessor::IsHandledByLibCEC(const cec_logical_address address) const
+{
+ CCECBusDevice *device = GetDevice(address);
+ return device && device->IsHandledByLibCEC();
+}
+
+bool CCECProcessor::IsRunningLatestFirmware(void)
+{
+ return m_communication && m_communication->IsOpen() ?
+ m_communication->IsRunningLatestFirmware() :
+ true;