diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2021-08-17 09:34:10 +0300 |
---|---|---|
committer | Jordan Petridis <jordan@centricular.com> | 2021-08-17 15:01:25 +0300 |
commit | 4894e7b3ee45eecce38638fe0b4ad460f3f34a5e (patch) | |
tree | 9a161d29e30c272ec9b78496d38d50b986aff762 | |
parent | 6b9f915286338fc0cc2189d75e09ab070f989f3a (diff) |
Update for fallible Object::set_property_from_str()
-rw-r--r-- | utils/fallbackswitch/src/fallbacksrc/imp.rs | 4 | ||||
-rw-r--r-- | utils/fallbackswitch/src/fallbacksrc/video_fallback/imp.rs | 4 | ||||
-rw-r--r-- | 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(); |