bool CCECCommandHandler::HandleDeviceVendorCommandWithId(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination))
m_processor->TransmitAbort(command.initiator, command.opcode, CEC_ABORT_REASON_REFUSED);
return true;
bool CCECCommandHandler::HandleGetCecVersion(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination))
{
CCECBusDevice *device = GetDevice(command.destination);
if (device)
bool CCECCommandHandler::HandleGiveAudioStatus(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination))
{
CCECBusDevice *device = GetDevice(command.destination);
if (device && device->GetType() == CEC_DEVICE_TYPE_AUDIO_SYSTEM)
bool CCECCommandHandler::HandleGiveDeckStatus(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination))
{
CCECBusDevice *device = GetDevice(command.destination);
if (device && (device->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE || device->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE))
bool CCECCommandHandler::HandleGiveDevicePowerStatus(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination))
{
CCECBusDevice *device = GetDevice(command.destination);
if (device)
bool CCECCommandHandler::HandleGiveDeviceVendorId(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination))
{
CCECBusDevice *device = GetDevice(command.destination);
if (device)
bool CCECCommandHandler::HandleGiveOSDName(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination))
{
CCECBusDevice *device = GetDevice(command.destination);
if (device)
bool CCECCommandHandler::HandleGivePhysicalAddress(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination))
{
CCECBusDevice *device = GetDevice(command.destination);
if (device)
bool CCECCommandHandler::HandleGiveSystemAudioModeStatus(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination))
{
CCECBusDevice *device = GetDevice(command.destination);
if (device && device->GetType() == CEC_DEVICE_TYPE_AUDIO_SYSTEM)
bool CCECCommandHandler::HandleMenuRequest(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination))
{
if (command.parameters[0] == CEC_MENU_REQUEST_TYPE_QUERY)
{
bool CCECCommandHandler::HandleRequestActiveSource(const cec_command &command)
{
- CStdString strLog;
- strLog.Format(">> %i requests active source", (uint8_t) command.initiator);
- m_busDevice->AddLog(CEC_LOG_DEBUG, strLog.c_str());
+ if (m_processor->IsStarted())
+ {
+ CStdString strLog;
+ strLog.Format(">> %i requests active source", (uint8_t) command.initiator);
+ m_busDevice->AddLog(CEC_LOG_DEBUG, strLog.c_str());
- vector<CCECBusDevice *> devices;
- for (int iDevicePtr = (int)GetMyDevices(devices)-1; iDevicePtr >=0; iDevicePtr--)
- devices[iDevicePtr]->TransmitActiveSource();
+ vector<CCECBusDevice *> devices;
+ for (int iDevicePtr = (int)GetMyDevices(devices)-1; iDevicePtr >=0; iDevicePtr--)
+ devices[iDevicePtr]->TransmitActiveSource();
- return true;
+ return true;
+ }
+ return false;
}
bool CCECCommandHandler::HandleRoutingChange(const cec_command &command)
bool CCECCommandHandler::HandleSetStreamPath(const cec_command &command)
{
- if (command.parameters.size >= 2)
+ if (m_processor->IsStarted() && command.parameters.size >= 2)
{
uint16_t iStreamAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
CStdString strLog;
bool CCECCommandHandler::HandleSystemAudioModeRequest(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination))
{
CCECBusDevice *device = GetDevice(command.destination);
if (device && device->GetType() == CEC_DEVICE_TYPE_AUDIO_SYSTEM)
bool CCECCommandHandler::HandleUserControlPressed(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination) && command.parameters.size > 0)
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination) && command.parameters.size > 0)
{
m_processor->AddKey();
bool CCECCommandHandler::HandleUserControlRelease(const cec_command &command)
{
- if (m_busDevice->MyLogicalAddressContains(command.destination))
+ if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination))
m_processor->AddKey();
return true;