pub struct DecoderPcmFrameMetadata {
pub media_kind: DecoderMediaKind,
pub format: DecoderFrameFormat,
pub codec: String,
pub pts_us: Option<i64>,
pub duration_us: Option<i64>,
pub sample_rate: u32,
pub channels: u16,
pub channel_layout: Option<String>,
pub sample_layout: DecoderPcmSampleLayout,
pub frame_count: u32,
pub discontinuity: bool,
}Expand description
Metadata for a decoded PCM audio frame.
Fields§
§media_kind: DecoderMediaKind§format: DecoderFrameFormat§codec: String§pts_us: Option<i64>§duration_us: Option<i64>§sample_rate: u32§channels: u16§channel_layout: Option<String>§sample_layout: DecoderPcmSampleLayout§frame_count: u32§discontinuity: boolImplementations§
Source§impl DecoderPcmFrameMetadata
impl DecoderPcmFrameMetadata
Sourcepub fn audio(
codec: impl Into<String>,
format: DecoderFrameFormat,
sample_rate: u32,
channels: u16,
sample_layout: DecoderPcmSampleLayout,
frame_count: u32,
) -> Self
pub fn audio( codec: impl Into<String>, format: DecoderFrameFormat, sample_rate: u32, channels: u16, sample_layout: DecoderPcmSampleLayout, frame_count: u32, ) -> Self
Creates PCM metadata and pins media_kind to audio.
Sourcepub fn validate(&self) -> Result<usize, DecoderError>
pub fn validate(&self) -> Result<usize, DecoderError>
Validates the metadata before it crosses the decoder/session boundary.
Trait Implementations§
Source§impl Clone for DecoderPcmFrameMetadata
impl Clone for DecoderPcmFrameMetadata
Source§fn clone(&self) -> DecoderPcmFrameMetadata
fn clone(&self) -> DecoderPcmFrameMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecoderPcmFrameMetadata
impl Debug for DecoderPcmFrameMetadata
Source§impl<'de> Deserialize<'de> for DecoderPcmFrameMetadata
impl<'de> Deserialize<'de> for DecoderPcmFrameMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DecoderPcmFrameMetadata
Source§impl PartialEq for DecoderPcmFrameMetadata
impl PartialEq for DecoderPcmFrameMetadata
Source§impl Serialize for DecoderPcmFrameMetadata
impl Serialize for DecoderPcmFrameMetadata
impl StructuralPartialEq for DecoderPcmFrameMetadata
Auto Trait Implementations§
impl Freeze for DecoderPcmFrameMetadata
impl RefUnwindSafe for DecoderPcmFrameMetadata
impl Send for DecoderPcmFrameMetadata
impl Sync for DecoderPcmFrameMetadata
impl Unpin for DecoderPcmFrameMetadata
impl UnsafeUnpin for DecoderPcmFrameMetadata
impl UnwindSafe for DecoderPcmFrameMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more