pub struct VideoTrack {
pub codec: TrackCodec,
pub width: u32,
pub height: u32,
pub config: Vec<u8>,
pub timescale: u32,
pub samples: Vec<Sample>,
}Expand description
A demuxed video track.
Fields§
§codec: TrackCodecWhich decoder this track needs.
width: u32Picture width in pixels.
height: u32Picture height in pixels.
config: Vec<u8>The avcC or hvcC payload, verbatim — what
CMVideoFormatDescriptionCreateFromH264ParameterSets and its HEVC
twin want, and the only part of the file a decoder needs before the
first frame.
timescale: u32Ticks per second for Sample::duration.
samples: Vec<Sample>In decode order — the order they sit in the file, which is the order a decoder must be fed them in.
Implementations§
Source§impl VideoTrack
impl VideoTrack
Sourcepub fn presentation_order(&self) -> Vec<usize>
pub fn presentation_order(&self) -> Vec<usize>
Indices into samples, in the order the frames are
meant to be shown.
The same as decode order for an all-intra or IPPP stream, and not for
anything with B-frames. A renderer walking samples directly gets the
pictures shuffled — which looks like the clip stuttering in a short
repeating cycle, one cycle per mini-GOP.
Sourcepub fn max_reorder(&self) -> usize
pub fn max_reorder(&self) -> usize
How far a decoder has to read ahead before the next picture to show is available — the most any frame is displayed after something coded later.
Trait Implementations§
Source§impl Clone for VideoTrack
impl Clone for VideoTrack
Auto Trait Implementations§
impl Forget for VideoTrack
impl Freeze for VideoTrack
impl Move for VideoTrack
impl RefUnwindSafe for VideoTrack
impl Send for VideoTrack
impl Sync for VideoTrack
impl Unpin for VideoTrack
impl UnsafeUnpin for VideoTrack
impl UnwindSafe for VideoTrack
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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