pub struct Sdp {
pub media: Vec<MediaDescription>,
}Available on crate features
ingest and rtsp only.Expand description
A parsed SDP session description (only the media plane is retained).
Fields§
§media: Vec<MediaDescription>One entry per m= media line, in document order.
Implementations§
Source§impl Sdp
impl Sdp
Sourcepub fn parse(text: &str) -> Sdp
pub fn parse(text: &str) -> Sdp
Parse SDP text. Unknown lines are ignored; malformed media lines are skipped rather than failing the whole description.
Sourcepub fn first_control(&self, kind: &str, base_url: &str) -> Option<String>
pub fn first_control(&self, kind: &str, base_url: &str) -> Option<String>
Resolve the SETUP URL for the first track of kind ("video" /
"audio"), joining its a=control value against base_url (absolute
control URLs win).
Sourcepub fn first_video_control(&self, base_url: &str) -> Option<String>
pub fn first_video_control(&self, base_url: &str) -> Option<String>
Resolve the SETUP URL for the first video track.
Sourcepub fn first_audio_control(&self, base_url: &str) -> Option<String>
pub fn first_audio_control(&self, base_url: &str) -> Option<String>
Resolve the SETUP URL for the first audio track, if the session has one.
Sourcepub fn audio_aac_lengths(&self) -> (u8, u8)
pub fn audio_aac_lengths(&self) -> (u8, u8)
The AAC-hbr (sizelength, indexlength) from the audio track’s a=fmtp,
falling back to the RFC-3640 AAC-hbr defaults (13, 3) when unspecified.
Sourcepub fn has_aac_audio(&self) -> bool
pub fn has_aac_audio(&self) -> bool
Whether the session advertises an AAC audio track (MPEG4-GENERIC).
Trait Implementations§
impl Eq for Sdp
impl StructuralPartialEq for Sdp
Auto Trait Implementations§
impl Freeze for Sdp
impl RefUnwindSafe for Sdp
impl Send for Sdp
impl Sync for Sdp
impl Unpin for Sdp
impl UnsafeUnpin for Sdp
impl UnwindSafe for Sdp
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