-CCECProcessor::CCECProcessor(CLibCEC *controller, CAdapterCommunication *serComm, const char *strDeviceName, cec_logical_address iLogicalAddress /* = CECDEVICE_PLAYBACKDEVICE1 */, uint16_t iPhysicalAddress /* = CEC_DEFAULT_PHYSICAL_ADDRESS*/) :
- m_bStarted(false),
- m_iHDMIPort(CEC_DEFAULT_HDMI_PORT),
- m_strDeviceName(strDeviceName),
- m_communication(serComm),
- m_controller(controller),
- m_bMonitor(false)
-{
- m_logicalAddresses.Clear();
- m_logicalAddresses.Set(iLogicalAddress);
- m_types.clear();
- for (int iPtr = 0; iPtr <= 16; iPtr++)
- m_busDevices[iPtr] = new CCECBusDevice(this, (cec_logical_address) iPtr, iPtr == iLogicalAddress ? iPhysicalAddress : 0);
-}
-
-CCECProcessor::CCECProcessor(CLibCEC *controller, CAdapterCommunication *serComm, const char *strDeviceName, const cec_device_type_list &types) :
- m_bStarted(false),
- m_iHDMIPort(CEC_DEFAULT_HDMI_PORT),
- m_strDeviceName(strDeviceName),
- m_types(types),
- m_communication(serComm),
- m_controller(controller),
- m_bMonitor(false)
-{
- m_logicalAddresses.Clear();
- for (int iPtr = 0; iPtr < 16; iPtr++)
- {
- switch(iPtr)
- {
- case CECDEVICE_AUDIOSYSTEM:
- m_busDevices[iPtr] = new CCECAudioSystem(this, (cec_logical_address) iPtr, 0xFFFF);
- break;
- case CECDEVICE_PLAYBACKDEVICE1:
- case CECDEVICE_PLAYBACKDEVICE2:
- case CECDEVICE_PLAYBACKDEVICE3:
- m_busDevices[iPtr] = new CCECPlaybackDevice(this, (cec_logical_address) iPtr, 0xFFFF);
- break;
- case CECDEVICE_RECORDINGDEVICE1:
- case CECDEVICE_RECORDINGDEVICE2:
- case CECDEVICE_RECORDINGDEVICE3:
- m_busDevices[iPtr] = new CCECRecordingDevice(this, (cec_logical_address) iPtr, 0xFFFF);
- break;
- case CECDEVICE_TUNER1:
- case CECDEVICE_TUNER2:
- case CECDEVICE_TUNER3:
- case CECDEVICE_TUNER4:
- m_busDevices[iPtr] = new CCECTuner(this, (cec_logical_address) iPtr, 0xFFFF);
- break;
- case CECDEVICE_TV:
- m_busDevices[iPtr] = new CCECTV(this, (cec_logical_address) iPtr, 0);
- break;
- default:
- m_busDevices[iPtr] = new CCECBusDevice(this, (cec_logical_address) iPtr, 0xFFFF);
- break;
- }
- }