fuchsia.media.playback

Added: 7

PROTOCOLS

ElementarySource

Defined in fuchsia.media.playback/source_manager.fidl

Source variant for providing elementary streams directly to the player.

AddBinding

Adds a new binding to this ElementarySource. By using this method, the client can obtain an additional channel through which to communicate to this ElementarySource even after a channel is consumed by a call to SourceManager.SetSource.

Request

NameType
source_request server_end<ElementarySource>

AddStream

Adds an elementary stream. The elementary stream can be removed by closing the SimpleStreamSink. ticks_per_second_numerator and ticks_per_second_denominator indicate the units that will be used for Streampacket timestamp values. For nanoseconds units, for example, ticks_per_second_numerator should be 1000000000 and ticks_per_second_denominator should be 1. To use units of frames for 48k audio, ticks_per_second_numerator should be 48000 and ticks_per_second_denominator should be 1.

Request

NameType
type fuchsia.media/StreamType
ticks_per_second_numerator uint32
ticks_per_second_denominator uint32
sink_request server_end<fuchsia.media/SimpleStreamSink>

OnStatusChanged

Response

NameType
source_status SourceStatus

Player

Defined in fuchsia.media.playback/player.fidl

Plays media.

AddBinding

Adds a new binding to this player.

Request

NameType
player_request server_end<Player>

BindGainControl

Binds to the gain control for this player.

Request

NameType
gain_control_request server_end<fuchsia.media.audio/GainControl>

CancelSourceTransition

Cancels a pending transition, returning the source. If no transition is pending, the request channel is closed.

Request

NameType
returned_source_request server_end<Source>

CreateElementarySource

Creates a source that allows the client to provide independent elementary streams to the player. duration_ns, can_pause, can_seek and metadata are all included in the SourceStatus and, when the ElementarySource is used by the player, in the PlayerStatus as well. can_pause and can_seek, when false, constrain the capabilities of the player.

Request

NameType
duration_ns zx/Duration
can_pause bool
can_seek bool
metadata fuchsia.media/Metadata?
source_request server_end<ElementarySource>

CreateFileSource

Creates a source that reads from a file.

Request

NameType
file_channel handle<channel>
source_request server_end<Source>

CreateReaderSource

Creates a source that reads from a SeekingReader.

Request

NameType
seeking_reader SeekingReader
source_request server_end<Source>

CreateView

Creates a video view.

Request

NameType
view_token fuchsia.ui.views/ViewToken

OnStatusChanged

Provides current status immediately after binding and whenever status changes thereafter.

Response

NameType
player_status PlayerStatus

Pause

Pauses playback.

Request

<EMPTY>

Play

Starts playback.

Request

<EMPTY>

Seek

Seeks to the specified position, specified in nanoseconds.

Request

NameType
position int64

SetFileSource

Sets a file channel to read from.

Request

NameType
file_channel handle<channel>

SetFileSourceWithOptions

Sets a file channel to read from.

Request

NameType
file_channel handle<channel>
options PlayerOptions

SetPlaybackRate

Sets the rate to be used when the player is playing. rate must be positive. The timeline_function field of PlayerStatus indicates the actual rate when the player is playing.

Request

NameType
playback_rate float32

SetSource

Sets the source for this player to use. If source is null, the player becomes idle.

Request

NameType
source Source?

TransitionToSource

Transitions to the specified source when playback of the current source reaches transition_pts. The new source starts playback at start_pts. If a transition is already pending, it will be discarded in favor of the new transition.

Request

NameType
source Source
transition_pts int64
start_pts int64

SeekingReader

Defined in fuchsia.media.playback/seeking_reader.fidl

Describe

Request

<EMPTY>

Response

NameType
status zx/Status
size uint64
can_seek bool

ReadAt

Request

NameType
position uint64

Response

NameType
status zx/Status
socket handle<socket>?

Source

Defined in fuchsia.media.playback/source_manager.fidl

A source of content that may be used by a player.

OnStatusChanged

Response

NameType
source_status SourceStatus

SourceManager

Defined in fuchsia.media.playback/source_manager.fidl

Manages sources on behalf of a Player.

CancelSourceTransition

Cancels a pending transition, returning the source. If no transition is pending, the request channel is closed.

Request

NameType
returned_source_request server_end<Source>

CreateElementarySource

Creates a source that allows the client to provide independent elementary streams to the player. duration_ns, can_pause, can_seek and metadata are all included in the SourceStatus and, when the ElementarySource is used by the player, in the PlayerStatus as well. can_pause and can_seek, when false, constrain the capabilities of the player.

Request

