if (command.parameters.size == 2)
{
uint16_t iAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
- return m_processor->SetStreamPath(iAddress);
+ return m_processor->SetActiveSource(iAddress);
}
return true;
bool CCECCommandHandler::HandleImageViewOn(const cec_command &command)
{
- m_processor->SetStreamPath(m_processor->m_busDevices[command.initiator]->GetPhysicalAddress(false));
+ m_processor->m_busDevices[command.initiator]->SetActiveSource();
return true;
}
if (command.parameters.size == 2)
{
uint16_t iNewAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
- m_processor->SetStreamPath(iNewAddress);
+ m_processor->SetActiveSource(iNewAddress);
}
return false;
strLog.Format(">> %i sets stream path to physical address %04x", command.initiator, iStreamAddress);
m_busDevice->AddLog(CEC_LOG_DEBUG, strLog.c_str());
- if (m_processor->SetStreamPath(iStreamAddress))
+ /* one of the device handled by libCEC has been made active */
+ CCECBusDevice *device = GetDeviceByPhysicalAddress(iStreamAddress);
+ if (device && m_busDevice->MyLogicalAddressContains(device->GetLogicalAddress()))
{
- CCECBusDevice *device = GetDeviceByPhysicalAddress(iStreamAddress);
- if (device)
- {
- return device->TransmitActiveSource() &&
- device->TransmitMenuState(command.initiator);
- }
+ device->SetActiveSource();
+ device->TransmitActiveSource();
}
}
return false;
uint16_t iNewAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
CCECBusDevice *newActiveDevice = GetDeviceByPhysicalAddress(iNewAddress);
if (newActiveDevice)
- m_processor->SetStreamPath(newActiveDevice->GetPhysicalAddress(false));
+ newActiveDevice->SetActiveSource();
return ((CCECAudioSystem *) device)->TransmitSetSystemAudioMode(command.initiator);
}
else
bool CCECCommandHandler::HandleTextViewOn(const cec_command &command)
{
- m_processor->SetStreamPath(m_processor->m_busDevices[command.initiator]->GetPhysicalAddress(false));
+ m_processor->m_busDevices[command.initiator]->SetActiveSource();
return true;
}