X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCEC.cpp;h=b81d24b9b5492fbe9091e468b80d23b34150ede3;hb=f46dc8465450028c44c7cb0c253ab8b06dc1bcf4;hp=2e9dac01c7071c622123f271bf2fc730a9462a65;hpb=04e637f9e37a0bcbd6aacc51746bb548293007ef;p=deb_libcec.git diff --git a/src/lib/LibCEC.cpp b/src/lib/LibCEC.cpp index 2e9dac0..b81d24b 100644 --- a/src/lib/LibCEC.cpp +++ b/src/lib/LibCEC.cpp @@ -203,7 +203,7 @@ bool CLibCEC::SetDeckInfo(cec_deck_info info, bool bSendUpdate /* = true */) bool CLibCEC::SetInactiveView(void) { - return m_cec ? m_cec->SetInactiveView() : false; + return m_cec ? m_cec->TransmitInactiveSource() : false; } bool CLibCEC::SetMenuState(cec_menu_state state, bool bSendUpdate /* = true */) @@ -261,6 +261,7 @@ bool CLibCEC::PollDevice(cec_logical_address iAddress) cec_logical_addresses CLibCEC::GetActiveDevices(void) { cec_logical_addresses addresses; + addresses.Clear(); if (m_cec) addresses = m_cec->GetActiveDevices(); return addresses; @@ -280,28 +281,54 @@ bool CLibCEC::IsActiveDeviceType(cec_device_type type) return false; } -uint8_t CLibCEC::VolumeUp(void) +uint8_t CLibCEC::VolumeUp(bool bWait /* = true */) { if (m_cec) - return m_cec->VolumeUp(); + return m_cec->VolumeUp(bWait); return 0; } -uint8_t CLibCEC::VolumeDown(void) +uint8_t CLibCEC::VolumeDown(bool bWait /* = true */) { if (m_cec) - return m_cec->VolumeDown(); + return m_cec->VolumeDown(bWait); return 0; } -uint8_t CLibCEC::MuteAudio(void) +uint8_t CLibCEC::MuteAudio(bool bWait /* = true */) { if (m_cec) - return m_cec->MuteAudio(); + return m_cec->MuteAudio(bWait); return 0; } +bool CLibCEC::SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait /* = false */) +{ + if (m_cec) + return m_cec->SendKeypress(iDestination, key, bWait); + return false; +} + +bool CLibCEC::SendKeyRelease(cec_logical_address iDestination, bool bWait /* = false */) +{ + if (m_cec) + return m_cec->SendKeyRelease(iDestination, bWait); + return false; +} + +cec_osd_name CLibCEC::GetOSDName(cec_logical_address iAddress) +{ + cec_osd_name retVal; + retVal.device = iAddress; + retVal.name[0] = 0; + + if (m_cec) + retVal = m_cec->GetDeviceOSDName(iAddress); + + return retVal; +} + void CLibCEC::AddLog(cec_log_level level, const string &strMessage) { if (m_cec)