X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCECC.cpp;h=579d796ac6883e13e4e5dbcb70185e21ff060a54;hb=2efa39b7105c98a2219a12e5ab3432b77e042112;hp=dc63c2927794ae768d1fd0698af1686036f6d778;hpb=2f37cb68d7f3c71c38065e0e830c564a01b6caf3;p=deb_libcec.git diff --git a/src/lib/LibCECC.cpp b/src/lib/LibCECC.cpp index dc63c29..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(); @@ -247,6 +247,27 @@ uint64_t cec_get_device_vendor_id(cec_logical_address iLogicalAddress) return 0; } +uint16_t cec_get_device_physical_address(cec_logical_address iLogicalAddress) +{ + if (cec_parser) + return cec_parser->GetDevicePhysicalAddress(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) @@ -291,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; } @@ -326,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; }