m_cecVersion(CEC_VERSION_UNKNOWN),
m_deviceStatus(CEC_DEVICE_STATUS_UNKNOWN),
m_iHandlerUseCount(0),
- m_bAwaitingReceiveFailed(false)
+ m_bAwaitingReceiveFailed(false),
+ m_bVendorIdRequested(false)
{
m_handler = new CCECCommandHandler(this);
}
if (bRequestUpdate)
+ {
+ CheckVendorIdRequested();
RequestCecVersion();
+ }
CLockObject lock(m_mutex);
return m_cecVersion;
}
if (bRequestUpdate)
+ {
+ CheckVendorIdRequested();
RequestMenuLanguage();
+ }
CLockObject lock(m_mutex);
return m_menuLanguage;
}
if (bRequestUpdate)
+ {
+ CheckVendorIdRequested();
RequestOSDName();
+ }
CLockObject lock(m_mutex);
return m_strDeviceName;
(m_iPhysicalAddress == 0xFFFF || bUpdate);
}
- if (bRequestUpdate && !RequestPhysicalAddress())
- CLibCEC::AddLog(CEC_LOG_ERROR, "failed to request the physical address");
+ if (bRequestUpdate)
+ {
+ CheckVendorIdRequested();
+ if (!RequestPhysicalAddress())
+ CLibCEC::AddLog(CEC_LOG_ERROR, "failed to request the physical address");
+ }
CLockObject lock(m_mutex);
return m_iPhysicalAddress;
}
if (bRequestUpdate)
+ {
+ CheckVendorIdRequested();
RequestPowerStatus();
+ }
CLockObject lock(m_mutex);
return m_powerStatus;
return bReturn;
}
+void CCECBusDevice::CheckVendorIdRequested(void)
+{
+ bool bRequestVendorId(false);
+ {
+ CLockObject lock(m_mutex);
+ bRequestVendorId = !m_bVendorIdRequested;
+ m_bVendorIdRequested = true;
+ }
+
+ if (bRequestVendorId)
+ {
+ ReplaceHandler(false);
+ GetVendorId();
+ }
+}
+
//@}
virtual bool TransmitKeyRelease(bool bWait = true);
protected:
+ void CheckVendorIdRequested(void);
bool ReplaceHandler(bool bActivateSource = true);
void MarkBusy(void);
void MarkReady(void);
PLATFORM::CEvent m_replacing;
unsigned m_iHandlerUseCount;
bool m_bAwaitingReceiveFailed;
+ bool m_bVendorIdRequested;
};
};