device->m_bActiveSource = true;
device->m_powerStatus = CEC_POWER_STATUS_ON;
-
- if (m_logicalAddresses.isset(device->m_iLogicalAddress))
- bReturn = device->TransmitActiveSource();
- else
- bReturn = true;
}
return bReturn;
{
if (command.parameters.size >= 2)
{
- uint16_t streamaddr = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
+ uint16_t iStreamAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
CStdString strLog;
- strLog.Format(">> %i sets stream path to physical address %04x", command.initiator, streamaddr);
+ strLog.Format(">> %i sets stream path to physical address %04x", command.initiator, iStreamAddress);
m_busDevice->AddLog(CEC_LOG_DEBUG, strLog.c_str());
- return m_busDevice->GetProcessor()->SetStreamPath(streamaddr);
+ if (m_busDevice->GetProcessor()->SetStreamPath(iStreamAddress))
+ {
+ CCECBusDevice *device = GetDeviceByPhysicalAddress(iStreamAddress);
+ if (device)
+ {
+ return device->TransmitActiveSource() &&
+ device->TransmitMenuState(command.initiator);
+ }
+ }
+ return false;
}
return true;
}
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 = GetDevice(command.destination);
- if (device)
- {
- return device->TransmitActiveSource() &&
- device->TransmitMenuState(command.initiator);
- }
- return false;
- }
- }
- return true;
-}
CVLCommandHandler(CCECBusDevice *busDevice);
virtual ~CVLCommandHandler(void) {};
virtual cec_vendor_id GetVendorId(void) { return CEC_VENDOR_PANASONIC; };
-
- protected:
- virtual bool HandleSetStreamPath(const cec_command &command);
};
};