template <>
class WireServer
Defined at line 19568 of file fidling/gen/sdk/fidl/fuchsia.media/fuchsia.media/cpp/fidl/fuchsia.media/cpp/wire_messaging.h
Pure-virtual interface to be implemented by a server.
This interface uses typed channels (i.e. |::fidl::ClientEnd
<
::fuchsia_media::AudioConsumer>|
and |::fidl::ServerEnd
<
::fuchsia_media::AudioConsumer>|).
Public Methods
void CreateStreamSink (::fuchsia_media::wire::AudioConsumerCreateStreamSinkRequest * request, CreateStreamSinkCompleter::Sync & completer)
Creates a `StreamSink` for the consumer with the indicated properties.
Multiple stream sinks may be acquired using this method, but they are intended to be used
sequentially rather than concurrently. The first stream sink that's created using this
method is used as the sole source of packets incoming to the logical consumer until that
stream sink is closed or the `EndOfStream` method is called on that sink. At that point,
the second stream sink is used, and so on.
If an unsupported compression type is supplied, the
`stream_sink_request` request will be closed with an epitaph value of
`ZX_ERR_INVALID_ARGS`.
void Start (::fuchsia_media::wire::AudioConsumerStartRequest * request, StartCompleter::Sync & completer)
Starts rendering as indicated by `flags`.
`media_time` indicates the packet timestamp that corresponds to `reference_time`.
Typically, this is the timestamp of the first packet that will be
rendered. If packets will be supplied with no timestamps, this value
should be `NO_TIMESTAMP`. Passing a `media_time` value of
`NO_TIMESTAMP` chooses the default media time, established as follows:
1. When starting for the first time, the default media time is the
timestamp on the first packet sent to the stream sink.
2. When resuming after stop, the default media time is the media
time at which the stream stopped.
`reference_time` is the monotonic system time at which rendering should
be started. For supply-driven sources, this must be the time at which
the first packet was (or will be) sent plus a lead time, which must be
in the range indicated in the `AudioConsumerStatus`. For demand-driven
sources, the client must ensure that the lead time requirement is met at
the start time. Passing the default value of 0 for `reference_time`
causes the consumer to choose a start time based on the availability of
packets, the lead time requirements, and whether `LOW_LATENCY` has been
specified.
The actual start time will be reflected in the updated status.
void Stop (StopCompleter::Sync & completer)
Stops rendering as soon as possible after this method is called. The actual stop time will
be reflected in the updated status.
void SetRate (::fuchsia_media::wire::AudioConsumerSetRateRequest * request, SetRateCompleter::Sync & completer)
Requests to change the playback rate of the renderer. 1.0 means normal
playback. Negative rates are not supported. The new rate will be
reflected in the updated status. The default rate of any newly created `StreamSink` is 1.0.
void BindVolumeControl (::fuchsia_media::wire::AudioConsumerBindVolumeControlRequest * request, BindVolumeControlCompleter::Sync & completer)
Binds to this `AudioConsumer` volume control for control and notifications.
void WatchStatus (WatchStatusCompleter::Sync & completer)
Gets the current status of the consumer using the long get pattern. The consumer responds
to this method when the status changes - initially with respect to the initial status value
and thereafter with respect to the previously-reported status value.
void WireServer ()
Defined at line 19571 of file fidling/gen/sdk/fidl/fuchsia.media/fuchsia.media/cpp/fidl/fuchsia.media/cpp/wire_messaging.h
Handler bind_handler (async_dispatcher_t * dispatcher)
|bind_handler| returns a handler that binds incoming connections to this
server implementation.
The returned handler borrows the server instance.
The server must outlive the provided |dispatcher|. Only after
the dispatcher is shutdown will it be safe to destroy the servers.
The server should not be moved.
void ~WireServer ()
Defined at line 19572 of file fidling/gen/sdk/fidl/fuchsia.media/fuchsia.media/cpp/fidl/fuchsia.media/cpp/wire_messaging.h