repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: forgot the return value in HanldeFeatureAbort()
[deb_libcec.git]
/
src
/
lib
/
implementations
/
SLCommandHandler.cpp
diff --git
a/src/lib/implementations/SLCommandHandler.cpp
b/src/lib/implementations/SLCommandHandler.cpp
index fbc6b52dcb0d8879234e7bebc77a4a7dca3a9d8e..f86a644f2db452804a19baa3c32f4e37fa83d7ba 100644
(file)
--- a/
src/lib/implementations/SLCommandHandler.cpp
+++ b/
src/lib/implementations/SLCommandHandler.cpp
@@
-54,7
+54,7
@@
CSLCommandHandler::CSLCommandHandler(CCECBusDevice *busDevice) :
m_bVendorIdSent(false)
{
/* TODO set to powered off until we fixed the connect on start loop issue */
m_bVendorIdSent(false)
{
/* TODO set to powered off until we fixed the connect on start loop issue */
- m_processor->
m_busDevices[m_processor->GetLogicalAddresses().primary]
->m_powerStatus = CEC_POWER_STATUS_STANDBY;
+ m_processor->
GetPrimaryDevice()
->m_powerStatus = CEC_POWER_STATUS_STANDBY;
}
bool CSLCommandHandler::HandleVendorCommand(const cec_command &command)
}
bool CSLCommandHandler::HandleVendorCommand(const cec_command &command)
@@
-119,7
+119,7
@@
void CSLCommandHandler::TransmitVendorCommand0205(const cec_logical_address iSou
Transmit(response);
}
Transmit(response);
}
-void CSLCommandHandler::TransmitVendorCommand0
4
(const cec_logical_address iSource, const cec_logical_address iDestination)
+void CSLCommandHandler::TransmitVendorCommand0
5
(const cec_logical_address iSource, const cec_logical_address iDestination)
{
m_bSLEnabled = true;
cec_command response;
{
m_bSLEnabled = true;
cec_command response;
@@
-131,7
+131,7
@@
void CSLCommandHandler::TransmitVendorCommand04(const cec_logical_address iSourc
void CSLCommandHandler::HandleVendorCommandPowerOn(const cec_command &command)
{
void CSLCommandHandler::HandleVendorCommandPowerOn(const cec_command &command)
{
- CCECBusDevice *device = m_processor->
m_busDevices[m_processor->GetLogicalAddresses().primary]
;
+ CCECBusDevice *device = m_processor->
GetPrimaryDevice()
;
if (device)
{
m_bSLEnabled = true;
if (device)
{
m_bSLEnabled = true;
@@
-145,9
+145,9
@@
void CSLCommandHandler::HandleVendorCommandPowerOn(const cec_command &command)
void CSLCommandHandler::HandleVendorCommandSLConnect(const cec_command &command)
{
m_bSLEnabled = true;
void CSLCommandHandler::HandleVendorCommandSLConnect(const cec_command &command)
{
m_bSLEnabled = true;
+ m_processor->m_busDevices[command.initiator]->SetActiveSource();
m_processor->m_busDevices[command.destination]->TransmitActiveSource();
m_processor->m_busDevices[command.destination]->TransmitActiveSource();
- m_processor->SetStreamPath(m_processor->m_busDevices[command.destination]->GetPhysicalAddress(false));
- TransmitVendorCommand04(command.destination, command.initiator);
+ TransmitVendorCommand05(command.destination, command.initiator);
TransmitDeckStatus(command.initiator);
}
TransmitDeckStatus(command.initiator);
}
@@
-165,7
+165,7
@@
void CSLCommandHandler::HandleVendorCommandPowerOnStatus(const cec_command &comm
void CSLCommandHandler::TransmitDeckStatus(const cec_logical_address iDestination)
{
/* set deck status for the playback device */
void CSLCommandHandler::TransmitDeckStatus(const cec_logical_address iDestination)
{
/* set deck status for the playback device */
- CCECBusDevice *primary = m_processor->
m_busDevices[m_processor->GetLogicalAddresses().primary]
;
+ CCECBusDevice *primary = m_processor->
GetPrimaryDevice()
;
if (primary->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE || primary->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE)
{
((CCECPlaybackDevice *)primary)->SetDeckStatus(CEC_DECK_INFO_OTHER_STATUS_LG);
if (primary->GetType() == CEC_DEVICE_TYPE_PLAYBACK_DEVICE || primary->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE)
{
((CCECPlaybackDevice *)primary)->SetDeckStatus(CEC_DECK_INFO_OTHER_STATUS_LG);
@@
-246,6
+246,10
@@
bool CSLCommandHandler::HandleReceiveFailed(void)
bool CSLCommandHandler::InitHandler(void)
{
bool CSLCommandHandler::InitHandler(void)
{
+ if (m_bHandlerInited)
+ return true;
+ m_bHandlerInited = true;
+
m_processor->SetStandardLineTimeout(3);
m_processor->SetRetryLineTimeout(3);
m_processor->SetStandardLineTimeout(3);
m_processor->SetRetryLineTimeout(3);
@@
-254,9
+258,12
@@
bool CSLCommandHandler::InitHandler(void)
m_iTransmitRetries = 4;
m_iTransmitTimeout = 500;
m_iTransmitRetries = 4;
m_iTransmitTimeout = 500;
- CCECBusDevice *primary = m_processor->
m_busDevices[m_processor->GetLogicalAddresses().primary]
;
+ CCECBusDevice *primary = m_processor->
GetPrimaryDevice()
;
if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
if (m_busDevice->GetLogicalAddress() != primary->GetLogicalAddress())
+ {
primary->SetVendorId(CEC_VENDOR_LG, false);
primary->SetVendorId(CEC_VENDOR_LG, false);
+ primary->TransmitVendorID(CECDEVICE_TV, false);
+ }
if (m_busDevice->GetLogicalAddress() == CECDEVICE_TV)
{
if (m_busDevice->GetLogicalAddress() == CECDEVICE_TV)
{
@@
-286,6
+293,7
@@
bool CSLCommandHandler::InitHandler(void)
device->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE))
{
((CCECPlaybackDevice *)device)->SetDeckStatus(CEC_DECK_INFO_OTHER_STATUS_LG);
device->GetType() == CEC_DEVICE_TYPE_RECORDING_DEVICE))
{
((CCECPlaybackDevice *)device)->SetDeckStatus(CEC_DECK_INFO_OTHER_STATUS_LG);
+ ((CCECPlaybackDevice *)device)->TransmitDeckStatus(CECDEVICE_TV);
}
}
}
}
}
}