diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2021-11-06 10:34:10 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2021-11-06 10:34:10 +0300 |
commit | d9bda62a4720c0539a443a4e489645e9bb4af1eb (patch) | |
tree | d59eef871715fda4a9b37e355909a345dbd598d0 /audio/csound/src | |
parent | c99b7785f941fa4f9388a88e52d74c0fa34129ec (diff) |
Update for GLib/GStreamer API changes
And clean up a lot of related property/caps/structure code.
Diffstat (limited to 'audio/csound/src')
-rw-r--r-- | audio/csound/src/filter/imp.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/audio/csound/src/filter/imp.rs b/audio/csound/src/filter/imp.rs index cd8f9286e..9341a30b9 100644 --- a/audio/csound/src/filter/imp.rs +++ b/audio/csound/src/filter/imp.rs @@ -464,15 +464,12 @@ impl ElementImpl for CsoundFilter { fn pad_templates() -> &'static [gst::PadTemplate] { static PAD_TEMPLATES: Lazy<Vec<gst::PadTemplate>> = Lazy::new(|| { - let caps = gst::Caps::new_simple( - "audio/x-raw", - &[ - ("format", &gst_audio::AUDIO_FORMAT_F64.to_str()), - ("rate", &gst::IntRange::<i32>::new(1, i32::MAX)), - ("channels", &gst::IntRange::<i32>::new(1, i32::MAX)), - ("layout", &"interleaved"), - ], - ); + 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") + .build(); let src_pad_template = gst::PadTemplate::new( "src", gst::PadDirection::Src, |