From: Lars Op den Kamp Date: Tue, 14 Feb 2012 01:09:49 +0000 (+0100) Subject: cec: allow to override the TV vendor id via the initial configuration X-Git-Tag: upstream/2.2.0~1^2~35^2~63 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ed63a5152ee6f0283fd32d1e304df9e7c7dd03e5;p=deb_libcec.git cec: allow to override the TV vendor id via the initial configuration --- diff --git a/include/cectypes.h b/include/cectypes.h index 1cdb3ea..0a0270f 100644 --- a/include/cectypes.h +++ b/include/cectypes.h @@ -923,6 +923,7 @@ typedef struct libcec_configuration uint16_t iPhysicalAddress; /*!< the physical address of the CEC adapter */ cec_logical_address baseDevice; /*!< the logical address of the device to which the adapter is connected. only used when iPhysicalAddress = 0 */ uint8_t iHDMIPort; /*!< the HDMI port to which the adapter is connected. only used when iPhysicalAddress = 0 */ + cec_vendor_id tvVendor; /*!< the vendor ID of the TV. leave this untouched to autodetect */ cec_client_version clientVersion; /*!< the version of the client that is connecting */ // player specific settings @@ -944,6 +945,7 @@ typedef struct libcec_configuration iPhysicalAddress = 0; baseDevice = (cec_logical_address)CEC_DEFAULT_BASE_DEVICE; iHDMIPort = CEC_DEFAULT_HDMI_PORT; + tvVendor = CEC_VENDOR_UNKNOWN; clientVersion = CEC_CLIENT_VERSION_PRE_1_5; bGetSettingsFromROM = 0; diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index ebd1772..f4e485a 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -64,6 +64,11 @@ CCECProcessor::CCECProcessor(CLibCEC *controller, const libcec_configuration *co { m_logicalAddresses.Clear(); CreateBusDevices(); + if (configuration->tvVendor != CEC_VENDOR_UNKNOWN) + { + m_busDevices[CECDEVICE_TV]->SetVendorId((uint64_t)configuration->tvVendor); + m_busDevices[CECDEVICE_TV]->ReplaceHandler(false); + } } CCECProcessor::CCECProcessor(CLibCEC *controller, const char *strDeviceName, const cec_device_type_list &types, uint16_t iPhysicalAddress, cec_client_version clientVersion) :