gstreamer: Don't use a trait object for the property value in ChildProxy::set_child_property()

This makes it nicer to use as `1` can be passed directly instead of `&1`.
This commit is contained in:
Sebastian Dröge 2021-11-06 09:36:38 +02:00
parent 220c500799
commit 0444660d1f

View file

@ -8,10 +8,10 @@ use std::ptr;
pub trait ChildProxyExtManual: 'static { pub trait ChildProxyExtManual: 'static {
#[doc(alias = "get_child_property")] #[doc(alias = "get_child_property")]
fn child_property(&self, name: &str) -> Option<glib::Value>; fn child_property(&self, name: &str) -> Option<glib::Value>;
fn set_child_property( fn set_child_property<V: glib::ToValue>(
&self, &self,
name: &str, name: &str,
value: &dyn glib::ToValue, value: V,
) -> Result<(), glib::BoolError>; ) -> Result<(), glib::BoolError>;
} }
@ -38,10 +38,10 @@ impl<O: IsA<ChildProxy>> ChildProxyExtManual for O {
} }
} }
fn set_child_property( fn set_child_property<V: glib::ToValue>(
&self, &self,
name: &str, name: &str,
value: &dyn glib::ToValue, value: V,
) -> Result<(), glib::BoolError> { ) -> Result<(), glib::BoolError> {
unsafe { unsafe {
let found: bool = from_glib(ffi::gst_child_proxy_lookup( let found: bool = from_glib(ffi::gst_child_proxy_lookup(