Skip to main content

CodecId

Struct CodecId 

Source
pub struct CodecId(/* private fields */);
Expand description

Codec identifier. Wraps the integer value of an AVCodecID enum variant; comparisons and storage work without ever transmuting back into the bindgen enum.

Implementations§

Source§

impl CodecId

Source

pub const NONE: Self

AV_CODEC_ID_NONE — sentinel for “no codec.”

Source

pub const H264: Self

H.264 / AVC (ITU-T H.264 / ISO/IEC 14496-10).

Source

pub const HEVC: Self

H.265 / HEVC (ITU-T H.265 / ISO/IEC 23008-2).

Source

pub const AV1: Self

AV1 (Alliance for Open Media).

Source

pub const VP9: Self

VP9 (Google).

Source

pub const VP8: Self

VP8 (Google).

Source

pub const MPEG2VIDEO: Self

MPEG-2 Video (ITU-T H.262 / ISO/IEC 13818-2).

Source

pub const MPEG4: Self

MPEG-4 Part 2 Visual (ISO/IEC 14496-2).

Source

pub const PRORES: Self

Apple ProRes.

Source

pub const DNXHD: Self

Avid DNxHD / DNxHR (SMPTE VC-3).

Source

pub const FFV1: Self

FFV1 — lossless intra-frame.

Source

pub const JPEG2000: Self

JPEG 2000.

Source

pub const MJPEG: Self

MJPEG.

Source

pub const VC1: Self

VC-1 (SMPTE 421M, Microsoft Windows Media Video 9).

Source

pub const VVC: Self

VVC / H.266 (ITU-T H.266).

Source

pub const AAC: Self

AAC (ISO/IEC 14496-3).

Source

pub const MP3: Self

MP3 (MPEG-1/2 Audio Layer III).

Source

pub const OPUS: Self

Opus (RFC 6716).

Source

pub const FLAC: Self

FLAC — Free Lossless Audio Codec.

Source

pub const AC3: Self

AC-3 (ATSC A/52, Dolby Digital).

Source

pub const EAC3: Self

E-AC-3 (Dolby Digital Plus).

Source

pub const ALAC: Self

Apple Lossless Audio Codec.

Source

pub const DTS: Self

DTS / DTS-HD.

Source

pub const VORBIS: Self

Vorbis.

Source

pub const PCM_S16LE: Self

PCM signed 16-bit little-endian.

Source

pub const PCM_S16BE: Self

PCM signed 16-bit big-endian.

Source

pub const PCM_S24LE: Self

PCM signed 24-bit little-endian.

Source

pub const PCM_S32LE: Self

PCM signed 32-bit little-endian.

Source

pub const PCM_F32LE: Self

PCM 32-bit float little-endian.

Source

pub const PCM_F64LE: Self

PCM 64-bit float little-endian.

Source

pub const SUBRIP: Self

SubRip (.srt).

Source

pub const ASS: Self

Advanced SubStation Alpha (.ass / .ssa).

Source

pub const WEBVTT: Self

WebVTT (.vtt).

Source

pub const MOV_TEXT: Self

3GPP Timed Text / MOV text track.

Source

pub const DVB_SUBTITLE: Self

DVB subtitle (bitmap).

Source

pub const HDMV_PGS_SUBTITLE: Self

HDMV / Blu-ray PGS subtitle (bitmap).

Source

pub const DVD_SUBTITLE: Self

DVD VOBSUB subtitle (bitmap).

Source

pub const fn from_raw(raw: i32) -> Self

Constructs a CodecId from the raw integer FFmpeg uses for AVCodecContext::codec_id etc. Use this only when you have a value that came from FFmpeg or that you know maps to a real codec; arbitrary integers are still legal but Debug will fall back to printing the raw value.

Source

pub const fn raw(self) -> i32

Returns the underlying integer.

Trait Implementations§

Source§

impl Clone for CodecId

Source§

fn clone(&self) -> CodecId

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 CodecId

Source§

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

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

impl Hash for CodecId

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for CodecId

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for CodecId

Source§

impl Eq for CodecId

Source§

impl StructuralPartialEq for CodecId

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = 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>,

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more