pub struct Reader<S: ByteSource = File> {
pub brand: FourCc,
pub quicktime: bool,
pub timescale: u32,
pub duration: u64,
pub tracks: Vec<Track>,
pub fragmented: bool,
/* private fields */
}Fields§
§brand: FourCc§quicktime: bool§timescale: u32§duration: u64§tracks: Vec<Track>§fragmented: boolImplementations§
Source§impl<S: ByteSource> Reader<S>
impl<S: ByteSource> Reader<S>
pub fn new(source: S) -> Result<Self>
pub fn source(&self) -> &S
pub fn duration_seconds(&self) -> f64
pub fn video(&self) -> Option<usize>
pub fn audio(&self) -> Vec<usize>
pub fn read(&self, track: usize, index: usize) -> Result<Vec<u8>>
pub fn read_into( &self, track: usize, index: usize, data: &mut Vec<u8>, ) -> Result<()>
pub fn read_span(&self, offset: u64, data: &mut Vec<u8>) -> Result<()>
pub fn packet(&self, track: usize, index: usize) -> Result<Packet>
Auto Trait Implementations§
impl<S> Freeze for Reader<S>where
S: Freeze,
impl<S> RefUnwindSafe for Reader<S>where
S: RefUnwindSafe,
impl<S> Send for Reader<S>where
S: Send,
impl<S> Sync for Reader<S>where
S: Sync,
impl<S> Unpin for Reader<S>where
S: Unpin,
impl<S> UnsafeUnpin for Reader<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Reader<S>where
S: UnwindSafe,
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