Skip to main content

Format

Enum Format 

Source
#[non_exhaustive]
pub enum Format {
Show 13 variants MpegTs, Isobmff, MpegPs, Matroska, WebM, Flv, Mxf, Wav, Ogg, Asf, AdtsAac, Mp3, AnnexB,
}
Expand description

The identified container/stream format.

Each variant maps to exactly one prober module. #[non_exhaustive] so adding a format is a minor bump.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

MpegTs

MPEG-2 Transport Stream — ISO/IEC 13818-1, 188-byte packets.

§

Isobmff

ISO Base Media File Format (.mp4/.mov/CMAF) — ISO/IEC 14496-12.

§

MpegPs

MPEG Program Stream — ISO/IEC 13818-1 §2.5.

§

Matroska

Matroska — EBML container.

§

WebM

WebM — an EBML container with DocType "webm".

§

Flv

FLV — Adobe Flash Video, File Format Specification v10.1.

§

Mxf

Material Exchange Format — SMPTE ST 377-1.

§

Wav

RIFF/WAVE — Microsoft WAV.

§

Ogg

Ogg — Xiph Ogg container.

§

Asf

ASF — Advanced Systems Format.

§

AdtsAac

Raw ADTS AAC elementary stream — ISO/IEC 13818-7.

§

Mp3

Raw MPEG-1/2 Layer III (MP3) elementary stream — ISO/IEC 11172-3.

§

AnnexB

Annex B NAL-unit byte stream — ITU-T H.264 only (HEVC is not detected; see the crate-root “Known gaps”).

Implementations§

Source§

impl Format

Source

pub fn name(&self) -> &'static str

The human-readable name of the format.

Source

pub fn is_elementary_stream(&self) -> bool

true when this format is an elementary (packetised payload) stream that a strong container match should suppress — ADTS AAC, MP3, and Annex B. These carry no container framing of their own and routinely appear inside a container’s payload, so a container verdict at LATTICE_STRONG or above must outvote them (see suppress_elementary_streams).

Trait Implementations§

Source§

impl Clone for Format

Source§

fn clone(&self) -> Format

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 Copy for Format

Source§

impl Debug for Format

Source§

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

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

impl Display for Format

Source§

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

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

impl Eq for Format

Source§

impl PartialEq for Format

Source§

fn eq(&self, other: &Format) -> 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 Format

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.