CCECCommandHandler(busDevice)
{
}
-
-bool CVLCommandHandler::HandleSetStreamPath(const cec_command &command)
-{
- if (command.parameters.size >= 2)
- {
- int streamaddr = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
- CStdString strLog;
- strLog.Format(">> %i requests stream path from physical address %04x", command.initiator, streamaddr);
- m_busDevice->AddLog(CEC_LOG_DEBUG, strLog.c_str());
- if (streamaddr == m_busDevice->GetMyPhysicalAddress())
- {
- CCECBusDevice *device = GetThisDevice();
- CCECBusDevice *initiatorDevice = GetDevice(command.initiator);
- if (device && initiatorDevice)
- {
- return device->BroadcastActiveSource() &&
- device->BroadcastActiveView() &&
- initiatorDevice->ReportMenuState();
- }
- return false;
- }
- }
- return true;
-}