pub enum StreamSinkRequest {
PutPacket {
payload: StreamSinkPutPacketRequest,
control_handle: StreamSinkControlHandle,
},
StartSegment {
payload: StreamSinkStartSegmentRequest,
control_handle: StreamSinkControlHandle,
},
End {
control_handle: StreamSinkControlHandle,
},
WillClose {
payload: StreamSinkWillCloseRequest,
control_handle: StreamSinkControlHandle,
},
}
Expand description
A packet sink for cross-process audio stream transport, implemented by audio consumers and used by audio producers.
Variants§
PutPacket
Puts a packet to the sink.
StartSegment
Starts a new segment. Packets following this request and preceding the next such request are assigned to the segment.
End
Indicates that the end of the stream has been reached. Consumers such as audio renderers
signal their clients when the last packet before end-of-stream has been rendered, so the
client knows when to, for example, change the UI state of a player to let the user know the
content is done playing. This method is logically scoped to the current segment. A
SetSegment
request and (typically) more packets may follow this request.
Fields
control_handle: StreamSinkControlHandle
WillClose
Sent immediately before the producer closes to indicate why the producer is closing the connection. After sending this request, the producer must refrain from sending any more messages and close the connection promptly.
Implementations§
Source§impl StreamSinkRequest
impl StreamSinkRequest
pub fn into_put_packet( self, ) -> Option<(StreamSinkPutPacketRequest, StreamSinkControlHandle)>
pub fn into_start_segment( self, ) -> Option<(StreamSinkStartSegmentRequest, StreamSinkControlHandle)>
pub fn into_end(self) -> Option<StreamSinkControlHandle>
pub fn into_will_close( self, ) -> Option<(StreamSinkWillCloseRequest, StreamSinkControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL