Struct gstreamer_audio::AudioInfo[][src]

pub struct AudioInfo(_, _);

Information describing audio properties. This information can be filled in from GstCaps with Self::from_caps().

Use the provided macros to access the info in this structure.

Implementations

impl AudioInfo[src]

pub fn builder<'a>(
    format: AudioFormat,
    rate: u32,
    channels: u32
) -> AudioInfoBuilder<'a>
[src]

pub fn is_valid(&self) -> bool[src]

pub fn from_caps(caps: &CapsRef) -> Result<Self, BoolError>[src]

Parse caps and update self.

caps

a crate::gst::Caps

Returns

TRUE if caps could be parsed

pub fn to_caps(&self) -> Result<Caps, BoolError>[src]

Convert the values of self into a crate::gst::Caps.

Returns

the new crate::gst::Caps containing the info of self.

pub fn convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>(
    &self,
    src_val: V
) -> Option<U>
[src]

Converts among various crate::gst::Format types. This function handles GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For raw audio, GST_FORMAT_DEFAULT corresponds to audio frames. This function can be used to handle pad queries of the type GST_QUERY_CONVERT.

src_fmt

crate::gst::Format of the src_val

src_val

value to convert

dest_fmt

crate::gst::Format of the dest_val

dest_val

pointer to destination value

Returns

TRUE if the conversion was successful.

pub fn convert_generic<V: Into<GenericFormattedValue>>(
    &self,
    src_val: V,
    dest_fmt: Format
) -> Option<GenericFormattedValue>
[src]

pub fn format(&self) -> AudioFormat[src]

pub fn format_info(&self) -> AudioFormatInfo[src]

pub fn layout(&self) -> AudioLayout[src]

pub fn flags(&self) -> AudioFlags[src]

pub fn rate(&self) -> u32[src]

pub fn channels(&self) -> u32[src]

pub fn bpf(&self) -> u32[src]

pub fn bps(&self) -> u32[src]

pub fn depth(&self) -> u32[src]

pub fn width(&self) -> u32[src]

pub fn endianness(&self) -> AudioEndianness[src]

pub fn is_big_endian(&self) -> bool[src]

pub fn is_little_endian(&self) -> bool[src]

pub fn is_float(&self) -> bool[src]

pub fn is_integer(&self) -> bool[src]

pub fn is_signed(&self) -> bool[src]

pub fn positions(&self) -> Option<&[AudioChannelPosition]>[src]

pub fn is_unpositioned(&self) -> bool[src]

Trait Implementations

impl Clone for AudioInfo[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for AudioInfo[src]

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

Formats the value using the given formatter. Read more

impl PartialEq<AudioInfo> for AudioInfo[src]

fn eq(&self, other: &Self) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl StaticType for AudioInfo[src]

fn static_type() -> Type[src]

Returns the type identifier of Self.

impl ValueType for AudioInfo[src]

type Type = Self

Type to get the Type from. Read more

impl Eq for AudioInfo[src]

impl Send for AudioInfo[src]

impl Sync for AudioInfo[src]

Auto Trait Implementations

impl RefUnwindSafe for AudioInfo

impl Unpin for AudioInfo

impl UnwindSafe for AudioInfo

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToSendValue for T where
    T: Send + ToValue + ?Sized
[src]

pub fn to_send_value(&self) -> SendValue[src]

Returns a SendValue clone of self.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<'a, T, C> FromValueOptional<'a> for T where
    C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
    T: FromValue<'a, Checker = C>, 
[src]