From 4894e7b3ee45eecce38638fe0b4ad460f3f34a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 17 Aug 2021 09:34:10 +0300 Subject: [PATCH] Update for fallible Object::set_property_from_str() --- utils/fallbackswitch/src/fallbacksrc/imp.rs | 4 +++- utils/fallbackswitch/src/fallbacksrc/video_fallback/imp.rs | 4 +++- utils/togglerecord/examples/gtk_recording.rs | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/utils/fallbackswitch/src/fallbacksrc/imp.rs b/utils/fallbackswitch/src/fallbacksrc/imp.rs index 49b4e012..9419e558 100644 --- a/utils/fallbackswitch/src/fallbacksrc/imp.rs +++ b/utils/fallbackswitch/src/fallbacksrc/imp.rs @@ -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(); diff --git a/utils/fallbackswitch/src/fallbacksrc/video_fallback/imp.rs b/utils/fallbackswitch/src/fallbacksrc/video_fallback/imp.rs index 1ccb4fd9..046edde4 100644 --- a/utils/fallbackswitch/src/fallbacksrc/video_fallback/imp.rs +++ b/utils/fallbackswitch/src/fallbacksrc/video_fallback/imp.rs @@ -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() diff --git a/utils/togglerecord/examples/gtk_recording.rs b/utils/togglerecord/examples/gtk_recording.rs index 3db29856..4491c8b7 100644 --- a/utils/togglerecord/examples/gtk_recording.rs +++ b/utils/togglerecord/examples/gtk_recording.rs @@ -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();