pub struct TransportSpec {Show 13 fields
pub lower_transport: Option<LowerTransport>,
pub delivery: Option<Delivery>,
pub interleaved: Option<(u8, u8)>,
pub client_port: Option<(u16, u16)>,
pub server_port: Option<(u16, u16)>,
pub port: Option<(u16, u16)>,
pub ttl: Option<u8>,
pub layers: Option<u32>,
pub ssrc: Option<u32>,
pub destination: Option<String>,
pub source: Option<String>,
pub mode: Option<String>,
pub append: bool,
}Expand description
A single parsed transport-spec from a Transport header (RFC 2326 §12.39).
Only RTP/AVP (with optional /TCP or /UDP) is modelled with typed
parameters. The transport triple is fixed to RTP/AVP; the lower transport
and each recognised parameter are optional.
Fields§
§lower_transport: Option<LowerTransport>Lower-layer transport. None means the token was absent → UDP default.
delivery: Option<Delivery>unicast / multicast.
interleaved: Option<(u8, u8)>interleaved=lo-hi — the $-framing channel pair (RFC 2326 §10.12).
client_port: Option<(u16, u16)>client_port=lo-hi — unicast RTP/RTCP port pair chosen by the client.
server_port: Option<(u16, u16)>server_port=lo-hi — unicast RTP/RTCP port pair chosen by the server.
port: Option<(u16, u16)>port=lo-hi — multicast RTP/RTCP port pair.
ttl: Option<u8>ttl=N — multicast time-to-live.
layers: Option<u32>layers=N — number of multicast layers.
ssrc: Option<u32>ssrc=HHHHHHHH — 32-bit RTP SSRC (unicast only).
destination: Option<String>destination[=addr].
source: Option<String>source=addr.
mode: Option<String>mode — quoted or bare method(s); PLAY or RECORD.
append: boolappend flag (RECORD mode).
Implementations§
Source§impl TransportSpec
impl TransportSpec
Sourcepub fn rtp_avp_tcp_interleaved(lo: u8, hi: u8) -> Self
pub fn rtp_avp_tcp_interleaved(lo: u8, hi: u8) -> Self
A fresh RTP/AVP/TCP interleaved spec on the given channel range — the common client SETUP for TCP tunnelling (RFC 2326 §10.12).
Sourcepub fn to_header_value(&self) -> String
pub fn to_header_value(&self) -> String
Serializes this spec to its Transport header textual form (no comma).
Trait Implementations§
Source§impl Clone for TransportSpec
impl Clone for TransportSpec
Source§fn clone(&self) -> TransportSpec
fn clone(&self) -> TransportSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more