pub struct Frame {
pub data: Vec<u8>,
pub pts_ms: i64,
pub is_audio: bool,
pub width: u32,
pub height: u32,
pub hdr_meta: Option<HdrMetadata>,
}Expand description
A raw decoded frame flowing through the transcode pipeline.
Frames carry either video (planar YUV pixel data) or audio (interleaved
i16 / f32 PCM) depending on the is_audio flag.
Fields§
§data: Vec<u8>Raw pixel (YUV) or sample (PCM) data.
pts_ms: i64Presentation timestamp in milliseconds.
is_audio: booltrue for audio frames, false for video frames.
width: u32Video frame width in pixels (0 for audio frames).
height: u32Video frame height in pixels (0 for audio frames).
hdr_meta: Option<HdrMetadata>HDR metadata attached to this video frame, if any.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more