repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed: only send an active source message when receiving a routing change to an addre...
[deb_libcec.git]
/
src
/
lib
/
devices
/
CECBusDevice.cpp
diff --git
a/src/lib/devices/CECBusDevice.cpp
b/src/lib/devices/CECBusDevice.cpp
index 25332b33dad1478bc2ec67358ba5ff881fefc76e..4358324db468a2c4e95c03f931319c02964585fd 100644
(file)
--- a/
src/lib/devices/CECBusDevice.cpp
+++ b/
src/lib/devices/CECBusDevice.cpp
@@
-42,6
+42,7
@@
#include "lib/implementations/PHCommandHandler.h"
#include "lib/implementations/RLCommandHandler.h"
#include "lib/implementations/RHCommandHandler.h"
#include "lib/implementations/PHCommandHandler.h"
#include "lib/implementations/RLCommandHandler.h"
#include "lib/implementations/RHCommandHandler.h"
+#include "lib/implementations/AQCommandHandler.h"
#include "lib/LibCEC.h"
#include "lib/CECTypeUtils.h"
#include "lib/platform/util/timeutils.h"
#include "lib/LibCEC.h"
#include "lib/CECTypeUtils.h"
#include "lib/platform/util/timeutils.h"
@@
-145,6
+146,9
@@
bool CCECBusDevice::ReplaceHandler(bool bActivateSource /* = true */)
case CEC_VENDOR_ONKYO:
m_handler = new CRHCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending);
break;
case CEC_VENDOR_ONKYO:
m_handler = new CRHCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending);
break;
+ case CEC_VENDOR_SHARP:
+ m_handler = new CAQCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending);
+ break;
default:
m_handler = new CCECCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending);
break;
default:
m_handler = new CCECCommandHandler(this, iTransmitTimeout, iTransmitWait, iTransmitRetries, iActiveSourcePending);
break;
@@
-609,7
+613,7
@@
cec_power_status CCECBusDevice::GetPowerStatus(const cec_logical_address initiat
if (bRequestUpdate)
{
CheckVendorIdRequested(initiator);
if (bRequestUpdate)
{
CheckVendorIdRequested(initiator);
- RequestPowerStatus(initiator);
+ RequestPowerStatus(initiator
, bUpdate
);
}
CLockObject lock(m_mutex);
}
CLockObject lock(m_mutex);
@@
-646,7
+650,7
@@
bool CCECBusDevice::ImageViewOnSent(void)
return m_bImageViewOnSent;
}
return m_bImageViewOnSent;
}
-bool CCECBusDevice::RequestPowerStatus(const cec_logical_address initiator, bool bWaitForResponse /* = true */)
+bool CCECBusDevice::RequestPowerStatus(const cec_logical_address initiator, bool b
Update, bool b
WaitForResponse /* = true */)
{
bool bReturn(false);
{
bool bReturn(false);
@@
-654,7
+658,7
@@
bool CCECBusDevice::RequestPowerStatus(const cec_logical_address initiator, bool
!IsUnsupportedFeature(CEC_OPCODE_GIVE_DEVICE_POWER_STATUS))
{
MarkBusy();
!IsUnsupportedFeature(CEC_OPCODE_GIVE_DEVICE_POWER_STATUS))
{
MarkBusy();
- bReturn = m_handler->TransmitRequestPowerStatus(initiator, m_iLogicalAddress, bWaitForResponse);
+ bReturn = m_handler->TransmitRequestPowerStatus(initiator, m_iLogicalAddress, b
Update, b
WaitForResponse);
if (!bReturn)
SetPowerStatus(CEC_POWER_STATUS_UNKNOWN);
MarkReady();
if (!bReturn)
SetPowerStatus(CEC_POWER_STATUS_UNKNOWN);
MarkReady();
@@
-1143,14
+1147,10
@@
void CCECBusDevice::SetActiveRoute(uint16_t iRoute)
return;
CCECBusDevice* newRoute = m_processor->GetDeviceByPhysicalAddress(iRoute, true);
return;
CCECBusDevice* newRoute = m_processor->GetDeviceByPhysicalAddress(iRoute, true);
- if (newRoute)
+ if (newRoute
&& newRoute->IsHandledByLibCEC()
)
{
// we were made the active source, send notification
{
// we were made the active source, send notification
- if (newRoute->IsHandledByLibCEC())
- newRoute->ActivateSource();
- // another device was made active
- else
- newRoute->MarkAsActiveSource();
+ newRoute->ActivateSource();
}
}
}
}