Skip to main content

DecoderSessionConfig

Struct DecoderSessionConfig 

Source
pub struct DecoderSessionConfig {
Show 24 fields pub codec: String, pub media_kind: DecoderMediaKind, pub extradata: Vec<u8>, pub bitstream_format: Option<DecoderBitstreamFormat>, pub width: Option<u32>, pub height: Option<u32>, pub coded_width: Option<u32>, pub coded_height: Option<u32>, pub reorder_depth: Option<u32>, pub sample_rate: Option<u32>, pub channels: Option<u16>, pub channel_layout: Option<String>, pub target_pcm_format: Option<DecoderFrameFormat>, pub target_pcm_sample_layout: Option<DecoderPcmSampleLayout>, pub codec_delay_samples: Option<u32>, pub priming_samples: Option<u32>, pub trailing_padding_samples: Option<u32>, pub seek_preroll_samples: Option<u32>, pub prefer_hardware: bool, pub required_decoder_implementation_name: Option<String>, pub require_cpu_output: bool, pub native_device_context: Option<DecoderNativeDeviceContext>, pub color: Option<NativeFrameColorMetadata>, pub hdr: Option<NativeFrameHdrMetadata>,
}
Expand description

Configuration used to open a decoder session.

Fields§

§codec: String§media_kind: DecoderMediaKind§extradata: Vec<u8>§bitstream_format: Option<DecoderBitstreamFormat>§width: Option<u32>§height: Option<u32>§coded_width: Option<u32>§coded_height: Option<u32>§reorder_depth: Option<u32>§sample_rate: Option<u32>§channels: Option<u16>§channel_layout: Option<String>§target_pcm_format: Option<DecoderFrameFormat>§target_pcm_sample_layout: Option<DecoderPcmSampleLayout>§codec_delay_samples: Option<u32>§priming_samples: Option<u32>§trailing_padding_samples: Option<u32>§seek_preroll_samples: Option<u32>§prefer_hardware: bool§required_decoder_implementation_name: Option<String>

Platform decoder implementation selected by a trusted host capability probe.

§require_cpu_output: bool§native_device_context: Option<DecoderNativeDeviceContext>§color: Option<NativeFrameColorMetadata>§hdr: Option<NativeFrameHdrMetadata>

Implementations§

Source§

impl DecoderSessionConfig

Source

pub fn audio_from_source_normalizer_track( track: &SourceNormalizerPacketTrackInfo, target_pcm_format: DecoderFrameFormat, target_pcm_sample_layout: DecoderPcmSampleLayout, ) -> Result<Self, DecoderError>

Builds an audio decoder session config from a SourceNormalizer audio track.

Source

pub fn apple_native_audio_from_source_normalizer_track( track: &SourceNormalizerPacketTrackInfo, ) -> Result<Self, DecoderError>

Builds the default Apple PCM output preference for native audio.

Trait Implementations§

Source§

impl Clone for DecoderSessionConfig

Source§

fn clone(&self) -> DecoderSessionConfig

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 DecoderSessionConfig

Source§

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

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

impl Default for DecoderSessionConfig

Source§

fn default() -> DecoderSessionConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for DecoderSessionConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for DecoderSessionConfig

Source§

impl PartialEq for DecoderSessionConfig

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for DecoderSessionConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for DecoderSessionConfig

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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

Source§

type Output = T

Should always be Self
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 = !

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.