pub struct ChapterTrack { /* private fields */ }Expand description
Represents a chapter track that can generate TRAK atoms and sample data
Implementations§
Source§impl ChapterTrack
impl ChapterTrack
Sourcepub fn sample_bytes(&self) -> Vec<u8> ⓘ
pub fn sample_bytes(&self) -> Vec<u8> ⓘ
Returns all sample data concatenated for writing to mdat
Sourcepub fn individual_samples(&self) -> &[Vec<u8>]
pub fn individual_samples(&self) -> &[Vec<u8>]
Returns the individual sample data
Sourcepub fn sample_sizes(&self) -> &[u32]
pub fn sample_sizes(&self) -> &[u32]
Returns the individual sample sizes
Sourcepub fn total_sample_size(&self) -> usize
pub fn total_sample_size(&self) -> usize
Returns the total size of all samples combined
Sourcepub fn sample_count(&self) -> u32
pub fn sample_count(&self) -> u32
Returns the number of chapter samples
Sourcepub fn has_uniform_sample_size(&self) -> bool
pub fn has_uniform_sample_size(&self) -> bool
Check if all samples have the same size (for STSZ optimization)
Sourcepub fn uniform_sample_size(&self) -> Option<u32>
pub fn uniform_sample_size(&self) -> Option<u32>
Get the uniform sample size if all samples are the same size
Sourcepub fn create_trak_atom(&self, chunk_offset: u64) -> Atom
pub fn create_trak_atom(&self, chunk_offset: u64) -> Atom
Creates a TRAK atom for the chapter track at the specified chunk offset
pub fn builder() -> ChapterTrackBuilder
Auto Trait Implementations§
impl Freeze for ChapterTrack
impl RefUnwindSafe for ChapterTrack
impl Send for ChapterTrack
impl Sync for ChapterTrack
impl Unpin for ChapterTrack
impl UnsafeUnpin for ChapterTrack
impl UnwindSafe for ChapterTrack
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> 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