m_busDevices[addr]->TransmitActiveSource();
}
+bool CCECProcessor::SetActiveSource(cec_logical_address iAddress)
+{
+ return SetStreamPath(m_busDevices[iAddress]->GetPhysicalAddress());
+}
+
bool CCECProcessor::SetActiveView(void)
{
return SetActiveSource(m_types.IsEmpty() ? CEC_DEVICE_TYPE_RESERVED : m_types[0]);
virtual bool SetActiveView(void);
virtual bool SetActiveSource(cec_device_type type = CEC_DEVICE_TYPE_RESERVED);
+ virtual bool SetActiveSource(cec_logical_address iAddress);
virtual bool SetDeckControlMode(cec_deck_control_mode mode, bool bSendUpdate = true);
virtual bool SetDeckInfo(cec_deck_info info, bool bSendUpdate = true);
virtual bool SetInactiveView(void);
case CEC_OPCODE_SET_OSD_NAME:
HandleSetOSDName(command);
break;
+ case CEC_OPCODE_IMAGE_VIEW_ON:
+ HandleImageViewOn(command);
+ break;
+ case CEC_OPCODE_TEXT_VIEW_ON:
+ HandleTextViewOn(command);
+ break;
default:
UnhandledCommand(command);
bHandled = false;
return false;
}
+bool CCECCommandHandler::HandleGiveSystemAudioModeStatus(const cec_command &command)
+{
+ if (m_busDevice->MyLogicalAddressContains(command.destination))
+ {
+ CCECBusDevice *device = GetDevice(command.destination);
+ if (device && device->GetType() == CEC_DEVICE_TYPE_AUDIO_SYSTEM)
+ return ((CCECAudioSystem *) device)->TransmitSystemAudioModeStatus(command.initiator);
+ }
+
+ return false;
+}
+
+bool CCECCommandHandler::HandleImageViewOn(const cec_command &command)
+{
+ m_busDevice->GetProcessor()->SetActiveSource(command.initiator);
+ return true;
+}
+
bool CCECCommandHandler::HandleMenuRequest(const cec_command &command)
{
if (m_busDevice->MyLogicalAddressContains(command.destination))
return false;
}
-bool CCECCommandHandler::HandleGiveSystemAudioModeStatus(const cec_command &command)
+bool CCECCommandHandler::HandleTextViewOn(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
- {
- CCECBusDevice *device = GetDevice(command.destination);
- if (device && device->GetType() == CEC_DEVICE_TYPE_AUDIO_SYSTEM)
- return ((CCECAudioSystem *) device)->TransmitSystemAudioModeStatus(command.initiator);
- }
-
- return false;
+ m_busDevice->GetProcessor()->SetActiveSource(command.initiator);
+ return true;
}
bool CCECCommandHandler::HandleUserControlPressed(const cec_command &command)
virtual bool HandleGiveDeviceVendorId(const cec_command &command);
virtual bool HandleGiveOSDName(const cec_command &command);
virtual bool HandleGivePhysicalAddress(const cec_command &command);
+ virtual bool HandleGiveSystemAudioModeStatus(const cec_command &command);
+ virtual bool HandleImageViewOn(const cec_command &command);
virtual bool HandleMenuRequest(const cec_command &command);
virtual bool HandleReportAudioStatus(const cec_command &command);
virtual bool HandleReportPhysicalAddress(const cec_command &command);
virtual bool HandleSetSystemAudioModeRequest(const cec_command &command);
virtual bool HandleStandby(const cec_command &command);
virtual bool HandleSystemAudioStatus(const cec_command &command);
- virtual bool HandleGiveSystemAudioModeStatus(const cec_command &command);
+ virtual bool HandleTextViewOn(const cec_command &command);
virtual bool HandleUserControlPressed(const cec_command &command);
virtual bool HandleUserControlRelease(const cec_command &command);
virtual void UnhandledCommand(const cec_command &command);