* libCEC(R) is an original work, containing original code.
*
* libCEC(R) is a trademark of Pulse-Eight Limited.
* libCEC(R) is an original work, containing original code.
*
* libCEC(R) is a trademark of Pulse-Eight Limited.
-#include "../devices/CECBusDevice.h"
-#include "../devices/CECPlaybackDevice.h"
-#include "../CECProcessor.h"
-#include "../LibCEC.h"
+
+#include "lib/platform/util/timeutils.h"
+#include "lib/devices/CECBusDevice.h"
+#include "lib/devices/CECPlaybackDevice.h"
+#include "lib/CECProcessor.h"
+#include "lib/LibCEC.h"
CCECBusDevice *primary = m_processor->GetPrimaryDevice();
if (primary && primary->GetLogicalAddress() != CECDEVICE_UNREGISTERED)
{
CCECBusDevice *primary = m_processor->GetPrimaryDevice();
if (primary && primary->GetLogicalAddress() != CECDEVICE_UNREGISTERED)
{
{
/* start as 'in transition standby->on' */
primary->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
{
/* start as 'in transition standby->on' */
primary->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
if (command.parameters.size == 2)
{
uint16_t iAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
if (command.parameters.size == 2)
{
uint16_t iAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
CCECBusDevice *device = m_processor->GetDeviceByPhysicalAddress(iAddress);
if (device)
device->MarkAsActiveSource();
CCECBusDevice *device = m_processor->GetDeviceByPhysicalAddress(iAddress);
if (device)
device->MarkAsActiveSource();
- {
- CLockObject lock(m_SLMutex);
- m_bActiveSourceSent = false;
- }
- primary->TransmitPowerState(CECDEVICE_TV);
+ CLockObject lock(m_SLMutex);
+ m_bActiveSourceSent = false;
cec_command response;
cec_command::Format(response, initiator, command.initiator, CEC_OPCODE_FEATURE_ABORT);
cec_command response;
cec_command::Format(response, initiator, command.initiator, CEC_OPCODE_FEATURE_ABORT);
{
m_processor->GetPrimaryDevice()->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
TransmitVendorCommand0205(command.destination, command.initiator);
{
m_processor->GetPrimaryDevice()->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
TransmitVendorCommand0205(command.destination, command.initiator);
- device->TransmitPowerState(command.initiator);
- device->TransmitPhysicalAddress();
+ device->TransmitPowerState(command.initiator, false);
+ device->TransmitPhysicalAddress(false);
cec_command::Format(response, iSource, iDestination, CEC_OPCODE_VENDOR_COMMAND);
response.PushBack(SL_COMMAND_SET_DEVICE_MODE);
response.PushBack((uint8_t)type);
cec_command::Format(response, iSource, iDestination, CEC_OPCODE_VENDOR_COMMAND);
response.PushBack(SL_COMMAND_SET_DEVICE_MODE);
response.PushBack((uint8_t)type);
CCECBusDevice *device = GetDevice(command.destination);
if (device && device->GetCurrentPowerStatus() != CEC_POWER_STATUS_ON)
{
CCECBusDevice *device = GetDevice(command.destination);
if (device && device->GetCurrentPowerStatus() != CEC_POWER_STATUS_ON)
{
if (command.parameters.size == 0 && m_processor->GetPrimaryDevice()->GetCurrentPowerStatus() == CEC_POWER_STATUS_ON && !SLInitialised() &&
command.initiator == CECDEVICE_TV)
{
if (command.parameters.size == 0 && m_processor->GetPrimaryDevice()->GetCurrentPowerStatus() == CEC_POWER_STATUS_ON && !SLInitialised() &&
command.initiator == CECDEVICE_TV)
{
- m_processor->GetPrimaryDevice()->TransmitPowerState(command.initiator);
- m_processor->GetPrimaryDevice()->TransmitVendorID(CECDEVICE_BROADCAST, false);
+ m_processor->GetPrimaryDevice()->TransmitPowerState(command.initiator, false);
+ m_processor->GetPrimaryDevice()->TransmitVendorID(CECDEVICE_BROADCAST, false, false);
cec_command::Format(command, CECDEVICE_TV, iDestination, CEC_OPCODE_VENDOR_COMMAND);
command.PushBack(SL_COMMAND_POWER_ON);
command.PushBack(0);
cec_command::Format(command, CECDEVICE_TV, iDestination, CEC_OPCODE_VENDOR_COMMAND);
command.PushBack(SL_COMMAND_POWER_ON);
command.PushBack(0);