Skip to main content

VideoTrack

Struct VideoTrack 

Source
pub struct VideoTrack {
    pub codec: VideoCodec,
    pub codec_private: Bytes,
    pub in_band_parameter_sets: bool,
    pub width: u32,
    pub height: u32,
    pub orientation: Orientation,
    pub sample_aspect_ratio: Option<SampleAspectRatio>,
    pub color: Option<ColorMetadata>,
    pub clean_aperture: Option<Rect>,
    pub frame_rate: Option<FrameRate>,
    pub alpha: bool,
    pub reorder_depth: Option<usize>,
}
Expand description

A video track’s picture facts.

Fields§

§codec: VideoCodec

The codec.

§codec_private: Bytes

The decoder configuration record (see VideoCodec); empty when the codec has none.

§in_band_parameter_sets: bool

Whether parameter sets also travel in the packets (hev1, avc3).

§width: u32

Coded width in pixels, as the sample entry stores it.

§height: u32

Coded height in pixels.

§orientation: Orientation

How the stored picture is shown: the track matrix, or the Matroska projection pose, with FFmpeg’s rotation and mirror semantics.

§sample_aspect_ratio: Option<SampleAspectRatio>

The pixel aspect ratio the container declares (pasp, Matroska display size).

§color: Option<ColorMetadata>

The color the container declares (colr nclx, Matroska Colour).

§clean_aperture: Option<Rect>

The clean aperture (clap), when declared.

§frame_rate: Option<FrameRate>

The nominal frame rate, when the container states one.

§alpha: bool

Whether the track carries alpha the way alpha2 reads it (HEVC alpha layer, VP9 block additions).

§reorder_depth: Option<usize>

The most pictures that precede any picture in decode order and follow it in presentation order, as the bitstream declares or implies it; None when unknown.

H.264 takes max_num_reorder_frames (inferred per ITU-T H.264 E.2.1 when the VUI has no bitstream restriction), HEVC sps_max_num_reorder_pics of the highest sub-layer, MPEG-4 Part 2 1 when B-VOPs may follow. VP8, VP9, AV1 and ProRes are 0: each packet yields at most one shown picture, in packet order.

Trait Implementations§

Source§

impl Clone for VideoTrack

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for VideoTrack

Source§

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

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

impl PartialEq for VideoTrack

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for VideoTrack

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

Source§

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>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.