*/
virtual bool SetPhysicalAddress(uint16_t iPhysicalAddress = CEC_DEFAULT_PHYSICAL_ADDRESS) = 0;
+ /*!
+ * @brief Enable physical address detection (if the connected adapter supports this).
+ * @return True when physical address detection was enabled, false otherwise.
+ */
+ virtual bool EnablePhysicalAddressDetection(void) = 0;
+
+ /*!
+ * @brief Changes the active HDMI port.
+ * @param iBaseDevice The device to which this libcec is connected.
+ * @param iPort The new port number.
+ * @return True when changed, false otherwise.
+ */
+ virtual bool SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort) = 0;
+
/*!
* @brief Power on the connected CEC capable devices.
* @param address The logical address to power on.
*/
virtual bool IsActiveDeviceType(cec_device_type type) = 0;
- /*!
- * @brief Changes the active HDMI port.
- * @param iBaseDevice The device to which this libcec is connected.
- * @param iPort The new port number.
- * @return True when changed, false otherwise.
- */
- virtual bool SetHDMIPort(cec_logical_address iBaseDevice, uint8_t iPort) = 0;
-
/*!
* @brief Sends a volume up keypress to an audiosystem if it's present.
* @param bWait Wait for the response of the audiosystem when true.
extern DECLSPEC cec_osd_name cec_get_osd_name(cec_logical_address iAddress);
#endif
+extern DECLSPEC int cec_enable_physical_address_detection(void);
+
#ifdef __cplusplus
};
#endif
virtual uint8_t MuteAudio(bool bWait = true);
virtual bool SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait = false);
virtual bool SendKeyRelease(cec_logical_address iDestination, bool bWait = false);
+ virtual bool EnablePhysicalAddressDetection(void) { return false; };
const char *ToString(const cec_menu_state state);
const char *ToString(const cec_version version);
return m_cec ? m_cec->SetHDMIPort(iBaseDevice, iPort) : false;
}
+bool CLibCEC::EnablePhysicalAddressDetection(void)
+{
+ return m_cec ? m_cec->EnablePhysicalAddressDetection() : false;
+}
+
bool CLibCEC::PowerOnDevices(cec_logical_address address /* = CECDEVICE_TV */)
{
return m_cec && address >= CECDEVICE_TV && address <= CECDEVICE_BROADCAST ? m_cec->m_busDevices[(uint8_t)address]->PowerOn() : false;
virtual bool SendKeypress(cec_logical_address iDestination, cec_user_control_code key, bool bWait = false);
virtual bool SendKeyRelease(cec_logical_address iDestination, bool bWait = false);
virtual cec_osd_name GetOSDName(cec_logical_address iAddress);
+ virtual bool EnablePhysicalAddressDetection(void);
const char *ToString(const cec_menu_state state);
const char *ToString(const cec_version version);
return retVal;
}
+int cec_enable_physical_address_detection(void)
+{
+ return cec_parser ? (cec_parser->EnablePhysicalAddressDetection() ? 1 : 0) : -1;
+}
+
//@}