NameType
duration_ns zx/Duration
can_pause bool
can_seek bool
metadata fuchsia.media/Metadata?
source_request server_end<ElementarySource>

CreateFileSource

Creates a source that reads from a file.

Request

NameType
file_channel handle<channel>
source_request server_end<Source>

CreateReaderSource

Creates a source that reads from a SeekingReader.

Request

NameType
seeking_reader SeekingReader
source_request server_end<Source>

SetSource

Sets the source for this player to use. If source is null, the player becomes idle.

Request

NameType
source Source?

TransitionToSource

Transitions to the specified source when playback of the current source reaches transition_pts. The new source starts playback at start_pts. If a transition is already pending, it will be discarded in favor of the new transition.

Request

NameType
source Source
transition_pts int64
start_pts int64

STRUCTS

PlayerStatus

Defined in fuchsia.media.playback/player.fidl

Player status information.

FieldTypeDescriptionDefault
duration zx/Duration

Duration of the content.

No default
can_pause bool

Whether the player can pause.

No default
can_seek bool

Whether the player can seek.

No default
has_audio bool

Whether the source has an audio stream.

No default
has_video bool

Whether the source has a video stream.

No default
ready bool

Indicates whether the player is ready to play. After SetFileSource or SourceManager.SetSource is called, this value is false until the player is fully prepared to play the content from the source.

No default
metadata fuchsia.media/Metadata? No default
problem Problem?

Indicates a problem preventing intended operation.

No default
audio_connected bool

Indicates whether an audio stream is currently connected for rendering. This value will be false if has_audio is false or if the audio stream type isn't supported.

No default
video_connected bool

Indicates whether a video stream is currently connected for rendering. This value will be false if has_video is false or if the video stream type isn't supported.

No default
video_size fuchsia.math/Size?

Size of the video currently being produced. This value will be null if the video size is currently unknown.

No default
pixel_aspect_ratio fuchsia.math/Size?

Relative dimensions of a video pixel. This value will be null if the pixel aspect ratio is currently unknown.

No default
timeline_function fuchsia.media/TimelineFunction?

Function translating local time to presentation time. This value will be null if the timeline function is currently undefined.

No default
end_of_stream bool

Indicates whether presentation for all streams has reached end-of-stream.

No default

Problem

Defined in fuchsia.media.playback/problem.fidl

Models a problem preventing intended operation.

A Problem is generally surfaced as part of a component's status, probably as an optional field. Absence of a Problem means that nothing is preventing intended operation. When a problem is exposed, the client can take action automatically or present relevant UI. If a problem can be resolved by some action, the client may take that action automatically or enlist the user somehow in the resolution. In either case, the problem goes away when the issue that caused it to be exposed is resolved. By design, there is no general means of dismissing a problem.

FieldTypeDescriptionDefault
type string

The type of problem. This is a string for extensibility.

No default
details string?

Type-dependent details.

No default

SourceStatus

Defined in fuchsia.media.playback/source_manager.fidl

Source status information.

FieldTypeDescriptionDefault
duration zx/Duration

Duration of the content.

No default
can_pause bool

Whether the source can pause.

No default
can_seek bool

Whether the source can seek.

No default
has_audio bool

Whether the source has an audio stream.

No default
has_video bool

Whether the source has a video stream.

No default
ready bool

Indicates whether the source is ready. A true value signals that the content has been probed and there are no known problems with it.

No default
metadata fuchsia.media/Metadata?

Describes the media.

No default
problem Problem?

Indicates a problem preventing intended operation. A null value indicates that the source is functioning as intended.

No default

TABLES

PlayerOptions

Defined in fuchsia.media.playback/player.fidl

Options used in SetFileSourceWithOptions.

OrdinalFieldTypeDescription
silent bool

When set to true, suppresses audio rendering. Default value false.

CONSTANTS

NameValueTypeDescription
PROBLEM_ASSET_NOT_FOUND fuchsia.media.playback.AssetNotFound String
PROBLEM_AUDIO_ENCODING_NOT_SUPPORTED fuchsia.media.playback.AudioEncodingNotSupported String
PROBLEM_CONNECTION_FAILED fuchsia.media.playback.ConnectionFailed String
PROBLEM_CONTAINER_NOT_SUPPORTED fuchsia.media.playback.ContainerNotSupported String
PROBLEM_INTERNAL fuchsia.media.playback.Internal String
PROBLEM_VIDEO_ENCODING_NOT_SUPPORTED fuchsia.media.playback.VideoEncodingNotSupported String
UNKNOWN_SIZE 18446744073709551615 uint64

Distinguished value for the size value returned by SeekingReader.Describe Indicating that the size isn't known.