X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCECC.cpp;h=fdcc9e7a57bc0dcf4c2f239449272f93e2d47522;hb=2dbd78f8f765f83e98190c01a123c569aea7c5b6;hp=f1e80fa57df5af4491a2b607a6561fe219188717;hpb=a33794d8b865d4b1d7b82fbae70bdb7658129614;p=deb_libcec.git diff --git a/src/lib/LibCECC.cpp b/src/lib/LibCECC.cpp index f1e80fa..fdcc9e7 100644 --- a/src/lib/LibCECC.cpp +++ b/src/lib/LibCECC.cpp @@ -245,6 +245,7 @@ int cec_poll_device(cec_logical_address iLogicalAddress) cec_logical_addresses cec_get_active_devices(void) { cec_logical_addresses addresses; + addresses.Clear(); if (cec_parser) addresses = cec_parser->GetActiveDevices(); return addresses; @@ -264,10 +265,10 @@ int cec_is_active_device_type(cec_device_type type) return -1; } -int cec_set_hdmi_port(uint8_t iPort) +int cec_set_hdmi_port(cec_logical_address iBaseDevice, uint8_t iPort) { if (cec_parser) - return cec_parser->SetHDMIPort(iPort) ? 1 : 0; + return cec_parser->SetHDMIPort(iBaseDevice, iPort) ? 1 : 0; return -1; } @@ -306,4 +307,21 @@ 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 retVal; + retVal.device = iAddress; + retVal.name[0] = 0; + + if (cec_parser) + retVal = cec_parser->GetOSDName(iAddress); + + return retVal; +} + +int cec_enable_physical_address_detection(void) +{ + return cec_parser ? (cec_parser->EnablePhysicalAddressDetection() ? 1 : 0) : -1; +} + //@}