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/utils
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-12-17 18:35:43 +0300
committerSebastian Dröge <sebastian@centricular.com>2020-12-17 19:15:54 +0300
commit708c6aa57e1dabe35e8304dd878e130501282a7d (patch)
tree3463e4aaf2fcab70a98111d0496c036652f057f7 /utils
parentb80a607737ad16907333d3496304d4fcf1953740 (diff)
Update for new simplified glib::Object::new() API
Diffstat (limited to 'utils')
-rw-r--r--utils/fallbackswitch/src/fallbacksrc/custom_source/mod.rs7
-rw-r--r--utils/fallbackswitch/src/fallbacksrc/video_fallback/mod.rs10
2 files changed, 2 insertions, 15 deletions
diff --git a/utils/fallbackswitch/src/fallbacksrc/custom_source/mod.rs b/utils/fallbackswitch/src/fallbacksrc/custom_source/mod.rs
index 252bbf49a..470c49a02 100644
--- a/utils/fallbackswitch/src/fallbacksrc/custom_source/mod.rs
+++ b/utils/fallbackswitch/src/fallbacksrc/custom_source/mod.rs
@@ -15,8 +15,6 @@
// Free Software Foundation, Inc., 51 Franklin Street, Suite 500,
// Boston, MA 02110-1335, USA.
-use glib::prelude::*;
-
mod imp;
glib::glib_wrapper! {
@@ -30,9 +28,6 @@ unsafe impl Sync for CustomSource {}
impl CustomSource {
pub fn new(source: &gst::Element) -> CustomSource {
- glib::Object::new(CustomSource::static_type(), &[("source", source)])
- .unwrap()
- .downcast()
- .unwrap()
+ glib::Object::new(&[("source", source)]).unwrap()
}
}
diff --git a/utils/fallbackswitch/src/fallbacksrc/video_fallback/mod.rs b/utils/fallbackswitch/src/fallbacksrc/video_fallback/mod.rs
index ed2d5b722..b6b747f8c 100644
--- a/utils/fallbackswitch/src/fallbacksrc/video_fallback/mod.rs
+++ b/utils/fallbackswitch/src/fallbacksrc/video_fallback/mod.rs
@@ -16,8 +16,6 @@
// Free Software Foundation, Inc., 51 Franklin Street, Suite 500,
// Boston, MA 02110-1335, USA.
-use glib::prelude::*;
-
mod imp;
glib::glib_wrapper! {
@@ -31,12 +29,6 @@ unsafe impl Sync for VideoFallbackSource {}
impl VideoFallbackSource {
pub fn new(uri: Option<&str>, min_latency: u64) -> VideoFallbackSource {
- glib::Object::new(
- VideoFallbackSource::static_type(),
- &[("uri", &uri), ("min-latency", &min_latency)],
- )
- .unwrap()
- .downcast()
- .unwrap()
+ glib::Object::new(&[("uri", &uri), ("min-latency", &min_latency)]).unwrap()
}
}