#[non_exhaustive]pub enum ServerEvent {
Connected {
app: String,
},
Publish {
app: String,
stream_key: String,
stream_id: u32,
},
Media {
flv: Vec<u8>,
},
Eof,
Unsupported {
message_type_id: MessageTypeId,
},
}Expand description
Typed events ServerSession::handle_data surfaces to the caller.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Connected
connect completed: the publisher’s requested app name (§7.2.1).
Publish
publish was accepted (stream key matched, or no key was
configured): the session is now Publishing.
Fields
Media
One FLV tag run is ready: the payload of a single Audio(8)/Video(9)/
Data-AMF0(18) message, converted to an FLV tag (+ PreviousTagSize).
The very first Media event of a session is prefixed with the FLV
file header, so concatenating every Media.flv in arrival order
yields a valid FLV byte stream feedable to transmux::FlvDemux.
Fields
Eof
The publisher ended the stream (deleteStream/FCUnpublish).
Unsupported
A message type this engine doesn’t decode was received and its payload was dropped (#1108/RTMP-W6) — Data-AMF3(15), Command-AMF3(17, now decoded as AMF0 after its format byte), or Shared Object(16/19). Pre-fix, these were silently ignored with no signal at all. Aggregate(22) no longer surfaces here: it is unpacked into its contained sub-messages (#1108 remainder), and a malformed aggregate is an error instead.
Fields
message_type_id: MessageTypeIdThe message type id that was dropped (§6/§7.1).
Trait Implementations§
Source§impl Clone for ServerEvent
impl Clone for ServerEvent
Source§impl Debug for ServerEvent
Manual Debug: Publish carries the publisher’s stream key (the ingest
secret) and Media carries whole FLV tag runs; neither renders verbatim
(issue #1142).
impl Debug for ServerEvent
Manual Debug: Publish carries the publisher’s stream key (the ingest
secret) and Media carries whole FLV tag runs; neither renders verbatim
(issue #1142).
Source§impl<'de> Deserialize<'de> for ServerEvent
Available on crate feature serde only.
impl<'de> Deserialize<'de> for ServerEvent
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ServerEvent
impl PartialEq for ServerEvent
Source§impl Serialize for ServerEvent
Available on crate feature serde only.
impl Serialize for ServerEvent
serde only.