Struct EncodedFrame
#[non_exhaustive]pub struct EncodedFrame {
pub data: Bytes,
pub timestamp: Timestamp,
pub at: Instant,
}Expand description
One encoded frame and the time it presents at.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.data: BytesThe frame: one length-prefixed H.264 access unit, or one raw AAC frame.
timestamp: TimestampThe presentation time, on the producer’s own timeline.
Frames come in decode order, so with B-frames the times do not rise monotonically.
at: InstantThe wall-clock instant timestamp stands for.
A broadcast maps every timestamp of a stream with the offset of its
first frame’s at, so an audio and a video stream that agree on it
stay in sync wherever each starts.
Implementations§
§impl EncodedFrame
impl EncodedFrame
pub fn new(data: Bytes, timestamp: Timestamp, at: Instant) -> EncodedFrame
pub fn new(data: Bytes, timestamp: Timestamp, at: Instant) -> EncodedFrame
Creates a frame of data that presents at timestamp, which stands for the instant at.
Trait Implementations§
§impl Clone for EncodedFrame
impl Clone for EncodedFrame
§fn clone(&self) -> EncodedFrame
fn clone(&self) -> EncodedFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EncodedFrame
impl RefUnwindSafe for EncodedFrame
impl Send for EncodedFrame
impl Sync for EncodedFrame
impl Unpin for EncodedFrame
impl UnsafeUnpin for EncodedFrame
impl UnwindSafe for EncodedFrame
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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