X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCEC.cpp;h=97427958f9df8d1f65cc0f565d6840ace93cf4fe;hb=dfc63a477abf728b24cc8fad520a6e60d7c129cf;hp=0c4b89de220d0a7ebff81bc0f4e5189d20a84718;hpb=a11148b7b6b9fb9b1aed569c4445958d4e91b860;p=deb_libcec.git diff --git a/src/lib/LibCEC.cpp b/src/lib/LibCEC.cpp index 0c4b89d..9742795 100644 --- a/src/lib/LibCEC.cpp +++ b/src/lib/LibCEC.cpp @@ -168,6 +168,11 @@ bool CLibCEC::SetLogicalAddress(cec_logical_address iLogicalAddress) return m_cec ? m_cec->SetLogicalAddress(iLogicalAddress) : false; } +bool CLibCEC::SetPhysicalAddress(uint16_t iPhysicalAddress) +{ + return m_cec ? m_cec->SetPhysicalAddress(iPhysicalAddress) : false; +} + bool CLibCEC::PowerOnDevices(cec_logical_address address /* = CECDEVICE_TV */) { return m_cec ? m_cec->PowerOnDevices(address) : false; @@ -188,6 +193,16 @@ bool CLibCEC::SetInactiveView(void) return m_cec ? m_cec->SetInactiveView() : false; } +bool CLibCEC::SetOSDString(cec_logical_address iLogicalAddress, cec_display_control duration, const char *strMessage) +{ + return m_cec ? m_cec->SetOSDString(iLogicalAddress, duration, strMessage) : false; +} + +bool CLibCEC::SwitchMonitoring(bool bEnable) +{ + return m_cec ? m_cec->SwitchMonitoring(bEnable) : false; +} + void CLibCEC::AddLog(cec_log_level level, const string &strMessage) { if (m_cec) @@ -241,6 +256,13 @@ void CLibCEC::SetCurrentButton(cec_user_control_code iButtonCode) { m_iCurrentButton = iButtonCode; m_buttontime = GetTimeMs(); + + /* push keypress to the keybuffer with 0 duration. + push another press to the keybuffer with the duration set when the button is released */ + cec_keypress key; + key.duration = 0; + key.keycode = m_iCurrentButton; + m_keyBuffer.Push(key); } void * CECCreate(const char *strDeviceName, CEC::cec_logical_address iLogicalAddress /*= CEC::CECDEVICE_PLAYBACKDEVICE1 */, uint16_t iPhysicalAddress /* = CEC_DEFAULT_PHYSICAL_ADDRESS */)