From 52ca97e7e69b79b8164cfdb2b1542ceeb6a2fbc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 16 Dec 2017 15:24:18 +0200 Subject: [PATCH] Let ChildProxy::set_child_property() take a &ToValue instead of an actual Value --- gstreamer/src/child_proxy.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gstreamer/src/child_proxy.rs b/gstreamer/src/child_proxy.rs index 40776d093..a45e233bb 100644 --- a/gstreamer/src/child_proxy.rs +++ b/gstreamer/src/child_proxy.rs @@ -15,7 +15,7 @@ use ChildProxy; pub trait ChildProxyExtManual { fn get_child_property(&self, name: &str) -> Option; - fn set_child_property(&self, name: &str, value: &glib::Value) -> Result<(), glib::BoolError>; + fn set_child_property(&self, name: &str, value: &glib::ToValue) -> Result<(), glib::BoolError>; } impl> ChildProxyExtManual for O { @@ -41,7 +41,7 @@ impl> ChildProxyExtManual for O { } } - fn set_child_property(&self, name: &str, value: &glib::Value) -> Result<(), glib::BoolError> { + fn set_child_property(&self, name: &str, value: &glib::ToValue) -> Result<(), glib::BoolError> { unsafe { let found: bool = from_glib(ffi::gst_child_proxy_lookup( self.to_glib_none().0, @@ -53,6 +53,7 @@ impl> ChildProxyExtManual for O { return Err(glib::BoolError("Child property not found")); } + let value = value.to_value(); ffi::gst_child_proxy_set_property( self.to_glib_none().0, name.to_glib_none().0,