pub struct FrameInfo {
pub is_sync: Option<bool>,
pub sample_idx: Option<usize>,
pub frame_nr: Option<usize>,
pub presentation_timestamp: Time,
pub duration: Time,
pub latest_decode_timestamp: Option<Time>,
}
Expand description
Meta information about a decoded video frame, as reported by the decoder.
Fields§
§is_sync: Option<bool>
The start of a new crate::demux::GroupOfPictures
?
This probably means this is a keyframe, and that and entire frame can be decoded from only this one sample (though I’m not 100% sure).
None = unknown.
sample_idx: Option<usize>
Which sample in the video is this from?
In MP4, one sample is one frame, but we may be reordering samples when decoding.
This is the order of which the samples appear in the container,
which is usually ordered by Self::latest_decode_timestamp
.
None = unknown.
frame_nr: Option<usize>
Which frame is this?
This is on the assumption that each sample produces a single frame, which is true for MP4.
This is the index of frames ordered by Self::presentation_timestamp
.
None = unknown.
presentation_timestamp: Time
The presentation timestamp of the frame.
duration: Time
How long the frame is valid.
latest_decode_timestamp: Option<Time>
The decode timestamp of the last chunk that was needed to decode this frame.
None = unknown.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameInfo
impl RefUnwindSafe for FrameInfo
impl Send for FrameInfo
impl Sync for FrameInfo
impl Unpin for FrameInfo
impl UnwindSafe for FrameInfo
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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