![]() |
libCEC 8.1.0
C / C++ API — control CEC-capable HDMI devices
|
#include "version.h"#include <stdint.h>#include <string.h>#include <string>Go to the source code of this file.
Classes | |
| struct | cec_log_message |
| struct | cec_keypress |
| struct | cec_adapter |
| struct | cec_adapter_descriptor |
| struct | AdapterDescriptor |
| struct | cec_datapacket |
| struct | cec_command |
| struct | cec_device_type_list |
| struct | cec_logical_addresses |
| struct | libcec_parameter |
| struct | CEC::cec_adapter_stats |
| struct | ICECCallbacks |
| struct | CEC::libcec_configuration |
Namespaces | |
| namespace | CEC |
Macros | |
| #define | CECTYPES_H_ |
| #define | CEC_CDECL |
| #define | CEC_DEFAULT_PHYSICAL_ADDRESS 0x1000 |
| default physical address 1.0.0.0, HDMI port 1 | |
| #define | CEC_DEFAULT_HDMI_PORT 1 |
| default HDMI port to which the adapter is connected, port 1 | |
| #define | CEC_DEFAULT_BASE_DEVICE 0 |
| default logical address of the device to which the adapter is connected, TV | |
| #define | CEC_BUTTON_TIMEOUT 500 |
| timeout in milliseconds to send a key release event after receiving a key press | |
| #define | CEC_BUTTON_RELEASE_BACKSTOP_MS 5000 |
| safety timeout in milliseconds after which a held button is force-released once the device has proven it sends its own release messages. | |
| #define | CEC_DOUBLE_TAP_TIMEOUT_MS 200 |
| don't send the same key twice within this timeout in milliseconds | |
| #define | CEC_BUTTON_REPEAT_DELAY_MS 200 |
| delay in milliseconds before a held button starts auto-repeating | |
| #define | CEC_POWER_STATE_REFRESH_TIME 30000 |
| don't query the power state for the same device within this timeout in milliseconds | |
| #define | CEC_AUDIO_STATUS_REFRESH_TIME 200 |
| don't query the audio state for the same device within this timeout in milliseconds | |
| #define | CEC_FW_VERSION_UNKNOWN 0xFFFF |
| unknown firmware version value | |
| #define | CEC_FW_BUILD_UNKNOWN 0 |
| unknown build date value | |
| #define | CEC_CONNECT_TRIES 3 |
| maximum number of retries when opening a connection | |
| #define | CEC_PHYSICAL_ADDRESS_TV 0 |
| physical address of the TV | |
| #define | CEC_MIN_PHYSICAL_ADDRESS 0x1000 |
| minimum physical address for the adapter | |
| #define | CEC_MAX_PHYSICAL_ADDRESS 0xFFFE |
| maximum physical address for the adapter | |
| #define | CEC_INVALID_PHYSICAL_ADDRESS 0xFFFF |
| invalid physical address value | |
| #define | CEC_MIN_VENDORID 1 |
| minimum vendor ID value | |
| #define | CEC_MAX_VENDORID 0xFFFFFE |
| maximum vendor ID value | |
| #define | CEC_INVALID_VENDORID 0xFFFFFF |
| invalid vendor ID value | |
| #define | CEC_MIN_HDMI_PORTNUMBER 1 |
| minimum HDMI port number value | |
| #define | CEC_MAX_HDMI_PORTNUMBER 15 |
| maximum HDMI port number value | |
| #define | CEC_HDMI_PORTNUMBER_NONE 0 |
| invalid HDMI port number value | |
| #define | CEC_DEFAULT_SETTING_ACTIVATE_SOURCE 1 |
| default value for settings "activate source" | |
| #define | CEC_DEFAULT_SETTING_POWER_OFF_SHUTDOWN 1 |
| default value for settings "power off on shutdown" | |
| #define | CEC_DEFAULT_SETTING_POWER_OFF_ON_STANDBY 1 |
| default value for settings "power off on standby" | |
| #define | CEC_DEFAULT_DEVICE_LANGUAGE "eng" |
| default value for settings "device menu language" | |
| #define | CEC_DEFAULT_SETTING_AUTODETECT_ADDRESS 0 |
| default value for settings "autodetect physical address" | |
| #define | CEC_DEFAULT_SETTING_GET_SETTINGS_FROM_ROM 0 |
| default value for settings "get settings from ROM" | |
| #define | CEC_DEFAULT_SETTING_CEC_VERSION 0x05 |
| default value for settings "libCEC CEC version" | |
| #define | CEC_DEFAULT_TRANSMIT_RETRY_WAIT 500 |
| wait this amount of milliseconds before retrying to send a failed message | |
| #define | CEC_DEFAULT_TRANSMIT_TIMEOUT 1000 |
| transmission fails when not acked within this amount of milliseconds after sending the initial packet | |
| #define | CEC_DEFAULT_TRANSMIT_WAIT 1000 |
| wait this amount of milliseconds for an ack | |
| #define | CEC_DEFAULT_TRANSMIT_RETRIES 1 |
| default number of retries | |
| #define | CEC_DEFAULT_CONNECT_TIMEOUT 10000 |
| default connection timeout in milliseconds | |
| #define | CEC_DEFAULT_CONNECT_RETRY_WAIT 1000 |
| wait this amount of milliseconds before retrying when failing to connect | |
| #define | CEC_SERIAL_DEFAULT_BAUDRATE 38400 |
| default serial baudrate | |
| #define | CEC_CLEAR_INPUT_DEFAULT_WAIT 1000 |
| maximum time to wait when clearing input | |
| #define | CEC_ACTIVE_SOURCE_SWITCH_RETRY_TIME_MS 1000 |
| wait this amount of milliseconds before retrying when libCEC failed to make itself the active source | |
| #define | CEC_FORWARD_STANDBY_MIN_INTERVAL 10000 |
| don't forward any power off command to the client application for this amount of milliseconds after sending a power off command | |
| #define | CEC_DEFAULT_COMBO_TIMEOUT_MS 1000 |
| default timeout in milliseconds for combo keys | |
| #define | CEC_RPI_VIRTUAL_PATH "Raspberry Pi" |
| the virtual device path to use for the Raspberry Pi's CEC wire | |
| #define | CEC_RPI_VIRTUAL_COM "RPI" |
| the name of the virtual COM port to use for the Raspberry Pi's CEC wire | |
| #define | CEC_TDA995x_PATH "/dev/hdmicec" |
| the path to use for the TDA995x's CEC wire | |
| #define | CEC_TDA995x_VIRTUAL_COM "CuBox" |
| the name of the virtual COM port to use for the TDA995x's CEC wire | |
| #define | CEC_EXYNOS_PATH "/dev/CEC" |
| the path to use for the Exynos HDMI CEC device | |
| #define | CEC_EXYNOS_VIRTUAL_COM "Exynos" |
| the name of the virtual COM port to use for the EXYNOS' CEC wire | |
| #define | CEC_MAX_DATA_PACKET_SIZE (16 * 4) |
| Maximum size of a data packet. | |
| #define | CEC_MAX_FRAME_SIZE 16 |
| Maximum size of a CEC frame on the wire: 1 header byte + 1 opcode + up to 14 operands. | |
| #define | CEC_LINUX_PATH "/dev/cec0" |
| the path to use for the Linux CEC device | |
| #define | CEC_LINUX_PATH_FORMAT "/dev/cec%u" |
| printf format, node prefix and scan range used to locate Linux CEC device nodes. | |
| #define | CEC_LINUX_PATH_PREFIX "/dev/cec" |
| #define | CEC_LINUX_MAX_DEVICES 32 |
| #define | CEC_LINUX_VIRTUAL_COM "Linux" |
| the name of the virtual COM port to use for the Linux' CEC wire | |
| #define | CEC_AOCEC_PATH "/dev/aocec" |
| the path to use for the AOCEC HDMI CEC device | |
| #define | CEC_AOCEC_VIRTUAL_COM "AOCEC" |
| the name of the virtual COM port to use for the AOCEC' CEC wire | |
| #define | CEC_IMX_PATH "/dev/mxc_hdmi_cec" |
| the path to use for the i.MX CEC wire | |
| #define | CEC_IMX_VIRTUAL_COM "i.MX" |
| the name of the virtual COM port to use for the i.MX CEC wire | |
| #define | CEC_MIN_LIB_VERSION 4 |
| Mimimum client version. | |
| #define | MSGSTART 0xFF |
| #define | MSGEND 0xFE |
| #define | MSGESC 0xFD |
| #define | ESCOFFSET 3 |
| #define | DOUBLE_TAP_TIMEOUT_UNIT_SIZE (50) |
| #define | CEC_FEATURE_CONFIGURABLE_COMBO_KEY 1 |
| #define | LIBCEC_OSD_NAME_SIZE (15) |
Typedefs | |
| typedef char | CEC::cec_menu_language[4] |
| the iso language code + (char)0 | |
| typedef char | CEC::cec_osd_name[14] |
| the name of the device | |
| typedef struct libcec_configuration | CEC::libcec_configuration |
| #define CECTYPES_H_ |
Definition at line 35 of file cectypes.h.
| #define CEC_CDECL |
Definition at line 44 of file cectypes.h.
| #define CEC_DEFAULT_PHYSICAL_ADDRESS 0x1000 |
default physical address 1.0.0.0, HDMI port 1
Definition at line 69 of file cectypes.h.
| #define CEC_DEFAULT_HDMI_PORT 1 |
default HDMI port to which the adapter is connected, port 1
Definition at line 73 of file cectypes.h.
| #define CEC_DEFAULT_BASE_DEVICE 0 |
default logical address of the device to which the adapter is connected, TV
Definition at line 77 of file cectypes.h.
| #define CEC_BUTTON_TIMEOUT 500 |
timeout in milliseconds to send a key release event after receiving a key press
Definition at line 82 of file cectypes.h.
| #define CEC_BUTTON_RELEASE_BACKSTOP_MS 5000 |
safety timeout in milliseconds after which a held button is force-released once the device has proven it sends its own release messages.
it only guards against a lost release, so it is kept generous to leave room for long-presses.
Definition at line 89 of file cectypes.h.
| #define CEC_DOUBLE_TAP_TIMEOUT_MS 200 |
don't send the same key twice within this timeout in milliseconds
Definition at line 94 of file cectypes.h.
| #define CEC_BUTTON_REPEAT_DELAY_MS 200 |
delay in milliseconds before a held button starts auto-repeating
Definition at line 99 of file cectypes.h.
| #define CEC_POWER_STATE_REFRESH_TIME 30000 |
don't query the power state for the same device within this timeout in milliseconds
Definition at line 104 of file cectypes.h.
| #define CEC_AUDIO_STATUS_REFRESH_TIME 200 |
don't query the audio state for the same device within this timeout in milliseconds
Definition at line 109 of file cectypes.h.
| #define CEC_FW_VERSION_UNKNOWN 0xFFFF |
unknown firmware version value
Definition at line 114 of file cectypes.h.
| #define CEC_FW_BUILD_UNKNOWN 0 |
unknown build date value
Definition at line 119 of file cectypes.h.
| #define CEC_CONNECT_TRIES 3 |
maximum number of retries when opening a connection
Definition at line 124 of file cectypes.h.
| #define CEC_PHYSICAL_ADDRESS_TV 0 |
physical address of the TV
Definition at line 129 of file cectypes.h.
| #define CEC_MIN_PHYSICAL_ADDRESS 0x1000 |
minimum physical address for the adapter
Definition at line 134 of file cectypes.h.
| #define CEC_MAX_PHYSICAL_ADDRESS 0xFFFE |
maximum physical address for the adapter
Definition at line 139 of file cectypes.h.
| #define CEC_INVALID_PHYSICAL_ADDRESS 0xFFFF |
invalid physical address value
Definition at line 144 of file cectypes.h.
| #define CEC_MIN_VENDORID 1 |
minimum vendor ID value
Definition at line 149 of file cectypes.h.
| #define CEC_MAX_VENDORID 0xFFFFFE |
maximum vendor ID value
Definition at line 154 of file cectypes.h.
| #define CEC_INVALID_VENDORID 0xFFFFFF |
invalid vendor ID value
Definition at line 159 of file cectypes.h.
| #define CEC_MIN_HDMI_PORTNUMBER 1 |
minimum HDMI port number value
Definition at line 164 of file cectypes.h.
| #define CEC_MAX_HDMI_PORTNUMBER 15 |
maximum HDMI port number value
Definition at line 169 of file cectypes.h.
| #define CEC_HDMI_PORTNUMBER_NONE 0 |
invalid HDMI port number value
Definition at line 174 of file cectypes.h.
| #define CEC_DEFAULT_SETTING_ACTIVATE_SOURCE 1 |
default value for settings "activate source"
Definition at line 179 of file cectypes.h.
| #define CEC_DEFAULT_SETTING_POWER_OFF_SHUTDOWN 1 |
default value for settings "power off on shutdown"
Definition at line 184 of file cectypes.h.
| #define CEC_DEFAULT_SETTING_POWER_OFF_ON_STANDBY 1 |
default value for settings "power off on standby"
Definition at line 189 of file cectypes.h.
| #define CEC_DEFAULT_DEVICE_LANGUAGE "eng" |
default value for settings "device menu language"
Definition at line 194 of file cectypes.h.
| #define CEC_DEFAULT_SETTING_AUTODETECT_ADDRESS 0 |
default value for settings "autodetect physical address"
Definition at line 199 of file cectypes.h.
| #define CEC_DEFAULT_SETTING_GET_SETTINGS_FROM_ROM 0 |
default value for settings "get settings from ROM"
Definition at line 204 of file cectypes.h.
| #define CEC_DEFAULT_SETTING_CEC_VERSION 0x05 |
default value for settings "libCEC CEC version"
Definition at line 209 of file cectypes.h.
| #define CEC_DEFAULT_TRANSMIT_RETRY_WAIT 500 |
wait this amount of milliseconds before retrying to send a failed message
Definition at line 214 of file cectypes.h.
| #define CEC_DEFAULT_TRANSMIT_TIMEOUT 1000 |
transmission fails when not acked within this amount of milliseconds after sending the initial packet
Definition at line 219 of file cectypes.h.
| #define CEC_DEFAULT_TRANSMIT_WAIT 1000 |
wait this amount of milliseconds for an ack
Definition at line 224 of file cectypes.h.
| #define CEC_DEFAULT_TRANSMIT_RETRIES 1 |
default number of retries
Definition at line 229 of file cectypes.h.
| #define CEC_DEFAULT_CONNECT_TIMEOUT 10000 |
default connection timeout in milliseconds
Definition at line 234 of file cectypes.h.
| #define CEC_DEFAULT_CONNECT_RETRY_WAIT 1000 |
wait this amount of milliseconds before retrying when failing to connect
Definition at line 239 of file cectypes.h.
| #define CEC_SERIAL_DEFAULT_BAUDRATE 38400 |
default serial baudrate
Definition at line 244 of file cectypes.h.
| #define CEC_CLEAR_INPUT_DEFAULT_WAIT 1000 |
maximum time to wait when clearing input
Definition at line 249 of file cectypes.h.
| #define CEC_ACTIVE_SOURCE_SWITCH_RETRY_TIME_MS 1000 |
wait this amount of milliseconds before retrying when libCEC failed to make itself the active source
Definition at line 254 of file cectypes.h.
| #define CEC_FORWARD_STANDBY_MIN_INTERVAL 10000 |
don't forward any power off command to the client application for this amount of milliseconds after sending a power off command
Definition at line 259 of file cectypes.h.
| #define CEC_DEFAULT_COMBO_TIMEOUT_MS 1000 |
default timeout in milliseconds for combo keys
Definition at line 264 of file cectypes.h.
| #define CEC_RPI_VIRTUAL_PATH "Raspberry Pi" |
the virtual device path to use for the Raspberry Pi's CEC wire
Definition at line 269 of file cectypes.h.
| #define CEC_RPI_VIRTUAL_COM "RPI" |
the name of the virtual COM port to use for the Raspberry Pi's CEC wire
Definition at line 274 of file cectypes.h.
| #define CEC_TDA995x_PATH "/dev/hdmicec" |
the path to use for the TDA995x's CEC wire
Definition at line 279 of file cectypes.h.
| #define CEC_TDA995x_VIRTUAL_COM "CuBox" |
the name of the virtual COM port to use for the TDA995x's CEC wire
Definition at line 284 of file cectypes.h.
| #define CEC_EXYNOS_PATH "/dev/CEC" |
the path to use for the Exynos HDMI CEC device
Definition at line 289 of file cectypes.h.
| #define CEC_EXYNOS_VIRTUAL_COM "Exynos" |
the name of the virtual COM port to use for the EXYNOS' CEC wire
Definition at line 294 of file cectypes.h.
| #define CEC_MAX_DATA_PACKET_SIZE (16 * 4) |
Maximum size of a data packet.
Definition at line 299 of file cectypes.h.
| #define CEC_MAX_FRAME_SIZE 16 |
Maximum size of a CEC frame on the wire: 1 header byte + 1 opcode + up to 14 operands.
cec_datapacket can hold more (it is reused for adapter messages), so anything that is actually transmitted must be bound to this via cec_command::Serialize().
Definition at line 306 of file cectypes.h.
| #define CEC_LINUX_PATH "/dev/cec0" |
the path to use for the Linux CEC device
Definition at line 311 of file cectypes.h.
| #define CEC_LINUX_PATH_FORMAT "/dev/cec%u" |
printf format, node prefix and scan range used to locate Linux CEC device nodes.
A board may expose several nodes at once (e.g. /dev/cec0 for HDMI0 and /dev/cec1 for HDMI1), and the kernel may recreate a node at a different minor after the adapter is unregistered, so all candidates are probed.
Definition at line 319 of file cectypes.h.
| #define CEC_LINUX_PATH_PREFIX "/dev/cec" |
Definition at line 320 of file cectypes.h.
| #define CEC_LINUX_MAX_DEVICES 32 |
Definition at line 321 of file cectypes.h.
| #define CEC_LINUX_VIRTUAL_COM "Linux" |
the name of the virtual COM port to use for the Linux' CEC wire
Definition at line 326 of file cectypes.h.
| #define CEC_AOCEC_PATH "/dev/aocec" |
the path to use for the AOCEC HDMI CEC device
Definition at line 331 of file cectypes.h.
| #define CEC_AOCEC_VIRTUAL_COM "AOCEC" |
the name of the virtual COM port to use for the AOCEC' CEC wire
Definition at line 336 of file cectypes.h.
| #define CEC_IMX_PATH "/dev/mxc_hdmi_cec" |
the path to use for the i.MX CEC wire
Definition at line 341 of file cectypes.h.
| #define CEC_IMX_VIRTUAL_COM "i.MX" |
the name of the virtual COM port to use for the i.MX CEC wire
Definition at line 346 of file cectypes.h.
| #define CEC_MIN_LIB_VERSION 4 |
Mimimum client version.
Definition at line 351 of file cectypes.h.
| #define MSGSTART 0xFF |
Definition at line 353 of file cectypes.h.
| #define MSGEND 0xFE |
Definition at line 354 of file cectypes.h.
| #define MSGESC 0xFD |
Definition at line 355 of file cectypes.h.
| #define ESCOFFSET 3 |
Definition at line 356 of file cectypes.h.
| #define DOUBLE_TAP_TIMEOUT_UNIT_SIZE (50) |
Definition at line 358 of file cectypes.h.
| #define CEC_FEATURE_CONFIGURABLE_COMBO_KEY 1 |
Definition at line 361 of file cectypes.h.
| #define LIBCEC_OSD_NAME_SIZE (15) |
Definition at line 1556 of file cectypes.h.