repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
handle windows away mode in cectray. treated like standby
[deb_libcec.git]
/
src
/
lib
/
implementations
/
CECCommandHandler.cpp
diff --git
a/src/lib/implementations/CECCommandHandler.cpp
b/src/lib/implementations/CECCommandHandler.cpp
index b742f49898001f437d64478d0e8b6f7593c7e4dc..29d1ffbcc7444b9725555de8f7f76d7d1b28fa58 100644
(file)
--- a/
src/lib/implementations/CECCommandHandler.cpp
+++ b/
src/lib/implementations/CECCommandHandler.cpp
@@
-257,6
+257,14
@@
int CCECCommandHandler::HandleDeviceVendorCommandWithId(const cec_command & UNUS
int CCECCommandHandler::HandleDeviceVendorId(const cec_command &command)
{
SetVendorId(command);
int CCECCommandHandler::HandleDeviceVendorId(const cec_command &command)
{
SetVendorId(command);
+
+ if (command.initiator == CECDEVICE_TV)
+ {
+ CCECBusDevice* primary = m_processor->GetPrimaryDevice();
+ if (primary)
+ primary->TransmitVendorID(CECDEVICE_BROADCAST, false, false);
+ }
+
return COMMAND_HANDLED;
}
return COMMAND_HANDLED;
}
@@
-455,6
+463,13
@@
int CCECCommandHandler::HandleReportPhysicalAddress(const cec_command &command)
{
uint16_t iNewAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
SetPhysicalAddress(command.initiator, iNewAddress);
{
uint16_t iNewAddress = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
SetPhysicalAddress(command.initiator, iNewAddress);
+
+ if (command.initiator == CECDEVICE_TV)
+ {
+ CCECBusDevice* primary = m_processor->GetPrimaryDevice();
+ if (primary)
+ primary->TransmitPhysicalAddress(false);
+ }
return COMMAND_HANDLED;
}
return CEC_ABORT_REASON_INVALID_OPERAND;
return COMMAND_HANDLED;
}
return CEC_ABORT_REASON_INVALID_OPERAND;
@@
-580,7
+595,10
@@
int CCECCommandHandler::HandleSetStreamPath(const cec_command &command)
if (device->IsHandledByLibCEC() && !device->IsActiveSource())
device->ActivateSource();
else
if (device->IsHandledByLibCEC() && !device->IsActiveSource())
device->ActivateSource();
else
+ {
device->MarkAsActiveSource();
device->MarkAsActiveSource();
+ device->TransmitActiveSource(true);
+ }
return COMMAND_HANDLED;
}
}
return COMMAND_HANDLED;
}
}
@@
-910,12
+928,12
@@
bool CCECCommandHandler::TransmitRequestPhysicalAddress(const cec_logical_addres
return Transmit(command, !bWaitForResponse, false);
}
return Transmit(command, !bWaitForResponse, false);
}
-bool CCECCommandHandler::TransmitRequestPowerStatus(const cec_logical_address iInitiator, const cec_logical_address iDestination, bool bWaitForResponse /* = true */)
+bool CCECCommandHandler::TransmitRequestPowerStatus(const cec_logical_address iInitiator, const cec_logical_address iDestination, bool b
Update, bool b
WaitForResponse /* = true */)
{
if (iDestination == CECDEVICE_TV)
{
int64_t now(GetTimeMs());
{
if (iDestination == CECDEVICE_TV)
{
int64_t now(GetTimeMs());
- if (now - m_iPowerStatusRequested < REQUEST_POWER_STATUS_TIMEOUT)
+ if (
!bUpdate &&
now - m_iPowerStatusRequested < REQUEST_POWER_STATUS_TIMEOUT)
return true;
m_iPowerStatusRequested = now;
}
return true;
m_iPowerStatusRequested = now;
}
@@
-1207,7
+1225,7
@@
bool CCECCommandHandler::ActivateSource(bool bTransmitDelayedCommandsOnly /* = f
bool bTvPresent = (tv && tv->GetStatus() == CEC_DEVICE_STATUS_PRESENT);
bool bActiveSourceFailed(false);
if (bTvPresent)
bool bTvPresent = (tv && tv->GetStatus() == CEC_DEVICE_STATUS_PRESENT);
bool bActiveSourceFailed(false);
if (bTvPresent)
- bActiveSourceFailed = !
m_busDevice->TransmitImageViewOn(
);
+ bActiveSourceFailed = !
tv->PowerOn(m_busDevice->GetLogicalAddress()
);
else
LIB_CEC->AddLog(CEC_LOG_DEBUG, "TV not present, not sending 'image view on'");
else
LIB_CEC->AddLog(CEC_LOG_DEBUG, "TV not present, not sending 'image view on'");