pub struct StreamBinding {
ssrc: Option<Ssrc>,
repair_ssrc: Option<Ssrc>,
rid: Option<Rid>,
payload_type: Option<PayloadType>,
max_bitrate: Option<u64>,
}Expand description
Routing bridge between a negotiated media format and a physical stream.
Ties logical codec formats to the physical multiplexing identifiers (primary SSRC, repair SSRC, or simulcast RID) resolved from RTP packet headers and SDP.
Wire RTP Packet Multiplexing:
Primary Stream: [ RTP Header: SSRC 1000 ] ------------+
|
RTX Repair: [ RTP Header: SSRC 1001 ] (FID/RRID) +--> StreamBinding
| - SSRC: 1000
Simulcast Layer: [ Header Ext: RID "h" ] ------------+ - Repair SSRC: 1001
- RID: "h"
- PayloadType: 96FID supplies repair_ssrc. RID and repaired RID associate packets through rid.
References:
- RFC 4588 section 5 (RTX source association): https://www.rfc-editor.org/rfc/rfc4588.html#section-5
- RFC 5576 section 4.2 (SDP FID grouping): https://www.rfc-editor.org/rfc/rfc5576.html#section-4.2
- RFC 8852 section 3.3 (RID-based repair): https://www.rfc-editor.org/rfc/rfc8852.html#section-3.3
Fields§
§ssrc: Option<Ssrc>§repair_ssrc: Option<Ssrc>§rid: Option<Rid>§payload_type: Option<PayloadType>§max_bitrate: Option<u64>Implementations§
Source§impl StreamBinding
impl StreamBinding
pub fn new() -> Self
pub fn with_ssrc(self, ssrc: impl Into<Ssrc>) -> Self
Sourcepub fn with_repair_ssrc(self, repair_ssrc: impl Into<Ssrc>) -> Self
pub fn with_repair_ssrc(self, repair_ssrc: impl Into<Ssrc>) -> Self
Associates an RTX source with its primary per https://www.rfc-editor.org/rfc/rfc4588.html#section-5 and the FID form in https://www.rfc-editor.org/rfc/rfc5576.html#section-4.2.
pub fn with_rid(self, rid: impl Into<Rid>) -> Self
pub fn with_payload_type(self, payload_type: PayloadType) -> Self
pub fn with_max_bitrate(self, max_bitrate: u64) -> Self
pub fn ssrc(&self) -> Option<u32>
pub fn repair_ssrc(&self) -> Option<u32>
pub fn rid(&self) -> Option<&str>
pub(super) fn with_payload_type_mapping( self, payload_types: &[(PayloadType, PayloadType)], ) -> Self
pub fn payload_type_id(&self) -> Option<PayloadType>
pub fn payload_type(&self) -> Option<u8>
pub fn max_bitrate(&self) -> Option<u64>
Trait Implementations§
Source§impl Clone for StreamBinding
impl Clone for StreamBinding
Source§fn clone(&self) -> StreamBinding
fn clone(&self) -> StreamBinding
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamBinding
impl Debug for StreamBinding
Source§impl Default for StreamBinding
impl Default for StreamBinding
Source§fn default() -> StreamBinding
fn default() -> StreamBinding
Returns the “default value” for a type. Read more
Source§impl PartialEq for StreamBinding
impl PartialEq for StreamBinding
impl Eq for StreamBinding
impl StructuralPartialEq for StreamBinding
Auto Trait Implementations§
impl Freeze for StreamBinding
impl RefUnwindSafe for StreamBinding
impl Send for StreamBinding
impl Sync for StreamBinding
impl Unpin for StreamBinding
impl UnsafeUnpin for StreamBinding
impl UnwindSafe for StreamBinding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more