Package: android.hardware.tv.input@1.0

types

Properties

Result

enum Result: int32_t
Details
Members
OK
UNKNOWN
NO_RESOURCE
INVALID_ARGUMENTS
INVALID_STATE

TvInputType

enum TvInputType: int32_t

Type of physical TV input.

Details
Members
OTHER = 1
TUNER = 2
COMPOSITE = 3
SVIDEO = 4
SCART = 5
COMPONENT = 6
VGA = 7
DVI = 8
HDMI = 9
DISPLAY_PORT = 10
Annotations
export
name="" , value_prefix="TV_INPUT_TYPE_"

CableConnectionStatus

enum CableConnectionStatus: int32_t

Status of cable connection.This status is for devices having availability to detect the cable in a mechanical way, regardless of whether the connected external device is electrically on or not.If the device does not have such capability, you must use UNKNOWN.

Details
Members
UNKNOWN = 0
CONNECTED = 1
DISCONNECTED = 2
Annotations
export
name="" , value_prefix="CABLE_CONNECTION_STATUS_"

TvInputEventType

enum TvInputEventType: int32_t
Details
Members
DEVICE_AVAILABLE = 1
Hardware notifies the framework that a device is available.
Note that DEVICE_AVAILABLE and DEVICE_UNAVAILABLE events do not represent hotplug events(i.e.plugging cable into or out of the physical port). These events notify the framework whether the port is available or not.For a concrete example, when a user plugs in or pulls out the HDMI cable from a HDMI port, it does not generate DEVICE_AVAILABLE and/or DEVICE_UNAVAILABLE events.However, if a user inserts a pluggable USB tuner into the Android device, it must generate a DEVICE_AVAILABLE event and when the port is removed, it must generate a DEVICE_UNAVAILABLE event.
For hotplug events, please see STREAM_CONFIGURATION_CHANGED for more details.
HAL implementation must register devices by using this event when the device boots up.The framework must recognize device reported via this event only.
DEVICE_UNAVAILABLE = 2
Hardware notifies the framework that a device is unavailable.
HAL implementation must generate this event when a device registered by DEVICE_AVAILABLE is no longer available.For example, the event can indicate that a USB tuner is plugged out from the Android device.
Note that this event is not for indicating cable plugged out of the port;for that purpose, the implementation must use STREAM_CONFIGURATION_CHANGED event.This event represents the port itself being no longer available.
STREAM_CONFIGURATIONS_CHANGED = 3
Stream configurations are changed.Client must regard all open streams at the specific device are closed, and must call getStreamConfigurations() again, opening some of them if necessary.
HAL implementation must generate this event when the available stream configurations change for any reason.A typical use case of this event is to notify the framework that the input signal has changed resolution, or that the cable is plugged out so that the number of available streams is 0.
The implementation must use this event to indicate hotplug status of the port.the framework regards input devices with no available streams as disconnected, so the implementation can generate this event with no available streams to indicate that this device is disconnected, and vice versa.
Annotations
export
name="" , value_prefix="EVENT_"

TvInputDeviceInfo

struct TvInputDeviceInfo {int32_t deviceId; TvInputType type; uint32_t portId; CableConnectionStatus cableConnectionStatus; AudioDevice audioType; uint8_t audioAddress}
Details
Members
deviceId
type
portId
cableConnectionStatus
audioType
audioAddress

TvInputEvent

struct TvInputEvent {TvInputEventType type; TvInputDeviceInfo deviceInfo}
Details
Members
type
deviceInfo
DEVICE_AVAILABLE:all fields are relevant.DEVICE_UNAVAILABLE:only deviceId is relevant.STREAM_CONFIGURATIONS_CHANGED:only deviceId is relevant.

TvStreamConfig

struct TvStreamConfig {int32_t streamId; uint32_t maxVideoWidth; uint32_t maxVideoHeight}
Details
Members
streamId
maxVideoWidth
maxVideoHeight