AudioStream

Struct AudioStream 

Source
pub struct AudioStream {
Show 13 fields pub bits_per_sample: i64, pub channel_layout: Option<String>, pub channels: i64, pub initial_padding: i64, pub sample_fmt: String, pub sample_rate: i64, pub bit_rate: Option<i64>, pub codec_long_name: String, pub codec_name: String, pub duration_ts: Option<u64>, pub profile: Option<String>, pub bits_per_raw_sample: Option<i64>, pub tags: Option<AudioTags>,
}
Expand description

Stream of type audio

Fields§

§bits_per_sample: i64

The number of bits per sample in the audio stream.

§channel_layout: Option<String>

The layout of audio channels. eg. stereo

§channels: i64

number of channels eg. 2

§initial_padding: i64

The initial padding in the audio stream. Padding in audio streams refers to extra bits or bytes added to the beginning of audio data to align it with specific boundaries or to provide some additional space for processing.

§sample_fmt: String

The sample format of the audio stream. Smple format defines how each audio sample is represented in binary form. It describes the encoding method and the number of bits used to represent each sample.

Common sample formats include: s16: Signed 16-bit integer s32: Signed 32-bit integer flt: Floating point dbl: Double precision floating point todo: enum

§sample_rate: i64

The sample rate of the audio stream. eg. 44100 Hz

§bit_rate: Option<i64>

Bit rate of the video stream. The bit_rate represents the number of bits that are processed per unit of time in the video stream. It is a measure of the video stream’s data rate, indicating how much data is encoded for each second of video.

§codec_long_name: String

Long name of the codec used for the video stream.

§codec_name: String

Short name of the codec used for the video stream. Example: h264

§duration_ts: Option<u64>

Duration of the video stream in timestamp units.

§profile: Option<String>

Profile of the codec used for the video stream (e.g., Main, High).

§bits_per_raw_sample: Option<i64>

This specifies the number of bits used to represent each component of the pixel. For example, in an 8-bit raw sample, each color component (e.g., red, green, and blue in an RGB format) is represented by 8 bits, allowing 256 different levels per component.

§tags: Option<AudioTags>

Metadata tags associated with the video stream.

Trait Implementations§

Source§

impl Clone for AudioStream

Source§

fn clone(&self) -> AudioStream

Returns a duplicate 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 Debug for AudioStream

Source§

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

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

impl<'de> Deserialize<'de> for AudioStream

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 PartialEq for AudioStream

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for AudioStream

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 Eq for AudioStream

Source§

impl StructuralPartialEq for AudioStream

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, 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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,