Struct FormatProperties

Source
pub struct FormatProperties(pub spa_format);

Tuple Fields§

§0: spa_format

Implementations§

Source§

impl FormatProperties

Source

pub const MediaType: Self

media type (Id enum spa_media_type)

Source

pub const MediaSubtype: Self

media subtype (Id enum spa_media_subtype)

Source

pub const AudioFormat: Self

audio format, (Id enum spa_audio_format)

Source

pub const AudioFlags: Self

optional flags (Int)

Source

pub const AudioRate: Self

sample rate (Int)

Source

pub const AudioChannels: Self

number of audio channels (Int)

Source

pub const AudioPosition: Self

channel positions (Id enum spa_audio_position)

Source

pub const AudioIec958Codec: Self

codec used (IEC958) (Id enum spa_audio_iec958_codec)

Source

pub const AudioBitorder: Self

bit order (Id enum spa_param_bitorder)

Source

pub const AudioInterleave: Self

Interleave bytes (Int)

Source

pub const VideoFormat: Self

video format (Id enum spa_video_format)

Source

pub const VideoModifier: Self

format modifier (Long), use only with DMA-BUF and omit for other buffer types

Source

pub const VideoSize: Self

size (Rectangle)

Source

pub const VideoFramerate: Self

frame rate (Fraction)

Source

pub const VideoMaxFramerate: Self

maximum frame rate (Fraction)

Source

pub const VideoViews: Self

number of views (Int)

Source

pub const VideoInterlaceMode: Self

(Id enum spa_video_interlace_mode)

Source

pub const VideoPixelAspectRatio: Self

(Rectangle)

Source

pub const VideoMultiviewMode: Self

(Id enum spa_video_multiview_mode)

Source

pub const VideoMultiviewFlags: Self

(Id enum spa_video_multiview_flags)

Source

pub const VideoChromaSite: Self

/Id enum spa_video_chroma_site)

Source

pub const VideoColorRange: Self

/Id enum spa_video_color_range)

Source

pub const VideoColorMatrix: Self

/Id enum spa_video_color_matrix)

Source

pub const VideoTransferFunction: Self

/Id enum spa_video_transfer_function)

Source

pub const VideoColorPrimaries: Self

/Id enum spa_video_color_primaries)

Source

pub const VideoProfile: Self

(Int)

Source

pub const VideoLevel: Self

(Int)

Source

pub const VideoH264StreamFormat: Self

(Id enum spa_h264_stream_format)

Source

pub const VideoH264Alignment: Self

(Id enum spa_h264_alignment)

Source

pub fn is_audio(&self) -> bool

Source

pub fn is_video(&self) -> bool

Source

pub fn is_image(&self) -> bool

Source

pub fn is_binary(&self) -> bool

Source

pub fn is_stream(&self) -> bool

Source

pub fn is_application(&self) -> bool

Source

pub fn from_raw(raw: spa_format) -> Self

Obtain a FormatProperties from a raw spa_format variant.

Source

pub fn as_raw(&self) -> spa_format

Get the raw spa_sys::spa_format representing this FormatProperties.

Trait Implementations§

Source§

impl Clone for FormatProperties

Source§

fn clone(&self) -> FormatProperties

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 FormatProperties

Source§

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

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

impl PartialEq for FormatProperties

Source§

fn eq(&self, other: &FormatProperties) -> 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 PartialOrd for FormatProperties

Source§

fn partial_cmp(&self, other: &FormatProperties) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for FormatProperties

Source§

impl Eq for FormatProperties

Source§

impl StructuralPartialEq for FormatProperties

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.