1#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
7#![allow(
8 clippy::approx_constant,
9 clippy::type_complexity,
10 clippy::unreadable_literal,
11 clippy::upper_case_acronyms
12)]
13#![cfg_attr(docsrs, feature(doc_cfg))]
14
15use glib_sys as glib;
16use gstreamer_sdp_sys as gst_sdp;
17use gstreamer_sys as gst;
18
19#[cfg(unix)]
20#[allow(unused_imports)]
21use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
22#[allow(unused_imports)]
23use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
24#[allow(unused_imports)]
25use std::ffi::{
26 c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
27};
28
29#[allow(unused_imports)]
30use glib::{gboolean, gconstpointer, gpointer, GType};
31
32pub type GstWebRTCBundlePolicy = c_int;
34pub const GST_WEBRTC_BUNDLE_POLICY_NONE: GstWebRTCBundlePolicy = 0;
35pub const GST_WEBRTC_BUNDLE_POLICY_BALANCED: GstWebRTCBundlePolicy = 1;
36pub const GST_WEBRTC_BUNDLE_POLICY_MAX_COMPAT: GstWebRTCBundlePolicy = 2;
37pub const GST_WEBRTC_BUNDLE_POLICY_MAX_BUNDLE: GstWebRTCBundlePolicy = 3;
38
39pub type GstWebRTCDTLSSetup = c_int;
40pub const GST_WEBRTC_DTLS_SETUP_NONE: GstWebRTCDTLSSetup = 0;
41pub const GST_WEBRTC_DTLS_SETUP_ACTPASS: GstWebRTCDTLSSetup = 1;
42pub const GST_WEBRTC_DTLS_SETUP_ACTIVE: GstWebRTCDTLSSetup = 2;
43pub const GST_WEBRTC_DTLS_SETUP_PASSIVE: GstWebRTCDTLSSetup = 3;
44
45pub type GstWebRTCDTLSTransportState = c_int;
46pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW: GstWebRTCDTLSTransportState = 0;
47pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_CLOSED: GstWebRTCDTLSTransportState = 1;
48pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_FAILED: GstWebRTCDTLSTransportState = 2;
49pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTING: GstWebRTCDTLSTransportState = 3;
50pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED: GstWebRTCDTLSTransportState = 4;
51
52pub type GstWebRTCDataChannelState = c_int;
53pub const GST_WEBRTC_DATA_CHANNEL_STATE_CONNECTING: GstWebRTCDataChannelState = 1;
54pub const GST_WEBRTC_DATA_CHANNEL_STATE_OPEN: GstWebRTCDataChannelState = 2;
55pub const GST_WEBRTC_DATA_CHANNEL_STATE_CLOSING: GstWebRTCDataChannelState = 3;
56pub const GST_WEBRTC_DATA_CHANNEL_STATE_CLOSED: GstWebRTCDataChannelState = 4;
57
58pub type GstWebRTCError = c_int;
59pub const GST_WEBRTC_ERROR_DATA_CHANNEL_FAILURE: GstWebRTCError = 0;
60pub const GST_WEBRTC_ERROR_DTLS_FAILURE: GstWebRTCError = 1;
61pub const GST_WEBRTC_ERROR_FINGERPRINT_FAILURE: GstWebRTCError = 2;
62pub const GST_WEBRTC_ERROR_SCTP_FAILURE: GstWebRTCError = 3;
63pub const GST_WEBRTC_ERROR_SDP_SYNTAX_ERROR: GstWebRTCError = 4;
64pub const GST_WEBRTC_ERROR_HARDWARE_ENCODER_NOT_AVAILABLE: GstWebRTCError = 5;
65pub const GST_WEBRTC_ERROR_ENCODER_ERROR: GstWebRTCError = 6;
66pub const GST_WEBRTC_ERROR_INVALID_STATE: GstWebRTCError = 7;
67pub const GST_WEBRTC_ERROR_INTERNAL_FAILURE: GstWebRTCError = 8;
68#[cfg(feature = "v1_22")]
69#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
70pub const GST_WEBRTC_ERROR_INVALID_MODIFICATION: GstWebRTCError = 9;
71#[cfg(feature = "v1_22")]
72#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
73pub const GST_WEBRTC_ERROR_TYPE_ERROR: GstWebRTCError = 10;
74
75pub type GstWebRTCFECType = c_int;
76pub const GST_WEBRTC_FEC_TYPE_NONE: GstWebRTCFECType = 0;
77pub const GST_WEBRTC_FEC_TYPE_ULP_RED: GstWebRTCFECType = 1;
78
79pub type GstWebRTCICEComponent = c_int;
80pub const GST_WEBRTC_ICE_COMPONENT_RTP: GstWebRTCICEComponent = 0;
81pub const GST_WEBRTC_ICE_COMPONENT_RTCP: GstWebRTCICEComponent = 1;
82
83pub type GstWebRTCICEConnectionState = c_int;
84pub const GST_WEBRTC_ICE_CONNECTION_STATE_NEW: GstWebRTCICEConnectionState = 0;
85pub const GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING: GstWebRTCICEConnectionState = 1;
86pub const GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED: GstWebRTCICEConnectionState = 2;
87pub const GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED: GstWebRTCICEConnectionState = 3;
88pub const GST_WEBRTC_ICE_CONNECTION_STATE_FAILED: GstWebRTCICEConnectionState = 4;
89pub const GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED: GstWebRTCICEConnectionState = 5;
90pub const GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED: GstWebRTCICEConnectionState = 6;
91
92pub type GstWebRTCICEGatheringState = c_int;
93pub const GST_WEBRTC_ICE_GATHERING_STATE_NEW: GstWebRTCICEGatheringState = 0;
94pub const GST_WEBRTC_ICE_GATHERING_STATE_GATHERING: GstWebRTCICEGatheringState = 1;
95pub const GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE: GstWebRTCICEGatheringState = 2;
96
97pub type GstWebRTCICERole = c_int;
98pub const GST_WEBRTC_ICE_ROLE_CONTROLLED: GstWebRTCICERole = 0;
99pub const GST_WEBRTC_ICE_ROLE_CONTROLLING: GstWebRTCICERole = 1;
100
101pub type GstWebRTCICETcpCandidateType = c_int;
102pub const GST_WEBRTC_ICE_TCP_CANDIDATE_TYPE_ACTIVE: GstWebRTCICETcpCandidateType = 0;
103pub const GST_WEBRTC_ICE_TCP_CANDIDATE_TYPE_PASSIVE: GstWebRTCICETcpCandidateType = 1;
104pub const GST_WEBRTC_ICE_TCP_CANDIDATE_TYPE_SO: GstWebRTCICETcpCandidateType = 2;
105pub const GST_WEBRTC_ICE_TCP_CANDIDATE_TYPE_NONE: GstWebRTCICETcpCandidateType = 3;
106
107pub type GstWebRTCICETransportPolicy = c_int;
108pub const GST_WEBRTC_ICE_TRANSPORT_POLICY_ALL: GstWebRTCICETransportPolicy = 0;
109pub const GST_WEBRTC_ICE_TRANSPORT_POLICY_RELAY: GstWebRTCICETransportPolicy = 1;
110
111pub type GstWebRTCKind = c_int;
112pub const GST_WEBRTC_KIND_UNKNOWN: GstWebRTCKind = 0;
113pub const GST_WEBRTC_KIND_AUDIO: GstWebRTCKind = 1;
114pub const GST_WEBRTC_KIND_VIDEO: GstWebRTCKind = 2;
115
116pub type GstWebRTCPeerConnectionState = c_int;
117pub const GST_WEBRTC_PEER_CONNECTION_STATE_NEW: GstWebRTCPeerConnectionState = 0;
118pub const GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING: GstWebRTCPeerConnectionState = 1;
119pub const GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED: GstWebRTCPeerConnectionState = 2;
120pub const GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED: GstWebRTCPeerConnectionState = 3;
121pub const GST_WEBRTC_PEER_CONNECTION_STATE_FAILED: GstWebRTCPeerConnectionState = 4;
122pub const GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED: GstWebRTCPeerConnectionState = 5;
123
124pub type GstWebRTCPriorityType = c_int;
125pub const GST_WEBRTC_PRIORITY_TYPE_VERY_LOW: GstWebRTCPriorityType = 1;
126pub const GST_WEBRTC_PRIORITY_TYPE_LOW: GstWebRTCPriorityType = 2;
127pub const GST_WEBRTC_PRIORITY_TYPE_MEDIUM: GstWebRTCPriorityType = 3;
128pub const GST_WEBRTC_PRIORITY_TYPE_HIGH: GstWebRTCPriorityType = 4;
129
130pub type GstWebRTCRTPTransceiverDirection = c_int;
131pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE: GstWebRTCRTPTransceiverDirection = 0;
132pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE: GstWebRTCRTPTransceiverDirection = 1;
133pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY: GstWebRTCRTPTransceiverDirection = 2;
134pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY: GstWebRTCRTPTransceiverDirection = 3;
135pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV: GstWebRTCRTPTransceiverDirection = 4;
136
137pub type GstWebRTCSCTPTransportState = c_int;
138pub const GST_WEBRTC_SCTP_TRANSPORT_STATE_NEW: GstWebRTCSCTPTransportState = 0;
139pub const GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTING: GstWebRTCSCTPTransportState = 1;
140pub const GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTED: GstWebRTCSCTPTransportState = 2;
141pub const GST_WEBRTC_SCTP_TRANSPORT_STATE_CLOSED: GstWebRTCSCTPTransportState = 3;
142
143pub type GstWebRTCSDPType = c_int;
144pub const GST_WEBRTC_SDP_TYPE_OFFER: GstWebRTCSDPType = 1;
145pub const GST_WEBRTC_SDP_TYPE_PRANSWER: GstWebRTCSDPType = 2;
146pub const GST_WEBRTC_SDP_TYPE_ANSWER: GstWebRTCSDPType = 3;
147pub const GST_WEBRTC_SDP_TYPE_ROLLBACK: GstWebRTCSDPType = 4;
148
149pub type GstWebRTCSignalingState = c_int;
150pub const GST_WEBRTC_SIGNALING_STATE_STABLE: GstWebRTCSignalingState = 0;
151pub const GST_WEBRTC_SIGNALING_STATE_CLOSED: GstWebRTCSignalingState = 1;
152pub const GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER: GstWebRTCSignalingState = 2;
153pub const GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER: GstWebRTCSignalingState = 3;
154pub const GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER: GstWebRTCSignalingState = 4;
155pub const GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER: GstWebRTCSignalingState = 5;
156
157pub type GstWebRTCStatsType = c_int;
158pub const GST_WEBRTC_STATS_CODEC: GstWebRTCStatsType = 1;
159pub const GST_WEBRTC_STATS_INBOUND_RTP: GstWebRTCStatsType = 2;
160pub const GST_WEBRTC_STATS_OUTBOUND_RTP: GstWebRTCStatsType = 3;
161pub const GST_WEBRTC_STATS_REMOTE_INBOUND_RTP: GstWebRTCStatsType = 4;
162pub const GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP: GstWebRTCStatsType = 5;
163pub const GST_WEBRTC_STATS_CSRC: GstWebRTCStatsType = 6;
164pub const GST_WEBRTC_STATS_PEER_CONNECTION: GstWebRTCStatsType = 7;
165pub const GST_WEBRTC_STATS_DATA_CHANNEL: GstWebRTCStatsType = 8;
166pub const GST_WEBRTC_STATS_STREAM: GstWebRTCStatsType = 9;
167pub const GST_WEBRTC_STATS_TRANSPORT: GstWebRTCStatsType = 10;
168pub const GST_WEBRTC_STATS_CANDIDATE_PAIR: GstWebRTCStatsType = 11;
169pub const GST_WEBRTC_STATS_LOCAL_CANDIDATE: GstWebRTCStatsType = 12;
170pub const GST_WEBRTC_STATS_REMOTE_CANDIDATE: GstWebRTCStatsType = 13;
171pub const GST_WEBRTC_STATS_CERTIFICATE: GstWebRTCStatsType = 14;
172
173#[derive(Copy, Clone)]
175#[repr(C)]
176pub union GstWebRTCICECandidateStats_ABI {
177 pub abi: GstWebRTCICECandidateStats_ABI_abi,
178 pub _gst_reserved: [gpointer; 20],
179}
180
181impl ::std::fmt::Debug for GstWebRTCICECandidateStats_ABI {
182 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
183 f.debug_struct(&format!("GstWebRTCICECandidateStats_ABI @ {self:p}"))
184 .field("abi", unsafe { &self.abi })
185 .finish()
186 }
187}
188
189pub type GstWebRTCICEOnCandidateFunc =
191 Option<unsafe extern "C" fn(*mut GstWebRTCICE, c_uint, *const c_char, gpointer)>;
192
193#[repr(C)]
195#[allow(dead_code)]
196pub struct _GstWebRTCDTLSTransportClass {
197 _data: [u8; 0],
198 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
199}
200
201pub type GstWebRTCDTLSTransportClass = _GstWebRTCDTLSTransportClass;
202
203#[repr(C)]
204#[allow(dead_code)]
205pub struct _GstWebRTCDataChannelClass {
206 _data: [u8; 0],
207 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
208}
209
210pub type GstWebRTCDataChannelClass = _GstWebRTCDataChannelClass;
211
212#[derive(Copy, Clone)]
213#[repr(C)]
214pub struct GstWebRTCICECandidateStats {
215 pub ipaddr: *mut c_char,
216 pub port: c_uint,
217 pub stream_id: c_uint,
218 pub type_: *const c_char,
219 pub proto: *const c_char,
220 pub relay_proto: *const c_char,
221 pub prio: c_uint,
222 pub url: *mut c_char,
223 pub ABI: GstWebRTCICECandidateStats_ABI,
224}
225
226impl ::std::fmt::Debug for GstWebRTCICECandidateStats {
227 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
228 f.debug_struct(&format!("GstWebRTCICECandidateStats @ {self:p}"))
229 .field("ipaddr", &self.ipaddr)
230 .field("port", &self.port)
231 .field("stream_id", &self.stream_id)
232 .field("type_", &self.type_)
233 .field("proto", &self.proto)
234 .field("relay_proto", &self.relay_proto)
235 .field("prio", &self.prio)
236 .field("url", &self.url)
237 .field("ABI", &self.ABI)
238 .finish()
239 }
240}
241
242#[derive(Copy, Clone)]
243#[repr(C)]
244pub struct GstWebRTCICECandidateStats_ABI_abi {
245 pub foundation: *mut c_char,
246 pub related_address: *mut c_char,
247 pub related_port: c_uint,
248 pub username_fragment: *mut c_char,
249 pub tcp_type: GstWebRTCICETcpCandidateType,
250}
251
252impl ::std::fmt::Debug for GstWebRTCICECandidateStats_ABI_abi {
253 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
254 f.debug_struct(&format!("GstWebRTCICECandidateStats_ABI_abi @ {self:p}"))
255 .field("foundation", &self.foundation)
256 .field("related_address", &self.related_address)
257 .field("related_port", &self.related_port)
258 .field("username_fragment", &self.username_fragment)
259 .field("tcp_type", &self.tcp_type)
260 .finish()
261 }
262}
263
264#[derive(Copy, Clone)]
265#[repr(C)]
266pub struct GstWebRTCICEClass {
267 pub parent_class: gst::GstObjectClass,
268 pub add_stream:
269 Option<unsafe extern "C" fn(*mut GstWebRTCICE, c_uint) -> *mut GstWebRTCICEStream>,
270 pub find_transport: Option<
271 unsafe extern "C" fn(
272 *mut GstWebRTCICE,
273 *mut GstWebRTCICEStream,
274 GstWebRTCICEComponent,
275 ) -> *mut GstWebRTCICETransport,
276 >,
277 pub gather_candidates:
278 Option<unsafe extern "C" fn(*mut GstWebRTCICE, *mut GstWebRTCICEStream) -> gboolean>,
279 pub add_candidate: Option<
280 unsafe extern "C" fn(
281 *mut GstWebRTCICE,
282 *mut GstWebRTCICEStream,
283 *const c_char,
284 *mut gst::GstPromise,
285 ),
286 >,
287 pub set_local_credentials: Option<
288 unsafe extern "C" fn(
289 *mut GstWebRTCICE,
290 *mut GstWebRTCICEStream,
291 *const c_char,
292 *const c_char,
293 ) -> gboolean,
294 >,
295 pub set_remote_credentials: Option<
296 unsafe extern "C" fn(
297 *mut GstWebRTCICE,
298 *mut GstWebRTCICEStream,
299 *const c_char,
300 *const c_char,
301 ) -> gboolean,
302 >,
303 pub add_turn_server: Option<unsafe extern "C" fn(*mut GstWebRTCICE, *const c_char) -> gboolean>,
304 pub set_is_controller: Option<unsafe extern "C" fn(*mut GstWebRTCICE, gboolean)>,
305 pub get_is_controller: Option<unsafe extern "C" fn(*mut GstWebRTCICE) -> gboolean>,
306 pub set_force_relay: Option<unsafe extern "C" fn(*mut GstWebRTCICE, gboolean)>,
307 pub set_stun_server: Option<unsafe extern "C" fn(*mut GstWebRTCICE, *const c_char)>,
308 pub get_stun_server: Option<unsafe extern "C" fn(*mut GstWebRTCICE) -> *mut c_char>,
309 pub set_turn_server: Option<unsafe extern "C" fn(*mut GstWebRTCICE, *const c_char)>,
310 pub get_turn_server: Option<unsafe extern "C" fn(*mut GstWebRTCICE) -> *mut c_char>,
311 pub set_http_proxy: Option<unsafe extern "C" fn(*mut GstWebRTCICE, *const c_char)>,
312 pub get_http_proxy: Option<unsafe extern "C" fn(*mut GstWebRTCICE) -> *mut c_char>,
313 pub set_tos: Option<unsafe extern "C" fn(*mut GstWebRTCICE, *mut GstWebRTCICEStream, c_uint)>,
314 pub set_on_ice_candidate: Option<
315 unsafe extern "C" fn(
316 *mut GstWebRTCICE,
317 GstWebRTCICEOnCandidateFunc,
318 gpointer,
319 glib::GDestroyNotify,
320 ),
321 >,
322 pub get_local_candidates: Option<
323 unsafe extern "C" fn(
324 *mut GstWebRTCICE,
325 *mut GstWebRTCICEStream,
326 ) -> *mut *mut GstWebRTCICECandidateStats,
327 >,
328 pub get_remote_candidates: Option<
329 unsafe extern "C" fn(
330 *mut GstWebRTCICE,
331 *mut GstWebRTCICEStream,
332 ) -> *mut *mut GstWebRTCICECandidateStats,
333 >,
334 pub get_selected_pair: Option<
335 unsafe extern "C" fn(
336 *mut GstWebRTCICE,
337 *mut GstWebRTCICEStream,
338 *mut *mut GstWebRTCICECandidateStats,
339 *mut *mut GstWebRTCICECandidateStats,
340 ) -> gboolean,
341 >,
342 pub _gst_reserved: [gpointer; 4],
343}
344
345impl ::std::fmt::Debug for GstWebRTCICEClass {
346 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
347 f.debug_struct(&format!("GstWebRTCICEClass @ {self:p}"))
348 .field("parent_class", &self.parent_class)
349 .field("add_stream", &self.add_stream)
350 .field("find_transport", &self.find_transport)
351 .field("gather_candidates", &self.gather_candidates)
352 .field("add_candidate", &self.add_candidate)
353 .field("set_local_credentials", &self.set_local_credentials)
354 .field("set_remote_credentials", &self.set_remote_credentials)
355 .field("add_turn_server", &self.add_turn_server)
356 .field("set_is_controller", &self.set_is_controller)
357 .field("get_is_controller", &self.get_is_controller)
358 .field("set_force_relay", &self.set_force_relay)
359 .field("set_stun_server", &self.set_stun_server)
360 .field("get_stun_server", &self.get_stun_server)
361 .field("set_turn_server", &self.set_turn_server)
362 .field("get_turn_server", &self.get_turn_server)
363 .field("set_http_proxy", &self.set_http_proxy)
364 .field("get_http_proxy", &self.get_http_proxy)
365 .field("set_tos", &self.set_tos)
366 .field("set_on_ice_candidate", &self.set_on_ice_candidate)
367 .field("get_local_candidates", &self.get_local_candidates)
368 .field("get_remote_candidates", &self.get_remote_candidates)
369 .field("get_selected_pair", &self.get_selected_pair)
370 .field("_gst_reserved", &self._gst_reserved)
371 .finish()
372 }
373}
374
375#[derive(Copy, Clone)]
376#[repr(C)]
377pub struct GstWebRTCICEStreamClass {
378 pub parent_class: gst::GstObjectClass,
379 pub find_transport: Option<
380 unsafe extern "C" fn(
381 *mut GstWebRTCICEStream,
382 GstWebRTCICEComponent,
383 ) -> *mut GstWebRTCICETransport,
384 >,
385 pub gather_candidates: Option<unsafe extern "C" fn(*mut GstWebRTCICEStream) -> gboolean>,
386}
387
388impl ::std::fmt::Debug for GstWebRTCICEStreamClass {
389 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
390 f.debug_struct(&format!("GstWebRTCICEStreamClass @ {self:p}"))
391 .field("parent_class", &self.parent_class)
392 .field("find_transport", &self.find_transport)
393 .field("gather_candidates", &self.gather_candidates)
394 .finish()
395 }
396}
397
398#[derive(Copy, Clone)]
399#[repr(C)]
400pub struct GstWebRTCICETransportClass {
401 pub parent_class: gst::GstObjectClass,
402 pub gather_candidates: Option<unsafe extern "C" fn(*mut GstWebRTCICETransport) -> gboolean>,
403 pub _padding: [gpointer; 4],
404}
405
406impl ::std::fmt::Debug for GstWebRTCICETransportClass {
407 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
408 f.debug_struct(&format!("GstWebRTCICETransportClass @ {self:p}"))
409 .field("parent_class", &self.parent_class)
410 .field("gather_candidates", &self.gather_candidates)
411 .field("_padding", &self._padding)
412 .finish()
413 }
414}
415
416#[repr(C)]
417#[allow(dead_code)]
418pub struct _GstWebRTCRTPReceiverClass {
419 _data: [u8; 0],
420 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
421}
422
423pub type GstWebRTCRTPReceiverClass = _GstWebRTCRTPReceiverClass;
424
425#[repr(C)]
426#[allow(dead_code)]
427pub struct _GstWebRTCRTPSenderClass {
428 _data: [u8; 0],
429 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
430}
431
432pub type GstWebRTCRTPSenderClass = _GstWebRTCRTPSenderClass;
433
434#[repr(C)]
435#[allow(dead_code)]
436pub struct _GstWebRTCRTPTransceiverClass {
437 _data: [u8; 0],
438 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
439}
440
441pub type GstWebRTCRTPTransceiverClass = _GstWebRTCRTPTransceiverClass;
442
443#[repr(C)]
444#[allow(dead_code)]
445pub struct _GstWebRTCSCTPTransportClass {
446 _data: [u8; 0],
447 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
448}
449
450pub type GstWebRTCSCTPTransportClass = _GstWebRTCSCTPTransportClass;
451
452#[derive(Copy, Clone)]
453#[repr(C)]
454pub struct GstWebRTCSessionDescription {
455 pub type_: GstWebRTCSDPType,
456 pub sdp: *mut gst_sdp::GstSDPMessage,
457}
458
459impl ::std::fmt::Debug for GstWebRTCSessionDescription {
460 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
461 f.debug_struct(&format!("GstWebRTCSessionDescription @ {self:p}"))
462 .field("type_", &self.type_)
463 .field("sdp", &self.sdp)
464 .finish()
465 }
466}
467
468#[repr(C)]
470#[allow(dead_code)]
471pub struct GstWebRTCDTLSTransport {
472 _data: [u8; 0],
473 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
474}
475
476impl ::std::fmt::Debug for GstWebRTCDTLSTransport {
477 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
478 f.debug_struct(&format!("GstWebRTCDTLSTransport @ {self:p}"))
479 .finish()
480 }
481}
482
483#[repr(C)]
484#[allow(dead_code)]
485pub struct GstWebRTCDataChannel {
486 _data: [u8; 0],
487 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
488}
489
490impl ::std::fmt::Debug for GstWebRTCDataChannel {
491 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
492 f.debug_struct(&format!("GstWebRTCDataChannel @ {self:p}"))
493 .finish()
494 }
495}
496
497#[derive(Copy, Clone)]
498#[repr(C)]
499pub struct GstWebRTCICE {
500 pub parent: gst::GstObject,
501 pub ice_gathering_state: GstWebRTCICEGatheringState,
502 pub ice_connection_state: GstWebRTCICEConnectionState,
503 pub min_rtp_port: c_uint,
504 pub max_rtp_port: c_uint,
505 pub _gst_reserved: [gpointer; 4],
506}
507
508impl ::std::fmt::Debug for GstWebRTCICE {
509 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
510 f.debug_struct(&format!("GstWebRTCICE @ {self:p}"))
511 .field("parent", &self.parent)
512 .field("ice_gathering_state", &self.ice_gathering_state)
513 .field("ice_connection_state", &self.ice_connection_state)
514 .field("min_rtp_port", &self.min_rtp_port)
515 .field("max_rtp_port", &self.max_rtp_port)
516 .field("_gst_reserved", &self._gst_reserved)
517 .finish()
518 }
519}
520
521#[derive(Copy, Clone)]
522#[repr(C)]
523pub struct GstWebRTCICEStream {
524 pub parent: gst::GstObject,
525 pub stream_id: c_uint,
526}
527
528impl ::std::fmt::Debug for GstWebRTCICEStream {
529 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
530 f.debug_struct(&format!("GstWebRTCICEStream @ {self:p}"))
531 .field("parent", &self.parent)
532 .field("stream_id", &self.stream_id)
533 .finish()
534 }
535}
536
537#[derive(Copy, Clone)]
538#[repr(C)]
539pub struct GstWebRTCICETransport {
540 pub parent: gst::GstObject,
541 pub role: GstWebRTCICERole,
542 pub component: GstWebRTCICEComponent,
543 pub state: GstWebRTCICEConnectionState,
544 pub gathering_state: GstWebRTCICEGatheringState,
545 pub src: *mut gst::GstElement,
546 pub sink: *mut gst::GstElement,
547 pub _padding: [gpointer; 4],
548}
549
550impl ::std::fmt::Debug for GstWebRTCICETransport {
551 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
552 f.debug_struct(&format!("GstWebRTCICETransport @ {self:p}"))
553 .field("parent", &self.parent)
554 .field("role", &self.role)
555 .field("component", &self.component)
556 .field("state", &self.state)
557 .field("gathering_state", &self.gathering_state)
558 .field("src", &self.src)
559 .field("sink", &self.sink)
560 .field("_padding", &self._padding)
561 .finish()
562 }
563}
564
565#[repr(C)]
566#[allow(dead_code)]
567pub struct GstWebRTCRTPReceiver {
568 _data: [u8; 0],
569 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
570}
571
572impl ::std::fmt::Debug for GstWebRTCRTPReceiver {
573 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
574 f.debug_struct(&format!("GstWebRTCRTPReceiver @ {self:p}"))
575 .finish()
576 }
577}
578
579#[repr(C)]
580#[allow(dead_code)]
581pub struct GstWebRTCRTPSender {
582 _data: [u8; 0],
583 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
584}
585
586impl ::std::fmt::Debug for GstWebRTCRTPSender {
587 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
588 f.debug_struct(&format!("GstWebRTCRTPSender @ {self:p}"))
589 .finish()
590 }
591}
592
593#[repr(C)]
594#[allow(dead_code)]
595pub struct GstWebRTCRTPTransceiver {
596 _data: [u8; 0],
597 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
598}
599
600impl ::std::fmt::Debug for GstWebRTCRTPTransceiver {
601 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
602 f.debug_struct(&format!("GstWebRTCRTPTransceiver @ {self:p}"))
603 .finish()
604 }
605}
606
607#[repr(C)]
608#[allow(dead_code)]
609pub struct GstWebRTCSCTPTransport {
610 _data: [u8; 0],
611 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
612}
613
614impl ::std::fmt::Debug for GstWebRTCSCTPTransport {
615 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
616 f.debug_struct(&format!("GstWebRTCSCTPTransport @ {self:p}"))
617 .finish()
618 }
619}
620
621extern "C" {
622
623 #[cfg(feature = "v1_16")]
627 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
628 pub fn gst_webrtc_bundle_policy_get_type() -> GType;
629
630 pub fn gst_webrtc_dtls_setup_get_type() -> GType;
634
635 pub fn gst_webrtc_dtls_transport_state_get_type() -> GType;
639
640 #[cfg(feature = "v1_16")]
644 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
645 pub fn gst_webrtc_data_channel_state_get_type() -> GType;
646
647 #[cfg(feature = "v1_20")]
651 #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
652 pub fn gst_webrtc_error_get_type() -> GType;
653 #[cfg(feature = "v1_20")]
654 #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
655 pub fn gst_webrtc_error_quark() -> glib::GQuark;
656
657 #[cfg(feature = "v1_14_1")]
661 #[cfg_attr(docsrs, doc(cfg(feature = "v1_14_1")))]
662 pub fn gst_webrtc_fec_type_get_type() -> GType;
663
664 pub fn gst_webrtc_ice_component_get_type() -> GType;
668
669 pub fn gst_webrtc_ice_connection_state_get_type() -> GType;
673
674 pub fn gst_webrtc_ice_gathering_state_get_type() -> GType;
678
679 pub fn gst_webrtc_ice_role_get_type() -> GType;
683
684 #[cfg(feature = "v1_28")]
688 #[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
689 pub fn gst_webrtc_ice_tcp_candidate_type_get_type() -> GType;
690
691 #[cfg(feature = "v1_16")]
695 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
696 pub fn gst_webrtc_ice_transport_policy_get_type() -> GType;
697
698 #[cfg(feature = "v1_20")]
702 #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
703 pub fn gst_webrtc_kind_get_type() -> GType;
704
705 pub fn gst_webrtc_peer_connection_state_get_type() -> GType;
709
710 #[cfg(feature = "v1_16")]
714 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
715 pub fn gst_webrtc_priority_type_get_type() -> GType;
716
717 pub fn gst_webrtc_rtp_transceiver_direction_get_type() -> GType;
721
722 #[cfg(feature = "v1_16")]
726 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
727 pub fn gst_webrtc_sctp_transport_state_get_type() -> GType;
728
729 pub fn gst_webrtc_sdp_type_get_type() -> GType;
733 pub fn gst_webrtc_sdp_type_to_string(type_: GstWebRTCSDPType) -> *const c_char;
734
735 pub fn gst_webrtc_signaling_state_get_type() -> GType;
739
740 pub fn gst_webrtc_stats_type_get_type() -> GType;
744
745 #[cfg(feature = "v1_22")]
749 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
750 pub fn gst_webrtc_ice_candidate_stats_get_type() -> GType;
751 #[cfg(feature = "v1_22")]
752 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
753 pub fn gst_webrtc_ice_candidate_stats_copy(
754 stats: *mut GstWebRTCICECandidateStats,
755 ) -> *mut GstWebRTCICECandidateStats;
756 #[cfg(feature = "v1_22")]
757 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
758 pub fn gst_webrtc_ice_candidate_stats_free(stats: *mut GstWebRTCICECandidateStats);
759
760 pub fn gst_webrtc_session_description_get_type() -> GType;
764 pub fn gst_webrtc_session_description_new(
765 type_: GstWebRTCSDPType,
766 sdp: *mut gst_sdp::GstSDPMessage,
767 ) -> *mut GstWebRTCSessionDescription;
768 pub fn gst_webrtc_session_description_copy(
769 src: *const GstWebRTCSessionDescription,
770 ) -> *mut GstWebRTCSessionDescription;
771 pub fn gst_webrtc_session_description_free(desc: *mut GstWebRTCSessionDescription);
772
773 pub fn gst_webrtc_dtls_transport_get_type() -> GType;
777
778 #[cfg(feature = "v1_18")]
782 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
783 pub fn gst_webrtc_data_channel_get_type() -> GType;
784 #[cfg(feature = "v1_18")]
785 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
786 pub fn gst_webrtc_data_channel_close(channel: *mut GstWebRTCDataChannel);
787 #[cfg(feature = "v1_18")]
788 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
789 pub fn gst_webrtc_data_channel_send_data(
790 channel: *mut GstWebRTCDataChannel,
791 data: *mut glib::GBytes,
792 );
793 #[cfg(feature = "v1_22")]
794 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
795 pub fn gst_webrtc_data_channel_send_data_full(
796 channel: *mut GstWebRTCDataChannel,
797 data: *mut glib::GBytes,
798 error: *mut *mut glib::GError,
799 ) -> gboolean;
800 #[cfg(feature = "v1_18")]
801 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
802 pub fn gst_webrtc_data_channel_send_string(
803 channel: *mut GstWebRTCDataChannel,
804 str: *const c_char,
805 );
806 #[cfg(feature = "v1_22")]
807 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
808 pub fn gst_webrtc_data_channel_send_string_full(
809 channel: *mut GstWebRTCDataChannel,
810 str: *const c_char,
811 error: *mut *mut glib::GError,
812 ) -> gboolean;
813
814 #[cfg(feature = "v1_22")]
818 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
819 pub fn gst_webrtc_ice_get_type() -> GType;
820 #[cfg(feature = "v1_22")]
821 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
822 pub fn gst_webrtc_ice_add_candidate(
823 ice: *mut GstWebRTCICE,
824 stream: *mut GstWebRTCICEStream,
825 candidate: *const c_char,
826 promise: *mut gst::GstPromise,
827 );
828 #[cfg(feature = "v1_22")]
829 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
830 pub fn gst_webrtc_ice_add_stream(
831 ice: *mut GstWebRTCICE,
832 session_id: c_uint,
833 ) -> *mut GstWebRTCICEStream;
834 #[cfg(feature = "v1_22")]
835 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
836 pub fn gst_webrtc_ice_add_turn_server(ice: *mut GstWebRTCICE, uri: *const c_char) -> gboolean;
837 #[cfg(feature = "v1_22")]
838 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
839 pub fn gst_webrtc_ice_find_transport(
840 ice: *mut GstWebRTCICE,
841 stream: *mut GstWebRTCICEStream,
842 component: GstWebRTCICEComponent,
843 ) -> *mut GstWebRTCICETransport;
844 #[cfg(feature = "v1_22")]
845 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
846 pub fn gst_webrtc_ice_gather_candidates(
847 ice: *mut GstWebRTCICE,
848 stream: *mut GstWebRTCICEStream,
849 ) -> gboolean;
850 #[cfg(feature = "v1_22")]
851 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
852 pub fn gst_webrtc_ice_get_http_proxy(ice: *mut GstWebRTCICE) -> *mut c_char;
853 #[cfg(feature = "v1_22")]
854 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
855 pub fn gst_webrtc_ice_get_is_controller(ice: *mut GstWebRTCICE) -> gboolean;
856 #[cfg(feature = "v1_22")]
857 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
858 pub fn gst_webrtc_ice_get_local_candidates(
859 ice: *mut GstWebRTCICE,
860 stream: *mut GstWebRTCICEStream,
861 ) -> *mut *mut GstWebRTCICECandidateStats;
862 #[cfg(feature = "v1_22")]
863 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
864 pub fn gst_webrtc_ice_get_remote_candidates(
865 ice: *mut GstWebRTCICE,
866 stream: *mut GstWebRTCICEStream,
867 ) -> *mut *mut GstWebRTCICECandidateStats;
868 #[cfg(feature = "v1_22")]
869 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
870 pub fn gst_webrtc_ice_get_selected_pair(
871 ice: *mut GstWebRTCICE,
872 stream: *mut GstWebRTCICEStream,
873 local_stats: *mut *mut GstWebRTCICECandidateStats,
874 remote_stats: *mut *mut GstWebRTCICECandidateStats,
875 ) -> gboolean;
876 #[cfg(feature = "v1_22")]
877 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
878 pub fn gst_webrtc_ice_get_stun_server(ice: *mut GstWebRTCICE) -> *mut c_char;
879 #[cfg(feature = "v1_22")]
880 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
881 pub fn gst_webrtc_ice_get_turn_server(ice: *mut GstWebRTCICE) -> *mut c_char;
882 #[cfg(feature = "v1_22")]
883 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
884 pub fn gst_webrtc_ice_set_force_relay(ice: *mut GstWebRTCICE, force_relay: gboolean);
885 #[cfg(feature = "v1_22")]
886 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
887 pub fn gst_webrtc_ice_set_http_proxy(ice: *mut GstWebRTCICE, uri: *const c_char);
888 #[cfg(feature = "v1_22")]
889 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
890 pub fn gst_webrtc_ice_set_is_controller(ice: *mut GstWebRTCICE, controller: gboolean);
891 #[cfg(feature = "v1_22")]
892 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
893 pub fn gst_webrtc_ice_set_local_credentials(
894 ice: *mut GstWebRTCICE,
895 stream: *mut GstWebRTCICEStream,
896 ufrag: *const c_char,
897 pwd: *const c_char,
898 ) -> gboolean;
899 #[cfg(feature = "v1_22")]
900 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
901 pub fn gst_webrtc_ice_set_on_ice_candidate(
902 ice: *mut GstWebRTCICE,
903 func: GstWebRTCICEOnCandidateFunc,
904 user_data: gpointer,
905 notify: glib::GDestroyNotify,
906 );
907 #[cfg(feature = "v1_22")]
908 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
909 pub fn gst_webrtc_ice_set_remote_credentials(
910 ice: *mut GstWebRTCICE,
911 stream: *mut GstWebRTCICEStream,
912 ufrag: *const c_char,
913 pwd: *const c_char,
914 ) -> gboolean;
915 #[cfg(feature = "v1_22")]
916 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
917 pub fn gst_webrtc_ice_set_stun_server(ice: *mut GstWebRTCICE, uri: *const c_char);
918 #[cfg(feature = "v1_22")]
919 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
920 pub fn gst_webrtc_ice_set_tos(
921 ice: *mut GstWebRTCICE,
922 stream: *mut GstWebRTCICEStream,
923 tos: c_uint,
924 );
925 #[cfg(feature = "v1_22")]
926 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
927 pub fn gst_webrtc_ice_set_turn_server(ice: *mut GstWebRTCICE, uri: *const c_char);
928
929 #[cfg(feature = "v1_22")]
933 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
934 pub fn gst_webrtc_ice_stream_get_type() -> GType;
935 #[cfg(feature = "v1_22")]
936 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
937 pub fn gst_webrtc_ice_stream_find_transport(
938 stream: *mut GstWebRTCICEStream,
939 component: GstWebRTCICEComponent,
940 ) -> *mut GstWebRTCICETransport;
941 #[cfg(feature = "v1_22")]
942 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
943 pub fn gst_webrtc_ice_stream_gather_candidates(ice: *mut GstWebRTCICEStream) -> gboolean;
944
945 pub fn gst_webrtc_ice_transport_get_type() -> GType;
949 pub fn gst_webrtc_ice_transport_connection_state_change(
950 ice: *mut GstWebRTCICETransport,
951 new_state: GstWebRTCICEConnectionState,
952 );
953 pub fn gst_webrtc_ice_transport_gathering_state_change(
954 ice: *mut GstWebRTCICETransport,
955 new_state: GstWebRTCICEGatheringState,
956 );
957 pub fn gst_webrtc_ice_transport_new_candidate(
958 ice: *mut GstWebRTCICETransport,
959 stream_id: c_uint,
960 component: GstWebRTCICEComponent,
961 attr: *const c_char,
962 );
963 pub fn gst_webrtc_ice_transport_selected_pair_change(ice: *mut GstWebRTCICETransport);
964
965 pub fn gst_webrtc_rtp_receiver_get_type() -> GType;
969
970 pub fn gst_webrtc_rtp_sender_get_type() -> GType;
974 #[cfg(feature = "v1_20")]
975 #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
976 pub fn gst_webrtc_rtp_sender_set_priority(
977 sender: *mut GstWebRTCRTPSender,
978 priority: GstWebRTCPriorityType,
979 );
980
981 pub fn gst_webrtc_rtp_transceiver_get_type() -> GType;
985
986 #[cfg(feature = "v1_20")]
990 #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
991 pub fn gst_webrtc_sctp_transport_get_type() -> GType;
992
993}