gstreamer_webrtc/auto/web_rtcice_stream.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, WebRTCICEComponent, WebRTCICETransport};
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10 ///
11 ///
12 /// This is an Abstract Base Class, you cannot instantiate it.
13 ///
14 /// ## Properties
15 ///
16 ///
17 /// #### `stream-id`
18 /// Readable | Writeable | Construct Only
19 /// <details><summary><h4>Object</h4></summary>
20 ///
21 ///
22 /// #### `name`
23 /// Readable | Writeable | Construct
24 ///
25 ///
26 /// #### `parent`
27 /// The parent of the object. Please note, that when changing the 'parent'
28 /// property, we don't emit [`notify`][struct@crate::glib::Object#notify] and `GstObject::deep-notify`
29 /// signals due to locking issues. In some cases one can use
30 /// `GstBin::element-added` or `GstBin::element-removed` signals on the parent to
31 /// achieve a similar effect.
32 ///
33 /// Readable | Writeable
34 /// </details>
35 ///
36 /// # Implements
37 ///
38 /// [`WebRTCICEStreamExt`][trait@crate::prelude::WebRTCICEStreamExt], [`trait@glib::ObjectExt`]
39 #[doc(alias = "GstWebRTCICEStream")]
40 pub struct WebRTCICEStream(Object<ffi::GstWebRTCICEStream, ffi::GstWebRTCICEStreamClass>);
41
42 match fn {
43 type_ => || ffi::gst_webrtc_ice_stream_get_type(),
44 }
45}
46
47impl WebRTCICEStream {
48 pub const NONE: Option<&'static WebRTCICEStream> = None;
49}
50
51unsafe impl Send for WebRTCICEStream {}
52unsafe impl Sync for WebRTCICEStream {}
53
54/// Trait containing all [`struct@WebRTCICEStream`] methods.
55///
56/// # Implementors
57///
58/// [`WebRTCICEStream`][struct@crate::WebRTCICEStream]
59pub trait WebRTCICEStreamExt: IsA<WebRTCICEStream> + 'static {
60 /// ## `component`
61 /// The [`WebRTCICEComponent`][crate::WebRTCICEComponent]
62 ///
63 /// # Returns
64 ///
65 /// the [`WebRTCICETransport`][crate::WebRTCICETransport], or [`None`]
66 #[doc(alias = "gst_webrtc_ice_stream_find_transport")]
67 fn find_transport(&self, component: WebRTCICEComponent) -> Option<WebRTCICETransport> {
68 unsafe {
69 from_glib_full(ffi::gst_webrtc_ice_stream_find_transport(
70 self.as_ref().to_glib_none().0,
71 component.into_glib(),
72 ))
73 }
74 }
75
76 ///
77 /// # Returns
78 ///
79 /// FALSE on error, TRUE otherwise
80 #[doc(alias = "gst_webrtc_ice_stream_gather_candidates")]
81 fn gather_candidates(&self) -> bool {
82 unsafe {
83 from_glib(ffi::gst_webrtc_ice_stream_gather_candidates(
84 self.as_ref().to_glib_none().0,
85 ))
86 }
87 }
88
89 #[doc(alias = "stream-id")]
90 fn stream_id(&self) -> u32 {
91 ObjectExt::property(self.as_ref(), "stream-id")
92 }
93}
94
95impl<O: IsA<WebRTCICEStream>> WebRTCICEStreamExt for O {}