+ {
+ SetSLInitialised();
+ device->MarkAsActiveSource();
+ device->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
+ device->TransmitPowerState(command.initiator, true);
+
+ CEvent::Sleep(2000);
+ device->SetPowerStatus(CEC_POWER_STATUS_ON);
+ device->TransmitPowerState(command.initiator, false);
+ device->TransmitPhysicalAddress(false);
+
+ if (device->IsActiveSource())
+ ActivateSource();
+ }
+}
+void CSLCommandHandler::HandleVendorCommandPowerOnStatus(const cec_command &command)
+{
+ if (command.destination != CECDEVICE_BROADCAST)
+ {
+ CCECBusDevice *device = m_processor->GetPrimaryDevice();
+ if (device)
+ {
+ device->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
+ device->TransmitPowerState(command.initiator, true);
+ device->SetPowerStatus(CEC_POWER_STATUS_ON);
+ }
+ }
+}
+
+void CSLCommandHandler::HandleVendorCommandSLConnect(const cec_command &command)
+{
+ SetSLInitialised();
+ TransmitVendorCommandSetDeviceMode(command.destination, command.initiator, CEC_DEVICE_TYPE_RECORDING_DEVICE);
+
+
+ if (m_processor->IsActiveSource(command.destination) && m_processor->IsHandledByLibCEC(command.destination))
+ {
+ CCECBusDevice* dev = m_processor->GetDevice(command.destination);
+ CCECPlaybackDevice* pb = dev->AsPlaybackDevice();
+ if (pb)
+ pb->TransmitDeckStatus(command.initiator, true);
+ dev->TransmitPowerState(command.initiator, true);
+ }
+}
+
+void CSLCommandHandler::TransmitVendorCommandSetDeviceMode(const cec_logical_address iSource, const cec_logical_address iDestination, const cec_device_type type)
+{
+ cec_command response;
+ cec_command::Format(response, iSource, iDestination, CEC_OPCODE_VENDOR_COMMAND);
+ response.PushBack(SL_COMMAND_SET_DEVICE_MODE);
+ response.PushBack((uint8_t)type);
+ Transmit(response, false, true);
+}