//@{
cec_version CCECBusDevice::GetCecVersion(bool bUpdate /* = false */)
{
- bool bIsPresent(GetStatus() == CEC_DEVICE_STATUS_PRESENT);
+ bool bIsPresent(GetStatus() == CEC_DEVICE_STATUS_PRESENT);
bool bRequestUpdate(false);
{
CLockObject lock(m_mutex);
bRequestUpdate = bIsPresent &&
- (bUpdate || m_cecVersion == CEC_VERSION_UNKNOWN);
+ (bUpdate || m_cecVersion == CEC_VERSION_UNKNOWN);
}
if (bRequestUpdate)
{
bool bReturn(false);
- if (!MyLogicalAddressContains(m_iLogicalAddress))
+ if (!MyLogicalAddressContains(m_iLogicalAddress) &&
+ !IsUnsupportedFeature(CEC_OPCODE_GET_CEC_VERSION))
{
MarkBusy();
CLibCEC::AddLog(CEC_LOG_NOTICE, "<< requesting CEC version of '%s' (%X)", GetLogicalAddressName(), m_iLogicalAddress);
cec_menu_language &CCECBusDevice::GetMenuLanguage(bool bUpdate /* = false */)
{
- bool bIsPresent(GetStatus() == CEC_DEVICE_STATUS_PRESENT);
+ bool bIsPresent(GetStatus() == CEC_DEVICE_STATUS_PRESENT);
bool bRequestUpdate(false);
{
CLockObject lock(m_mutex);
CStdString CCECBusDevice::GetOSDName(bool bUpdate /* = false */)
{
- bool bIsPresent(GetStatus() == CEC_DEVICE_STATUS_PRESENT);
+ bool bIsPresent(GetStatus() == CEC_DEVICE_STATUS_PRESENT);
bool bRequestUpdate(false);
{
CLockObject lock(m_mutex);
uint16_t CCECBusDevice::GetPhysicalAddress(bool bUpdate /* = false */)
{
- bool bIsPresent(GetStatus() == CEC_DEVICE_STATUS_PRESENT);
+ bool bIsPresent(GetStatus() == CEC_DEVICE_STATUS_PRESENT);
bool bRequestUpdate(false);
{
CLockObject lock(m_mutex);
cec_power_status CCECBusDevice::GetPowerStatus(bool bUpdate /* = false */)
{
- bool bIsPresent(GetStatus() == CEC_DEVICE_STATUS_PRESENT);
+ bool bIsPresent(GetStatus() == CEC_DEVICE_STATUS_PRESENT);
bool bRequestUpdate(false);
{
CLockObject lock(m_mutex);
cec_vendor_id CCECBusDevice::GetVendorId(bool bUpdate /* = false */)
{
- bool bIsPresent(GetStatus() == CEC_DEVICE_STATUS_PRESENT);
+ bool bIsPresent(GetStatus() == CEC_DEVICE_STATUS_PRESENT);
bool bRequestUpdate(false);
{
CLockObject lock(m_mutex);
bool CCECBusDevice::TransmitOSDString(cec_logical_address dest, cec_display_control duration, const char *strMessage)
{
bool bReturn(false);
- if (!IsUnsupportedFeature(CEC_OPCODE_SET_OSD_STRING))
+ if (!m_processor->m_busDevices[dest]->IsUnsupportedFeature(CEC_OPCODE_SET_OSD_STRING))
{
CLibCEC::AddLog(CEC_LOG_NOTICE, "<< %s (%X) -> %s (%X): display OSD message '%s'", GetLogicalAddressName(), m_iLogicalAddress, ToString(dest), dest, strMessage);
MarkBusy();
bool CCECBusDevice::IsUnsupportedFeature(cec_opcode opcode) const
{
- return m_unsupportedFeatures.find(opcode) != m_unsupportedFeatures.end();
+ bool bUnsupported = (m_unsupportedFeatures.find(opcode) != m_unsupportedFeatures.end());
+ if (bUnsupported)
+ CLibCEC::AddLog(CEC_LOG_NOTICE, "'%s' is marked as unsupported feature for device '%s'", ToString(opcode), GetLogicalAddressName());
+ return bUnsupported;
}
void CCECBusDevice::SetUnsupportedFeature(cec_opcode opcode)
{
+ CLibCEC::AddLog(CEC_LOG_DEBUG, "marking opcode '%s' as unsupported feature for device '%s'", ToString(opcode), GetLogicalAddressName());
m_unsupportedFeatures.insert(opcode);
}