forked from mirrors/gstreamer-rs
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:
parent
220c500799
commit
0444660d1f
1 changed files with 4 additions and 4 deletions
|
@ -8,10 +8,10 @@ use std::ptr;
|
|||
pub trait ChildProxyExtManual: 'static {
|
||||
#[doc(alias = "get_child_property")]
|
||||
fn child_property(&self, name: &str) -> Option<glib::Value>;
|
||||
fn set_child_property(
|
||||
fn set_child_property<V: glib::ToValue>(
|
||||
&self,
|
||||
name: &str,
|
||||
value: &dyn glib::ToValue,
|
||||
value: V,
|
||||
) -> 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,
|
||||
name: &str,
|
||||
value: &dyn glib::ToValue,
|
||||
value: V,
|
||||
) -> Result<(), glib::BoolError> {
|
||||
unsafe {
|
||||
let found: bool = from_glib(ffi::gst_child_proxy_lookup(
|
||||
|
|
Loading…
Reference in a new issue