Skip to main content

TrackParams

Type Alias TrackParams 

Source
pub type TrackParams = TrackParams<Ffmpeg>;
Expand description

A track’s per-kind codec parameters, as TrackInfo carries them.

Aliased Type§

pub enum TrackParams {
    Video {
        codec: CodecId,
        width: u32,
        height: u32,
        pixel_format: PixelFormat,
        frame_rate: Option<Timebase>,
    },
    Audio {
        codec: CodecId,
        sample_rate: u32,
        channel_count: u8,
        sample_format: SampleFormat,
        channel_layout: ChannelLayoutDescription,
    },
    Subtitle {
        codec: CodecId,
    },
    Data {
        codec: CodecId,
    },
    Attachment {
        codec: CodecId,
    },
    Unknown {
        codec: CodecId,
    },
}

Variants§

§

Video

Motion video.

Fields

§codec: CodecId

Codec identifier.

§width: u32

Coded width in pixels.

§height: u32

Coded height in pixels.

§pixel_format: PixelFormat

Pixel format the track declares, in the backend’s vocabulary.

§frame_rate: Option<Timebase>

Average frame rate, as a rate-shaped [Timebase] (30000/1001 for 29.97 fps), or None when the container does not say.

§

Audio

Audio.

Fields

§codec: CodecId

Codec identifier.

§sample_rate: u32

Sample rate in Hz.

§channel_count: u8

Channel count.

§sample_format: SampleFormat

Sample format the track declares, in the backend’s vocabulary.

§channel_layout: ChannelLayoutDescription

Channel layout the track declares, in the backend’s vocabulary.

§

Subtitle

Subtitles / captions.

Fields

§codec: CodecId

Codec identifier.

§

Data

Timed opaque data.

Fields

§codec: CodecId

Codec identifier.

§

Attachment

An attached file — a font, cover art.

Fields

§codec: CodecId

Codec identifier — the font format, or the still image’s codec for cover art.

§

Unknown

A track the backend could not classify.

Fields

§codec: CodecId

Codec identifier, which may itself be the backend’s “none”.