Struct matroska::Track

source ·
pub struct Track {
Show 19 fields pub number: u64, pub uid: u64, pub tracktype: Tracktype, pub enabled: bool, pub default: bool, pub forced: bool, pub hearing_impaired: Option<bool>, pub visual_impaired: Option<bool>, pub text_descriptions: Option<bool>, pub original: Option<bool>, pub commentary: Option<bool>, pub interlaced: bool, pub default_duration: Option<Duration>, pub name: Option<String>, pub language: Option<Language>, pub codec_id: String, pub codec_private: Option<Vec<u8>>, pub codec_name: Option<String>, pub settings: Settings,
}
Expand description

A TrackEntry segment in the Tracks segment container

Fields§

§number: u64

The track number, starting from 1

§uid: u64

The track’s UID

§tracktype: Tracktype

The track’s type

§enabled: bool

If the track is usable

§default: bool

If the track should be active if no other preferences found

§forced: bool

If the track must be active during playback

§hearing_impaired: Option<bool>

If the track is suitable for users with hearing impairments

§visual_impaired: Option<bool>

If the track is suitable for users with visual impairments

§text_descriptions: Option<bool>

If the track contains textual descriptions of video content

§original: Option<bool>

If the track is in the content’s original language

§commentary: Option<bool>

If the track contains commentary

§interlaced: bool

If the track contains blocks using lacing

§default_duration: Option<Duration>

Duration of each frame

§name: Option<String>

A human-readable track name

§language: Option<Language>

The track’s language

§codec_id: String

The track’s codec’s ID

§codec_private: Option<Vec<u8>>

Private data known only to the codec

§codec_name: Option<String>

The track’s codec’s human-readable name

§settings: Settings

The track’s audio or video settings

Implementations§

source§

impl Track

source

pub fn is_video(&self) -> bool

returns true if track is video

source

pub fn is_audio(&self) -> bool

returns true if track is audio

source

pub fn is_subtitle(&self) -> bool

returns true if track is subtitle

Trait Implementations§

source§

impl Clone for Track

source§

fn clone(&self) -> Track

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 Track

source§

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

Formats the value using the given formatter. Read more
source§

impl Parseable for Track

§

type Output = Vec<Track>

What to parse from the stream, such as ourself or a Vec of ourselves
source§

const ID: u32 = 374_648_427u32

Our Matroska element ID
source§

fn parse<R: Read>(r: &mut R, size: u64) -> Result<Vec<Track>, MatroskaError>

Performs the actual parsing
source§

impl PartialEq for Track

source§

fn eq(&self, other: &Track) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Track

Auto Trait Implementations§

§

impl RefUnwindSafe for Track

§

impl Send for Track

§

impl Sync for Track

§

impl Unpin for Track

§

impl UnwindSafe for Track

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where 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 T
where 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 T
where 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.