Update for fallible Object::set_property_from_str()

This commit is contained in:
Sebastian Dröge 2021-08-17 09:34:10 +03:00 committed by Jordan Petridis
parent 6b9f915286
commit 4894e7b3ee
No known key found for this signature in database
GPG key ID: 902CC06D159744F5
3 changed files with 8 additions and 4 deletions

View file

@ -893,7 +893,9 @@ impl FallbackSrc {
.expect("No audiotestsrc found");
input.add_many(&[&audiotestsrc]).unwrap();
audiotestsrc.set_property_from_str("wave", "silence");
audiotestsrc
.set_property_from_str("wave", "silence")
.unwrap();
audiotestsrc.set_property("is-live", &true).unwrap();
let srcpad = audiotestsrc.static_pad("src").unwrap();

View file

@ -420,7 +420,9 @@ impl VideoFallbackSource {
.expect("No videotestsrc found");
source.add_many(&[&videotestsrc]).unwrap();
videotestsrc.set_property_from_str("pattern", "black");
videotestsrc
.set_property_from_str("pattern", "black")
.unwrap();
videotestsrc.set_property("is-live", &true).unwrap();
videotestsrc.static_pad("src").unwrap()

View file

@ -34,7 +34,7 @@ fn create_pipeline() -> (
let video_src = gst::ElementFactory::make("videotestsrc", None).unwrap();
video_src.set_property("is-live", &true).unwrap();
video_src.set_property_from_str("pattern", "ball");
video_src.set_property_from_str("pattern", "ball").unwrap();
let timeoverlay = gst::ElementFactory::make("timeoverlay", None).unwrap();
timeoverlay
@ -68,7 +68,7 @@ fn create_pipeline() -> (
let audio_src = gst::ElementFactory::make("audiotestsrc", None).unwrap();
audio_src.set_property("is-live", &true).unwrap();
audio_src.set_property_from_str("wave", "ticks");
audio_src.set_property_from_str("wave", "ticks").unwrap();
let audio_tee = gst::ElementFactory::make("tee", None).unwrap();
let audio_queue1 = gst::ElementFactory::make("queue", None).unwrap();