Skip to main content

MediaStreamClassifierSpec

Struct MediaStreamClassifierSpec 

Source
pub struct MediaStreamClassifierSpec;
Expand description

Service specification for pluggable media stream classifier providers.

The configuration is MimeConfig, and created services implement the MediaStreamClassifier trait object.

Trait Implementations§

Source§

impl Debug for MediaStreamClassifierSpec

Source§

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

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

impl ServiceProvider<MediaStreamClassifierSpec> for FfprobeCommandMediaStreamClassifierProvider

Source§

fn descriptor(&self) -> Result<ProviderDescriptor, ProviderRegistryError>

Gets FFprobe classifier metadata.

Source§

fn availability( &self, _config: &MimeConfig, ) -> MediaStreamClassifierAvailability

Reports the provider as available.

The classifier itself handles command execution lazily so temporary PATH changes and best-effort refinement do not make registry creation environment-sensitive.

Source§

fn create_box( &self, _config: &MimeConfig, ) -> Result<Box<dyn MediaStreamClassifier>, ProviderCreateError>

Creates an FFprobe-backed classifier.

Source§

fn create_arc( &self, config: &<Spec as ServiceSpec>::Config, ) -> Result<Arc<<Spec as ServiceSpec>::Service>, ProviderCreateError>

Creates an atomically shared service instance. Read more
Source§

fn create_rc( &self, config: &<Spec as ServiceSpec>::Config, ) -> Result<Rc<<Spec as ServiceSpec>::Service>, ProviderCreateError>

Creates a locally shared service instance. Read more
Source§

impl ServiceSpec for MediaStreamClassifierSpec

Source§

type Config = MimeConfig

Configuration type passed to provider checks and factories.
Source§

type Service = dyn MediaStreamClassifier

Service contract implemented by provider-created services.

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<T, D> IntoConfigDefault<T> for D
where D: IntoValueDefault<T>,

Source§

fn into_config_default(self) -> T

Converts this fallback value into T.
Source§

impl<T> IntoValueDefault<T> for T

Source§

fn into_value_default(self) -> T

Converts this argument into the default value.
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.