gstreamer/auto/
proxy_pad.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, Object, Pad};
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10    ///
11    ///
12    /// # Implements
13    ///
14    /// [`ProxyPadExt`][trait@crate::prelude::ProxyPadExt], [`PadExt`][trait@crate::prelude::PadExt], [`GstObjectExt`][trait@crate::prelude::GstObjectExt], [`trait@glib::ObjectExt`], [`ProxyPadExtManual`][trait@crate::prelude::ProxyPadExtManual], [`PadExtManual`][trait@crate::prelude::PadExtManual]
15    #[doc(alias = "GstProxyPad")]
16    pub struct ProxyPad(Object<ffi::GstProxyPad, ffi::GstProxyPadClass>) @extends Pad, Object;
17
18    match fn {
19        type_ => || ffi::gst_proxy_pad_get_type(),
20    }
21}
22
23impl ProxyPad {
24    pub const NONE: Option<&'static ProxyPad> = None;
25
26    //#[doc(alias = "gst_proxy_pad_iterate_internal_links_default")]
27    //pub fn iterate_internal_links_default(pad: &impl IsA<Pad>, parent: Option<&impl IsA<Object>>) -> /*Ignored*/Option<Iterator> {
28    //    unsafe { TODO: call ffi:gst_proxy_pad_iterate_internal_links_default() }
29    //}
30}
31
32unsafe impl Send for ProxyPad {}
33unsafe impl Sync for ProxyPad {}
34
35/// Trait containing all [`struct@ProxyPad`] methods.
36///
37/// # Implementors
38///
39/// [`GhostPad`][struct@crate::GhostPad], [`ProxyPad`][struct@crate::ProxyPad]
40pub trait ProxyPadExt: IsA<ProxyPad> + 'static {
41    /// Get the internal pad of `self`. Unref target pad after usage.
42    ///
43    /// The internal pad of a [`GhostPad`][crate::GhostPad] is the internally used
44    /// pad of opposite direction, which is used to link to the target.
45    ///
46    /// # Returns
47    ///
48    /// the target [`ProxyPad`][crate::ProxyPad], can
49    /// be [`None`]. Unref target pad after usage.
50    #[doc(alias = "gst_proxy_pad_get_internal")]
51    #[doc(alias = "get_internal")]
52    #[must_use]
53    fn internal(&self) -> Option<ProxyPad> {
54        unsafe {
55            from_glib_full(ffi::gst_proxy_pad_get_internal(
56                self.as_ref().to_glib_none().0,
57            ))
58        }
59    }
60}
61
62impl<O: IsA<ProxyPad>> ProxyPadExt for O {}