pub struct FrameData { /* private fields */ }Expand description
A single frame of data, including image and timestamp fields.
Implementations§
Source§impl FrameData
impl FrameData
Sourcepub fn timestamp(&self) -> Timestamp
pub fn timestamp(&self) -> Timestamp
Get the timestamp, measured as the duration elapsed since the track onset until the exposure started.
This is often called “PTS” (presentation time stamp).
Sourcepub fn into_image(self) -> ImageData
pub fn into_image(self) -> ImageData
Get the image data
Sourcepub fn idx(&self) -> usize
pub fn idx(&self) -> usize
Get the number of the frame in the source, in decode order.
Starts with 0. See the field docs on FrameData for the decode- vs
presentation-order distinction.
Sourcepub fn poc(&self) -> Option<i64>
pub fn poc(&self) -> Option<i64>
Get the frame’s picture order count (POC), when known.
See the FrameData::poc field docs. None for non-H.264 sources or
when POC could not be reconstructed.
pub fn decoded<'a>(&'a self) -> Option<DynamicFrame<'a>>
pub fn take_decoded(self) -> Option<DynamicFrameOwned>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameData
impl RefUnwindSafe for FrameData
impl Send for FrameData
impl Sync for FrameData
impl Unpin for FrameData
impl UnsafeUnpin for FrameData
impl UnwindSafe for FrameData
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> 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