pub struct MediaStream {
formats: Vec<MediaFormat>,
header_extensions: Vec<HeaderExtension>,
bindings: Vec<StreamBinding>,
mid: Option<Mid>,
}Expand description
Description of one logical media stream (e.g. “camera”) at the router boundary.
Combines negotiated formats (codecs), extensions, and the stream bindings that tell the router how to identify the packets on the wire.
Fields§
§formats: Vec<MediaFormat>§header_extensions: Vec<HeaderExtension>§bindings: Vec<StreamBinding>§mid: Option<Mid>Implementations§
Source§impl MediaStream
impl MediaStream
pub fn new( formats: Vec<MediaFormat>, header_extensions: Vec<HeaderExtension>, bindings: Vec<StreamBinding>, ) -> Self
pub fn with_mid(self, mid: impl Into<Mid>) -> Self
pub fn formats(&self) -> impl Iterator<Item = &MediaFormat>
pub fn header_extensions(&self) -> impl Iterator<Item = &HeaderExtension>
pub fn bindings(&self) -> impl Iterator<Item = &StreamBinding>
pub fn mid(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for MediaStream
impl Clone for MediaStream
Source§fn clone(&self) -> MediaStream
fn clone(&self) -> MediaStream
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 MediaStream
impl Debug for MediaStream
Source§impl Default for MediaStream
impl Default for MediaStream
Source§fn default() -> MediaStream
fn default() -> MediaStream
Returns the “default value” for a type. Read more
Source§impl PartialEq for MediaStream
impl PartialEq for MediaStream
impl Eq for MediaStream
impl StructuralPartialEq for MediaStream
Auto Trait Implementations§
impl Freeze for MediaStream
impl RefUnwindSafe for MediaStream
impl Send for MediaStream
impl Sync for MediaStream
impl Unpin for MediaStream
impl UnsafeUnpin for MediaStream
impl UnwindSafe for MediaStream
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