From 583ef0395d2d9a1626838e909a0f59efb7476804 Mon Sep 17 00:00:00 2001 From: Vivia Nikolaidou Date: Wed, 10 Aug 2022 12:29:13 +0300 Subject: [PATCH] audio: Add new_interleaved() to AudioCapsBuilder Because it's very common that elements support only interleaved audio. --- gstreamer-audio/src/caps.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gstreamer-audio/src/caps.rs b/gstreamer-audio/src/caps.rs index 06353aefc..b73b34619 100644 --- a/gstreamer-audio/src/caps.rs +++ b/gstreamer-audio/src/caps.rs @@ -19,6 +19,10 @@ impl AudioCapsBuilder { .format_list(AudioFormat::iter_raw()) } + pub fn new_interleaved() -> Self { + AudioCapsBuilder::new().layout(AudioLayout::Interleaved) + } + pub fn any_features(self) -> AudioCapsBuilder { AudioCapsBuilder { builder: self.builder.any_features(),