diff --git a/gstreamer-audio/src/caps.rs b/gstreamer-audio/src/caps.rs index 605146a62..06353aefc 100644 --- a/gstreamer-audio/src/caps.rs +++ b/gstreamer-audio/src/caps.rs @@ -11,7 +11,12 @@ pub struct AudioCapsBuilder { impl AudioCapsBuilder { pub fn new() -> Self { let builder = Caps::builder("audio/x-raw"); - AudioCapsBuilder { builder } + let builder = AudioCapsBuilder { builder }; + builder + .rate_range(..) + .channels_range(..) + .layout_list([AudioLayout::Interleaved, AudioLayout::NonInterleaved]) + .format_list(AudioFormat::iter_raw()) } pub fn any_features(self) -> AudioCapsBuilder { diff --git a/gstreamer-video/src/caps.rs b/gstreamer-video/src/caps.rs index 9103fa7b6..0d6abdd99 100644 --- a/gstreamer-video/src/caps.rs +++ b/gstreamer-video/src/caps.rs @@ -11,7 +11,12 @@ pub struct VideoCapsBuilder { impl VideoCapsBuilder { pub fn new() -> Self { let builder = Caps::builder("video/x-raw"); - VideoCapsBuilder { builder } + let builder = VideoCapsBuilder { builder }; + builder + .format_list(VideoFormat::iter_raw()) + .width_range(..) + .height_range(..) + .framerate_range(..) } pub fn any_features(self) -> VideoCapsBuilder {