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)