pub struct Track {Show 19 fields
pub number: u64,
pub uid: u64,
pub kind: TrackKind,
pub enabled: bool,
pub default: bool,
pub name: String,
pub language: String,
pub codec_id: String,
pub codec_private: Vec<u8>,
pub default_duration: Option<u64>,
pub codec_delay: u64,
pub seek_pre_roll: u64,
pub width: u32,
pub height: u32,
pub video: Option<VideoInfo>,
pub audio: Option<AudioInfo>,
pub encodings: Vec<ContentEncoding>,
pub time_base: TimeBase,
pub samples: Vec<Sample>,
/* private fields */
}Fields§
§number: u64§uid: u64§kind: TrackKind§enabled: bool§default: bool§name: String§language: String§codec_id: String§codec_private: Vec<u8>§default_duration: Option<u64>§codec_delay: u64§seek_pre_roll: u64§width: u32§height: u32§video: Option<VideoInfo>§audio: Option<AudioInfo>§encodings: Vec<ContentEncoding>§time_base: TimeBase§samples: Vec<Sample>Implementations§
Source§impl Track
impl Track
pub fn codec(&self) -> Option<Codec>
pub fn codec_name(&self) -> &str
pub fn extradata(&self) -> Option<Vec<u8>>
pub fn channels(&self) -> u32
pub fn sample_rate(&self) -> u32
pub fn rotation(&self) -> u16
pub fn seconds(&self, ticks: i64) -> f64
pub fn ticks(&self, seconds: f64) -> i64
pub fn nanos(&self, ticks: i64) -> i64
pub fn end(&self) -> i64
pub fn duration_seconds(&self) -> f64
pub fn fps(&self) -> f64
pub fn keyframes(&self) -> &[u32]
pub fn keyframe_before(&self, index: usize) -> usize
pub fn sample_at(&self, pts: i64) -> Option<usize>
pub fn keyframe_at(&self, pts: i64) -> Option<usize>
pub fn stripped_header(&self) -> Option<&[u8]>
pub fn frames_readable(&self) -> bool
Trait Implementations§
impl StructuralPartialEq for Track
Auto Trait Implementations§
impl Freeze for Track
impl RefUnwindSafe for Track
impl Send for Track
impl Sync for Track
impl Unpin for Track
impl UnsafeUnpin for Track
impl UnwindSafe for Track
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