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    #[doc(alias = "GstProxyControlBinding")]
11    pub struct ProxyControlBinding(Object<ffi::GstProxyControlBinding, ffi::GstProxyControlBindingClass>) @extends gst::ControlBinding, gst::Object;
12
13    match fn {
14        type_ => || ffi::gst_proxy_control_binding_get_type(),
15    }
16}
17
18impl ProxyControlBinding {
19    pub const NONE: Option<&'static ProxyControlBinding> = None;
20
21    #[doc(alias = "gst_proxy_control_binding_new")]
22    pub fn new(
23        object: &impl IsA<gst::Object>,
24        property_name: &str,
25        ref_object: &impl IsA<gst::Object>,
26        ref_property_name: &str,
27    ) -> ProxyControlBinding {
28        assert_initialized_main_thread!();
29        unsafe {
30            gst::ControlBinding::from_glib_none(ffi::gst_proxy_control_binding_new(
31                object.as_ref().to_glib_none().0,
32                property_name.to_glib_none().0,
33                ref_object.as_ref().to_glib_none().0,
34                ref_property_name.to_glib_none().0,
35            ))
36            .unsafe_cast()
37        }
38    }
39}
40
41unsafe impl Send for ProxyControlBinding {}
42unsafe impl Sync for ProxyControlBinding {}