diff options
author | Vivia Nikolaidou <vivia@ahiru.eu> | 2022-08-09 14:18:12 +0300 |
---|---|---|
committer | Vivia Nikolaidou <vivia@ahiru.eu> | 2022-08-09 22:01:10 +0300 |
commit | 8ee8ae581aae44860bb891d5be3d567c19e49ef2 (patch) | |
tree | 387173b673798d2f7359c074b098bea33b01e24d /audio/csound | |
parent | 247702b76d645c1ccdebe5727b31d461ec7bd598 (diff) |
audio: Use gst_audio::AudioCapsBuilder in some plugins
Simplify caps creation codes
Diffstat (limited to 'audio/csound')
-rw-r--r-- | audio/csound/src/filter/imp.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/audio/csound/src/filter/imp.rs b/audio/csound/src/filter/imp.rs index 2761f7e8..4972fea3 100644 --- a/audio/csound/src/filter/imp.rs +++ b/audio/csound/src/filter/imp.rs @@ -453,11 +453,9 @@ impl ElementImpl for CsoundFilter { fn pad_templates() -> &'static [gst::PadTemplate] { static PAD_TEMPLATES: Lazy<Vec<gst::PadTemplate>> = Lazy::new(|| { - let caps = gst::Caps::builder("audio/x-raw") - .field("format", gst_audio::AUDIO_FORMAT_F64.to_str()) - .field("rate", gst::IntRange::new(1, i32::MAX)) - .field("channels", gst::IntRange::new(1, i32::MAX)) - .field("layout", "interleaved") + let caps = gst_audio::AudioCapsBuilder::new() + .format(gst_audio::AUDIO_FORMAT_F64) + .layout(gst_audio::AudioLayout::Interleaved) .build(); let src_pad_template = gst::PadTemplate::new( "src", |