pub struct Descriptor {
    pub short_name: &'static str,
    pub long_name: &'static str,
    pub extensions: &'static [&'static str],
    pub mime_types: &'static [&'static str],
    pub markers: &'static [&'static [u8]],
    pub score: fn(_: &[u8]) -> u8,
    pub inst: Instantiate,
}
Expand description

Descriptor provides declarative information about container and metadata formats. Descriptors are used by Probe and related machinery to scan a MediaSourceStream for media.

Fields§

§short_name: &'static str

A short ASCII-only string identifying the codec.

§long_name: &'static str

A longer, more descriptive, string identifying the codec.

§extensions: &'static [&'static str]

A list of case-insensitive file extensions that are generally used by the format.

§mime_types: &'static [&'static str]

A list of case-insensitive MIME types that are generally used by the format.

§markers: &'static [&'static [u8]]

A byte-string start-of-stream marker that will be searched for within the stream.

§score: fn(_: &[u8]) -> u8

A function to score a context buffer.

§inst: Instantiate

An instantiation function.

Trait Implementations§

source§

impl Clone for Descriptor

source§

fn clone(&self) -> Descriptor

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

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> 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<F, T> IntoSample<T> for F
where T: FromSample<F>,

source§

fn into_sample(self) -> T

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.