pub struct Sample {
pub offset: u64,
pub size: u32,
pub duration: u32,
pub dts: i64,
pub pts: i64,
pub sync: bool,
}Expand description
One coded frame: where it is in the file, when it decodes and when it shows.
Fields§
§offset: u64Byte offset from the start of the file.
size: u32Size in bytes.
duration: u32In the track’s timescale.
dts: i64Decode timestamp: the running sum of the durations before this one. Samples are stored in decode order, so this only ever goes up.
pts: i64Presentation timestamp — dts plus the ctts composition offset.
Not the same order as dts when the stream has B-frames, which is
most streams: a B-frame is coded after the picture it is displayed
before. Anything showing these frames has to sort by this and not by
their position in the file.
sync: boolA sync sample — a decoder can begin here. Everything is one for
all-intra footage; for anything else this is what stss lists.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Sample
impl Freeze for Sample
impl Move for Sample
impl RefUnwindSafe for Sample
impl Send for Sample
impl Sync for Sample
impl Unpin for Sample
impl UnsafeUnpin for Sample
impl UnwindSafe for Sample
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> 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