pub struct MediaSample {
pub data: Bytes,
pub timestamp: u32,
pub codec: String,
pub media_type: MediaType,
}Expand description
Media sample data from WebRTC native track
Lightweight wrapper around WebRTC native RTP sample.
Fields§
§data: BytesRaw sample data (encoded audio/video frame)
timestamp: u32Sample timestamp (from RTP timestamp)
codec: StringCodec-specific information
media_type: MediaTypeMedia type (audio or video)
Trait Implementations§
Source§impl Clone for MediaSample
impl Clone for MediaSample
Source§fn clone(&self) -> MediaSample
fn clone(&self) -> MediaSample
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 moreAuto Trait Implementations§
impl !Freeze for MediaSample
impl RefUnwindSafe for MediaSample
impl Send for MediaSample
impl Sync for MediaSample
impl Unpin for MediaSample
impl UnwindSafe for MediaSample
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