Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2022-10-19 19:18:43 +0300
committerSebastian Dröge <sebastian@centricular.com>2022-10-19 19:43:29 +0300
commit12400b6b87e75cfdfa7701b62cf8698c11e14a73 (patch)
treedf8f49f8258a34e961b8f9710671fc0d97bf7c58 /audio
parent9ce8e93c6374a712a6c8981557c726a3fc04273b (diff)
Update everything for element factory builder API changes
And set properties as part of object construction wherever it makes sense.
Diffstat (limited to 'audio')
-rw-r--r--audio/audiofx/tests/audiornnoise.rs2
-rw-r--r--audio/audiofx/tests/hrtfrender.rs6
-rw-r--r--audio/csound/examples/effect_example.rs6
-rw-r--r--audio/csound/tests/csound_filter.rs6
4 files changed, 13 insertions, 7 deletions
diff --git a/audio/audiofx/tests/audiornnoise.rs b/audio/audiofx/tests/audiornnoise.rs
index fe8d50453..5c050e0c7 100644
--- a/audio/audiofx/tests/audiornnoise.rs
+++ b/audio/audiofx/tests/audiornnoise.rs
@@ -37,7 +37,7 @@ fn test_rnnoise_silence_small_buffers() {
}
fn test_rnnoise(audio_info: &gst_audio::AudioInfo, buffer_size: usize) {
- let filter = gst::ElementFactory::make("audiornnoise", None).unwrap();
+ let filter = gst::ElementFactory::make("audiornnoise").build().unwrap();
let mut h = gst_check::Harness::with_element(&filter, Some("sink"), Some("src"));
let sink_caps = audio_info.to_caps().unwrap();
let src_caps = sink_caps.clone();
diff --git a/audio/audiofx/tests/hrtfrender.rs b/audio/audiofx/tests/hrtfrender.rs
index ac27c29c2..8dccb1474 100644
--- a/audio/audiofx/tests/hrtfrender.rs
+++ b/audio/audiofx/tests/hrtfrender.rs
@@ -27,8 +27,10 @@ fn init() {
}
fn build_harness(src_caps: gst::Caps, sink_caps: gst::Caps) -> (gst_check::Harness, gst::Element) {
- let hrtf = gst::ElementFactory::make("hrtfrender", None).unwrap();
- hrtf.set_property("hrir-raw", &*CONFIG);
+ let hrtf = gst::ElementFactory::make("hrtfrender")
+ .property("hrir-raw", &*CONFIG)
+ .build()
+ .unwrap();
let mut h = gst_check::Harness::with_element(&hrtf, Some("sink"), Some("src"));
h.set_caps(src_caps, sink_caps);
diff --git a/audio/csound/examples/effect_example.rs b/audio/csound/examples/effect_example.rs
index bfce8cac1..a681f2c0a 100644
--- a/audio/csound/examples/effect_example.rs
+++ b/audio/csound/examples/effect_example.rs
@@ -79,8 +79,10 @@ fn create_pipeline() -> Result<gst::Pipeline, Box<dyn Error>> {
let audio_sink = gst::parse_bin_from_description(AUDIO_SINK, true)?.upcast();
- let csoundfilter = gst::ElementFactory::make("csoundfilter", None)?;
- csoundfilter.set_property("csd-text", &CSD);
+ let csoundfilter = gst::ElementFactory::make("csoundfilter")
+ .property("csd-text", &CSD)
+ .build()
+ .unwrap();
pipeline.add_many(&[&audio_src, &csoundfilter, &audio_sink])?;
diff --git a/audio/csound/tests/csound_filter.rs b/audio/csound/tests/csound_filter.rs
index 6d3ee8961..a6564be27 100644
--- a/audio/csound/tests/csound_filter.rs
+++ b/audio/csound/tests/csound_filter.rs
@@ -56,8 +56,10 @@ fn init() {
}
fn build_harness(src_caps: gst::Caps, sink_caps: gst::Caps, csd: &str) -> gst_check::Harness {
- let filter = gst::ElementFactory::make("csoundfilter", None).unwrap();
- filter.set_property("csd-text", &csd);
+ let filter = gst::ElementFactory::make("csoundfilter")
+ .property("csd-text", &csd)
+ .build()
+ .unwrap();
let mut h = gst_check::Harness::with_element(&filter, Some("sink"), Some("src"));