repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cec: include the ack timeout in the cec_command struct
[deb_libcec.git]
/
src
/
lib
/
LibCEC.cpp
diff --git
a/src/lib/LibCEC.cpp
b/src/lib/LibCEC.cpp
index 97427958f9df8d1f65cc0f565d6840ace93cf4fe..bf5de8a9e969b0c06730290c022ff4bd39f63fe0 100644
(file)
--- a/
src/lib/LibCEC.cpp
+++ b/
src/lib/LibCEC.cpp
@@
-35,6
+35,7
@@
#include "AdapterCommunication.h"
#include "AdapterDetection.h"
#include "CECProcessor.h"
#include "AdapterCommunication.h"
#include "AdapterDetection.h"
#include "CECProcessor.h"
+#include "devices/CECBusDevice.h"
#include "util/StdString.h"
#include "platform/timeutils.h"
#include "util/StdString.h"
#include "platform/timeutils.h"
@@
-158,9
+159,9
@@
bool CLibCEC::GetNextCommand(cec_command *command)
return m_commandBuffer.Pop(*command);
}
return m_commandBuffer.Pop(*command);
}
-bool CLibCEC::Transmit(const cec_command &data
, bool bWaitForAck /* = true */
)
+bool CLibCEC::Transmit(const cec_command &data)
{
{
- return m_cec ? m_cec->Transmit(data
, bWaitForAck
) : false;
+ return m_cec ? m_cec->Transmit(data) : false;
}
bool CLibCEC::SetLogicalAddress(cec_logical_address iLogicalAddress)
}
bool CLibCEC::SetLogicalAddress(cec_logical_address iLogicalAddress)
@@
-175,12
+176,12
@@
bool CLibCEC::SetPhysicalAddress(uint16_t iPhysicalAddress)
bool CLibCEC::PowerOnDevices(cec_logical_address address /* = CECDEVICE_TV */)
{
bool CLibCEC::PowerOnDevices(cec_logical_address address /* = CECDEVICE_TV */)
{
- return m_cec
? m_cec->PowerOnDevices(address
) : false;
+ return m_cec
&& address >= CECDEVICE_TV && address <= CECDEVICE_BROADCAST ? m_cec->m_busDevices[(uint8_t)address]->PowerOn(
) : false;
}
bool CLibCEC::StandbyDevices(cec_logical_address address /* = CECDEVICE_BROADCAST */)
{
}
bool CLibCEC::StandbyDevices(cec_logical_address address /* = CECDEVICE_BROADCAST */)
{
- return m_cec
? m_cec->StandbyDevices(address
) : false;
+ return m_cec
&& address >= CECDEVICE_TV && address <= CECDEVICE_BROADCAST ? m_cec->m_busDevices[(uint8_t)address]->Standby(
) : false;
}
bool CLibCEC::SetActiveView(void)
}
bool CLibCEC::SetActiveView(void)
@@
-195,7
+196,7
@@
bool CLibCEC::SetInactiveView(void)
bool CLibCEC::SetOSDString(cec_logical_address iLogicalAddress, cec_display_control duration, const char *strMessage)
{
bool CLibCEC::SetOSDString(cec_logical_address iLogicalAddress, cec_display_control duration, const char *strMessage)
{
- return m_cec
? m_cec->SetOSDString(iLogicalAddress,
duration, strMessage) : false;
+ return m_cec
&& iLogicalAddress >= CECDEVICE_TV && iLogicalAddress <= CECDEVICE_BROADCAST ? m_cec->m_busDevices[(uint8_t)iLogicalAddress]->SetOSDString(
duration, strMessage) : false;
}
bool CLibCEC::SwitchMonitoring(bool bEnable)
}
bool CLibCEC::SwitchMonitoring(bool bEnable)
@@
-229,7
+230,7
@@
void CLibCEC::AddKey(void)
}
}
}
}
-void CLibCEC::AddCommand(cec_command &command)
+void CLibCEC::AddCommand(c
onst c
ec_command &command)
{
if (m_commandBuffer.Push(command))
{
{
if (m_commandBuffer.Push(command))
{