X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCECC.cpp;h=579d796ac6883e13e4e5dbcb70185e21ff060a54;hb=2efa39b7105c98a2219a12e5ab3432b77e042112;hp=ffa8f5561dfc7fd3c4755c1ac1bf652a5148c0a5;hpb=eab72c4079c8f106f825f799d1f2f6218066d3ed;p=deb_libcec.git diff --git a/src/lib/LibCECC.cpp b/src/lib/LibCECC.cpp index ffa8f55..579d796 100644 --- a/src/lib/LibCECC.cpp +++ b/src/lib/LibCECC.cpp @@ -95,7 +95,7 @@ int cec_start_bootloader(void) return -1; } -int8_t cec_get_min_version(void) +int8_t cec_get_min_lib_version(void) { if (cec_parser) return cec_parser->GetMinLibVersion(); @@ -254,6 +254,20 @@ uint16_t cec_get_device_physical_address(cec_logical_address iLogicalAddress) return 0; } +cec_logical_address cec_get_active_source(void) +{ + if (cec_parser) + return cec_parser->GetActiveSource(); + return CECDEVICE_UNKNOWN; +} + +int cec_is_active_source(cec_logical_address iAddress) +{ + if (cec_parser) + return cec_parser->IsActiveSource(iAddress); + return false; +} + cec_power_status cec_get_device_power_status(cec_logical_address iLogicalAddress) { if (cec_parser) @@ -298,24 +312,24 @@ int cec_set_hdmi_port(cec_logical_address iBaseDevice, uint8_t iPort) return -1; } -int cec_volume_up(int bWait) +int cec_volume_up(int bSendRelease) { if (cec_parser) - return cec_parser->VolumeUp(bWait == 1); + return cec_parser->VolumeUp(bSendRelease == 1); return -1; } -int cec_volume_down(int bWait) +int cec_volume_down(int bSendRelease) { if (cec_parser) - return cec_parser->VolumeDown(bWait == 1); + return cec_parser->VolumeDown(bSendRelease == 1); return -1; } -int cec_mute_audio(int bWait) +int cec_mute_audio(int bSendRelease) { if (cec_parser) - return cec_parser->MuteAudio(bWait == 1); + return cec_parser->MuteAudio(bSendRelease == 1); return -1; } @@ -333,14 +347,14 @@ int cec_send_key_release(cec_logical_address iDestination, int bWait) return -1; } -cec_osd_name cec_get_osd_name(cec_logical_address iAddress) +cec_osd_name cec_get_device_osd_name(cec_logical_address iAddress) { cec_osd_name retVal; retVal.device = iAddress; retVal.name[0] = 0; if (cec_parser) - retVal = cec_parser->GetOSDName(iAddress); + retVal = cec_parser->GetDeviceOSDName(iAddress); return retVal; }