gstreamer_controller/auto/
proxy_control_binding.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::ffi;
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10    /// A [`gst::ControlBinding`][crate::gst::ControlBinding] that forwards requests to another [`gst::ControlBinding`][crate::gst::ControlBinding]
11    ///
12    /// # Implements
13    ///
14    /// [`trait@gst::prelude::ControlBindingExt`], [`trait@gst::prelude::ObjectExt`]
15    #[doc(alias = "GstProxyControlBinding")]
16    pub struct ProxyControlBinding(Object<ffi::GstProxyControlBinding, ffi::GstProxyControlBindingClass>) @extends gst::ControlBinding, gst::Object;
17
18    match fn {
19        type_ => || ffi::gst_proxy_control_binding_get_type(),
20    }
21}
22
23impl ProxyControlBinding {
24    pub const NONE: Option<&'static ProxyControlBinding> = None;
25
26    /// [`ProxyControlBinding`][crate::ProxyControlBinding] forwards all access to data or ``sync_values()``
27    /// requests from `property_name` on `object` to the control binding at
28    /// `ref_property_name` on `ref_object`.
29    /// ## `object`
30    /// a [`gst::Object`][crate::gst::Object]
31    /// ## `property_name`
32    /// the property name in `object` to control
33    /// ## `ref_object`
34    /// a [`gst::Object`][crate::gst::Object] to forward all
35    ///  [`gst::ControlBinding`][crate::gst::ControlBinding] requests to
36    /// ## `ref_property_name`
37    /// the property_name in `ref_object` to control
38    ///
39    /// # Returns
40    ///
41    /// a new [`gst::ControlBinding`][crate::gst::ControlBinding] that proxies the control interface between
42    /// properties on different [`gst::Object`][crate::gst::Object]'s
43    #[doc(alias = "gst_proxy_control_binding_new")]
44    pub fn new(
45        object: &impl IsA<gst::Object>,
46        property_name: &str,
47        ref_object: &impl IsA<gst::Object>,
48        ref_property_name: &str,
49    ) -> ProxyControlBinding {
50        assert_initialized_main_thread!();
51        unsafe {
52            gst::ControlBinding::from_glib_none(ffi::gst_proxy_control_binding_new(
53                object.as_ref().to_glib_none().0,
54                property_name.to_glib_none().0,
55                ref_object.as_ref().to_glib_none().0,
56                ref_property_name.to_glib_none().0,
57            ))
58            .unsafe_cast()
59        }
60    }
61}
62
63unsafe impl Send for ProxyControlBinding {}
64unsafe impl Sync for ProxyControlBinding {}