audio: Add new_interleaved() to AudioCapsBuilder

Because it's very common that elements support only interleaved audio.
This commit is contained in:
Vivia Nikolaidou 2022-08-10 12:29:13 +03:00
parent 2cb7fc8122
commit 583ef0395d

View file

@ -19,6 +19,10 @@ impl AudioCapsBuilder<gst::caps::NoFeature> {
.format_list(AudioFormat::iter_raw())
}
pub fn new_interleaved() -> Self {
AudioCapsBuilder::new().layout(AudioLayout::Interleaved)
}
pub fn any_features(self) -> AudioCapsBuilder<gst::caps::HasFeatures> {
AudioCapsBuilder {
builder: self.builder.any_features(),