Package: android.hardware.tv.input@1.0

ITvInput

interface ITvInput

Methods

setCallback

setCallback (ITvInputCallback callback)

Sets a callback for events.

Note that initially no device is available in the client side, so the implementation must notify all the currently available devices including static devices via callback once callback is set.

Details
Parameters
callback
Callback object to pass events.
Annotations
entry
exit
callflow
next= { "getStreamConfigurations" }

getStreamConfigurations

getStreamConfigurations (int32_t deviceId)
generates (Result result, vec<TvStreamConfig> configurations)

Gets stream configurations for a specific device.

The configs object is valid only until the next STREAM_CONFIGURATIONS_CHANGED event.

Details
Parameters
deviceId
Device ID for the configurations.
Generates
result
OK upon success.Otherwise, INVALID_ARGUMENTS if the given device ID is not valid.
configurations
An array of available configurations.
Annotations
callflow
next= { "openStream" , "getStreamConfigurations" , "closeStream" }

openStream

openStream (int32_t deviceId, int32_t streamId)
generates (Result result, handle sidebandStream)

Opens a specific stream in a device.

Details
Parameters
deviceId
Device ID for the steam to open.
streamId
Steam ID for the steam to open.Must be one of the stream IDs returned from getStreamConfigurations().
Generates
result
OK upon success.Otherwise, INVALID_ARGUMENTS if any of given IDs are not valid;INVALID_STATE if the stream with the given ID is already open;NO_RESOURCE if the client must close other streams to open the stream.
sidebandStream
handle for sideband stream.
Annotations
callflow
next= { "closeStream" , "getStreamConfigurations" , "openStream" }

closeStream

closeStream (int32_t deviceId, int32_t streamId)
generates (Result result)

Closes a specific stream in a device.

Details
Parameters
deviceId
Device ID for the steam to open.
streamId
Steam ID for the steam to open.
Generates
result
OK upon success.Otherwise, INVALID_ARGUMENTS if any of given IDs are not valid;INVALID_STATE if the stream with the given ID is not open.
Annotations
callflow
next= { "getStreamConfigurations" , "openStream" , "closeStream" }