Struct gstreamer_audio::AudioCapsBuilder
source · pub struct AudioCapsBuilder<T> {
builder: Builder<T>,
}
Fields§
§builder: Builder<T>
Implementations§
source§impl AudioCapsBuilder<NoFeature>
impl AudioCapsBuilder<NoFeature>
sourcepub fn new() -> Self
pub fn new() -> Self
Constructs an AudioCapsBuilder
for the “audio/x-raw” encoding.
If left unchanged, the resulting Caps
will be initialized with:
- “audio/x-raw” encoding.
- maximum rate range.
- maximum channels range.
- both interleaved and non-interleaved layouts.
- all available formats.
Use AudioCapsBuilder::for_encoding
to specify another encoding.
sourcepub fn new_interleaved() -> Self
pub fn new_interleaved() -> Self
Constructs an AudioCapsBuilder
for the “audio/x-raw” encoding
with interleaved layout.
If left unchanged, the resulting Caps
will be initialized with:
- “audio/x-raw” encoding.
- maximum rate range.
- maximum channels range.
- interleaved layout.
- all available formats.
Use AudioCapsBuilder::for_encoding
to specify another encoding.
sourcepub fn for_encoding(encoding: impl IntoGStr) -> Self
pub fn for_encoding(encoding: impl IntoGStr) -> Self
Constructs an AudioCapsBuilder
for the specified encoding.
The resulting Caps
will use the encoding
argument as name
and will not contain any additional fields unless explicitly added.
pub fn any_features(self) -> AudioCapsBuilder<HasFeatures>
pub fn features( self, features: impl IntoIterator<Item = impl IntoGStr>, ) -> AudioCapsBuilder<HasFeatures>
source§impl<T> AudioCapsBuilder<T>
impl<T> AudioCapsBuilder<T>
pub fn format(self, format: AudioFormat) -> Self
pub fn format_list(self, formats: impl IntoIterator<Item = AudioFormat>) -> Self
pub fn rate(self, rate: i32) -> Self
pub fn rate_range(self, rates: impl RangeBounds<i32>) -> Self
pub fn rate_list(self, rates: impl IntoIterator<Item = i32>) -> Self
pub fn channels(self, channels: i32) -> Self
pub fn channels_range(self, channels: impl RangeBounds<i32>) -> Self
pub fn channels_list(self, channels: impl IntoIterator<Item = i32>) -> Self
pub fn layout(self, layout: AudioLayout) -> Self
pub fn layout_list(self, layouts: impl IntoIterator<Item = AudioLayout>) -> Self
pub fn channel_mask(self, channel_mask: u64) -> Self
pub fn fallback_channel_mask(self) -> Self
pub fn field(self, name: &str, value: impl Into<Value> + Send) -> Self
pub fn build(self) -> Caps
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for AudioCapsBuilder<T>
impl<T> RefUnwindSafe for AudioCapsBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for AudioCapsBuilder<T>where
T: Send,
impl<T> Sync for AudioCapsBuilder<T>where
T: Sync,
impl<T> Unpin for AudioCapsBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for AudioCapsBuilder<T>where
T: UnwindSafe,
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more