gstreamer_webrtc/auto/
web_rtcice_stream.rs1use crate::{ffi, WebRTCICEComponent, WebRTCICETransport};
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10 #[doc(alias = "GstWebRTCICEStream")]
11 pub struct WebRTCICEStream(Object<ffi::GstWebRTCICEStream, ffi::GstWebRTCICEStreamClass>) @extends gst::Object;
12
13 match fn {
14 type_ => || ffi::gst_webrtc_ice_stream_get_type(),
15 }
16}
17
18impl WebRTCICEStream {
19 pub const NONE: Option<&'static WebRTCICEStream> = None;
20}
21
22unsafe impl Send for WebRTCICEStream {}
23unsafe impl Sync for WebRTCICEStream {}
24
25pub trait WebRTCICEStreamExt: IsA<WebRTCICEStream> + 'static {
26 #[doc(alias = "gst_webrtc_ice_stream_find_transport")]
27 fn find_transport(&self, component: WebRTCICEComponent) -> Option<WebRTCICETransport> {
28 unsafe {
29 from_glib_full(ffi::gst_webrtc_ice_stream_find_transport(
30 self.as_ref().to_glib_none().0,
31 component.into_glib(),
32 ))
33 }
34 }
35
36 #[doc(alias = "gst_webrtc_ice_stream_gather_candidates")]
37 fn gather_candidates(&self) -> bool {
38 unsafe {
39 from_glib(ffi::gst_webrtc_ice_stream_gather_candidates(
40 self.as_ref().to_glib_none().0,
41 ))
42 }
43 }
44
45 #[doc(alias = "stream-id")]
46 fn stream_id(&self) -> u32 {
47 ObjectExt::property(self.as_ref(), "stream-id")
48 }
49}
50
51impl<O: IsA<WebRTCICEStream>> WebRTCICEStreamExt for O {}