#[non_exhaustive]pub enum UserControl {
StreamBegin(u32),
StreamEof(u32),
StreamDry(u32),
SetBufferLength {
stream_id: u32,
buffer_ms: u32,
},
StreamIsRecorded(u32),
PingRequest(u32),
PingResponse(u32),
}Expand description
A User Control Message event (§5.3, message type id 4; event-data formats per §6.7, spec §7.1.7). SHOULD use message stream id 0 and, over the chunk stream, csid 2. Effective on receipt; timestamps ignored.
#[non_exhaustive]: §6.7’s event-type catalogue (event value 5 is
already an unassigned gap) can grow; a new event type must not be a
breaking change for existing match callers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
StreamBegin(u32)
Stream Begin (event 0, server→client): the stream is now
functional/usable. By default sent on stream id 0 right after a
successful connect.
StreamEof(u32)
Stream EOF (event 1, server→client): playback requested on this stream has ended.
StreamDry(u32)
StreamDry (event 2, server→client): no more data on the stream (server-detected idle).
SetBufferLength
SetBufferLength (event 3, client→server): the client’s playback buffer size, sent before the server starts sending the stream.
Fields
StreamIsRecorded(u32)
StreamIsRecorded (event 4, server→client): the stream is a recorded (not live) stream.
PingRequest(u32)
PingRequest (event 6, server→client): test reachability; the client MUST reply with PingResponse.
PingResponse(u32)
PingResponse (event 7, client→server): reply to PingRequest, echoing its timestamp.
Implementations§
Source§impl UserControl
impl UserControl
Sourcepub fn event_type(&self) -> u16
pub fn event_type(&self) -> u16
This event’s 16-bit event type value (§6.7).
Sourcepub fn to_message(&self) -> Message
pub fn to_message(&self) -> Message
Wrap this user control event in a Message ready to hand to
crate::chunk::ChunkWriter — chunk stream id
CONTROL_CHUNK_STREAM_ID, message stream id
CONTROL_MESSAGE_STREAM_ID, timestamp 0 (effective on receipt;
timestamps are not meaningful).
Trait Implementations§
Source§impl Clone for UserControl
impl Clone for UserControl
impl Copy for UserControl
Source§impl Debug for UserControl
impl Debug for UserControl
Source§impl Display for UserControl
impl Display for UserControl
impl Eq for UserControl
Source§impl<'a> Parse<'a> for UserControl
impl<'a> Parse<'a> for UserControl
Source§impl PartialEq for UserControl
impl PartialEq for UserControl
Source§impl Serialize for UserControl
impl Serialize for UserControl
Source§type Error = RtmpError
type Error = RtmpError
Parse impl, but need not be).Source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
serialize_into will write.Source§fn serialize_into(&self, buf: &mut [u8]) -> Result<usize, RtmpError>
fn serialize_into(&self, buf: &mut [u8]) -> Result<usize, RtmpError>
buf. Returns the number of bytes
written (always equal to serialized_len()).