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

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
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/csound
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/csound')
-rw-r--r--audio/csound/examples/effect_example.rs6
-rw-r--r--audio/csound/tests/csound_filter.rs6
2 files changed, 8 insertions, 4 deletions
diff --git a/audio/csound/examples/effect_example.rs b/audio/csound/examples/effect_example.rs
index bfce8cac..a681f2c0 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 6d3ee896..a6564be2 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"));