pub struct TrackEntry { /* private fields */ }
Expand description

Describes a track.

Implementations§

source§

impl TrackEntry

source

pub fn track_number(&self) -> NonZeroU64

The track number as used in the block header.

source

pub fn track_uid(&self) -> NonZeroU64

A unique ID to identify the track.

source

pub fn track_type(&self) -> TrackType

The type of the track.

source

pub fn flag_enabled(&self) -> bool

Indicates if a track is usable. It is possible to turn a not usable track into a usable track using chapter codecs or control tracks.

source

pub fn flag_default(&self) -> bool

Set if that track (audio, video or subs) should be eligible for automatic selection by the player.

source

pub fn flag_forced(&self) -> bool

Applies only to subtitles. Set if that track should be eligible for automatic selection by the player if it matches the user’s language preference, even if the user’s preferences would normally not enable subtitles with the selected audio track.

source

pub fn flag_lacing(&self) -> bool

Indicates if the track may contain blocks using lacing.

source

pub fn default_duration(&self) -> Option<NonZeroU64>

Number of nanoseconds (not scaled via TimestampScale) per frame (one Element put into a (Simple)Block).

source

pub fn name(&self) -> Option<&str>

A human-readable track name.

source

pub fn language(&self) -> Option<&str>

Specifies the language of the track.

source

pub fn codec_id(&self) -> &str

An ID corresponding to the codec.

source

pub fn codec_private(&self) -> Option<&[u8]>

Private data only known to the codec.

source

pub fn codec_name(&self) -> Option<&str>

A human-readable string specifying the codec.

source

pub fn codec_delay(&self) -> Option<u64>

CodecDelay is ehe codec-built-in delay in nanoseconds. This value must be subtracted from each block timestamp in order to get the actual timestamp.

source

pub fn seek_pre_roll(&self) -> Option<u64>

After a discontinuity, SeekPreRoll is the duration in nanoseconds of the data the decoder must decode before the decoded data is valid.

source

pub fn video(&self) -> Option<&Video>

Video settings.

source

pub fn audio(&self) -> Option<&Audio>

Audio settings.

source

pub fn content_encodings(&self) -> Option<&[ContentEncoding]>

Settings for several content encoding mechanisms like compression or encryption.

Trait Implementations§

source§

impl Clone for TrackEntry

source§

fn clone(&self) -> TrackEntry

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TrackEntry

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.