X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCEC.cpp;h=1366ff6cbcec92b6567ab0648e8a32cdeac3f87a;hb=e046c7bff238e90b4080f0604c00a45340b0b68c;hp=4a63051b885ad092949e2169af6bc94df3ec53cd;hpb=1113cb7d55328a6c15846955626187615a9ad02e;p=deb_libcec.git diff --git a/src/lib/LibCEC.cpp b/src/lib/LibCEC.cpp index 4a63051..1366ff6 100644 --- a/src/lib/LibCEC.cpp +++ b/src/lib/LibCEC.cpp @@ -222,6 +222,25 @@ uint64_t CLibCEC::GetDeviceVendorId(cec_logical_address iAddress) return 0; } +uint16_t CLibCEC::GetDevicePhysicalAddress(cec_logical_address iAddress) +{ + if (m_cec && iAddress >= CECDEVICE_TV && iAddress < CECDEVICE_BROADCAST) + return m_cec->GetDevicePhysicalAddress(iAddress); + return 0; +} + +cec_logical_address CLibCEC::GetActiveSource(void) +{ + return m_cec ? m_cec->GetActiveSource() : CECDEVICE_UNKNOWN; +} + +bool CLibCEC::IsActiveSource(cec_logical_address iAddress) +{ + if (m_cec && iAddress >= CECDEVICE_TV && iAddress < CECDEVICE_BROADCAST) + return m_cec->IsActiveSource(iAddress); + return false; +} + cec_power_status CLibCEC::GetDevicePowerStatus(cec_logical_address iAddress) { if (m_cec && iAddress >= CECDEVICE_TV && iAddress < CECDEVICE_BROADCAST) @@ -248,54 +267,54 @@ cec_logical_addresses CLibCEC::GetActiveDevices(void) bool CLibCEC::IsActiveDevice(cec_logical_address iAddress) { if (m_cec && iAddress >= CECDEVICE_TV && iAddress < CECDEVICE_BROADCAST) - return m_cec->IsActiveDevice(iAddress); + return m_cec->IsPresentDevice(iAddress); return false; } bool CLibCEC::IsActiveDeviceType(cec_device_type type) { if (m_cec && type >= CEC_DEVICE_TYPE_TV && type <= CEC_DEVICE_TYPE_AUDIO_SYSTEM) - return m_cec->IsActiveDeviceType(type); + return m_cec->IsPresentDeviceType(type); return false; } -uint8_t CLibCEC::VolumeUp(bool bWait /* = true */) +uint8_t CLibCEC::VolumeUp(bool bSendRelease /* = true */) { if (m_cec) - return m_cec->VolumeUp(bWait); + return m_cec->VolumeUp(bSendRelease); return 0; } -uint8_t CLibCEC::VolumeDown(bool bWait /* = true */) +uint8_t CLibCEC::VolumeDown(bool bSendRelease /* = true */) { if (m_cec) - return m_cec->VolumeDown(bWait); + return m_cec->VolumeDown(bSendRelease); return 0; } -uint8_t CLibCEC::MuteAudio(bool bWait /* = true */) +uint8_t CLibCEC::MuteAudio(bool bSendRelease /* = true */) { if (m_cec) - return m_cec->MuteAudio(bWait); + return m_cec->MuteAudio(bSendRelease); return 0; } -bool CLibCEC::SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait /* = false */) +bool CLibCEC::SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait /* = true */) { if (m_cec) - return m_cec->SendKeypress(iDestination, key, bWait); + return m_cec->TransmitKeypress(iDestination, key, bWait); return false; } -bool CLibCEC::SendKeyRelease(cec_logical_address iDestination, bool bWait /* = false */) +bool CLibCEC::SendKeyRelease(cec_logical_address iDestination, bool bWait /* = true */) { if (m_cec) - return m_cec->SendKeyRelease(iDestination, bWait); + return m_cec->TransmitKeyRelease(iDestination, bWait); return false; } -cec_osd_name CLibCEC::GetOSDName(cec_logical_address iAddress) +cec_osd_name CLibCEC::GetDeviceOSDName(cec_logical_address iAddress) { cec_osd_name retVal; retVal.device = iAddress;