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 gio_sys as gio;
16use glib_sys as glib;
17use gobject_sys as gobject;
18use gstreamer_sdp_sys as gst_sdp;
19use gstreamer_sys as gst;
20
21#[cfg(unix)]
22#[allow(unused_imports)]
23use libc::{dev_t, gid_t, pid_t, socklen_t, uid_t};
24#[allow(unused_imports)]
25use libc::{intptr_t, off_t, size_t, ssize_t, time_t, uintptr_t, FILE};
26#[allow(unused_imports)]
27use std::ffi::{
28 c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
29};
30
31#[allow(unused_imports)]
32use glib::{gboolean, gconstpointer, gpointer, GType};
33
34pub type GstRTSPAuthMethod = c_int;
36pub const GST_RTSP_AUTH_NONE: GstRTSPAuthMethod = 0;
37pub const GST_RTSP_AUTH_BASIC: GstRTSPAuthMethod = 1;
38pub const GST_RTSP_AUTH_DIGEST: GstRTSPAuthMethod = 2;
39
40pub type GstRTSPFamily = c_int;
41pub const GST_RTSP_FAM_NONE: GstRTSPFamily = 0;
42pub const GST_RTSP_FAM_INET: GstRTSPFamily = 1;
43pub const GST_RTSP_FAM_INET6: GstRTSPFamily = 2;
44
45pub type GstRTSPHeaderField = c_int;
46pub const GST_RTSP_HDR_INVALID: GstRTSPHeaderField = 0;
47pub const GST_RTSP_HDR_ACCEPT: GstRTSPHeaderField = 1;
48pub const GST_RTSP_HDR_ACCEPT_ENCODING: GstRTSPHeaderField = 2;
49pub const GST_RTSP_HDR_ACCEPT_LANGUAGE: GstRTSPHeaderField = 3;
50pub const GST_RTSP_HDR_ALLOW: GstRTSPHeaderField = 4;
51pub const GST_RTSP_HDR_AUTHORIZATION: GstRTSPHeaderField = 5;
52pub const GST_RTSP_HDR_BANDWIDTH: GstRTSPHeaderField = 6;
53pub const GST_RTSP_HDR_BLOCKSIZE: GstRTSPHeaderField = 7;
54pub const GST_RTSP_HDR_CACHE_CONTROL: GstRTSPHeaderField = 8;
55pub const GST_RTSP_HDR_CONFERENCE: GstRTSPHeaderField = 9;
56pub const GST_RTSP_HDR_CONNECTION: GstRTSPHeaderField = 10;
57pub const GST_RTSP_HDR_CONTENT_BASE: GstRTSPHeaderField = 11;
58pub const GST_RTSP_HDR_CONTENT_ENCODING: GstRTSPHeaderField = 12;
59pub const GST_RTSP_HDR_CONTENT_LANGUAGE: GstRTSPHeaderField = 13;
60pub const GST_RTSP_HDR_CONTENT_LENGTH: GstRTSPHeaderField = 14;
61pub const GST_RTSP_HDR_CONTENT_LOCATION: GstRTSPHeaderField = 15;
62pub const GST_RTSP_HDR_CONTENT_TYPE: GstRTSPHeaderField = 16;
63pub const GST_RTSP_HDR_CSEQ: GstRTSPHeaderField = 17;
64pub const GST_RTSP_HDR_DATE: GstRTSPHeaderField = 18;
65pub const GST_RTSP_HDR_EXPIRES: GstRTSPHeaderField = 19;
66pub const GST_RTSP_HDR_FROM: GstRTSPHeaderField = 20;
67pub const GST_RTSP_HDR_IF_MODIFIED_SINCE: GstRTSPHeaderField = 21;
68pub const GST_RTSP_HDR_LAST_MODIFIED: GstRTSPHeaderField = 22;
69pub const GST_RTSP_HDR_PROXY_AUTHENTICATE: GstRTSPHeaderField = 23;
70pub const GST_RTSP_HDR_PROXY_REQUIRE: GstRTSPHeaderField = 24;
71pub const GST_RTSP_HDR_PUBLIC: GstRTSPHeaderField = 25;
72pub const GST_RTSP_HDR_RANGE: GstRTSPHeaderField = 26;
73pub const GST_RTSP_HDR_REFERER: GstRTSPHeaderField = 27;
74pub const GST_RTSP_HDR_REQUIRE: GstRTSPHeaderField = 28;
75pub const GST_RTSP_HDR_RETRY_AFTER: GstRTSPHeaderField = 29;
76pub const GST_RTSP_HDR_RTP_INFO: GstRTSPHeaderField = 30;
77pub const GST_RTSP_HDR_SCALE: GstRTSPHeaderField = 31;
78pub const GST_RTSP_HDR_SESSION: GstRTSPHeaderField = 32;
79pub const GST_RTSP_HDR_SERVER: GstRTSPHeaderField = 33;
80pub const GST_RTSP_HDR_SPEED: GstRTSPHeaderField = 34;
81pub const GST_RTSP_HDR_TRANSPORT: GstRTSPHeaderField = 35;
82pub const GST_RTSP_HDR_UNSUPPORTED: GstRTSPHeaderField = 36;
83pub const GST_RTSP_HDR_USER_AGENT: GstRTSPHeaderField = 37;
84pub const GST_RTSP_HDR_VIA: GstRTSPHeaderField = 38;
85pub const GST_RTSP_HDR_WWW_AUTHENTICATE: GstRTSPHeaderField = 39;
86pub const GST_RTSP_HDR_CLIENT_CHALLENGE: GstRTSPHeaderField = 40;
87pub const GST_RTSP_HDR_REAL_CHALLENGE1: GstRTSPHeaderField = 41;
88pub const GST_RTSP_HDR_REAL_CHALLENGE2: GstRTSPHeaderField = 42;
89pub const GST_RTSP_HDR_REAL_CHALLENGE3: GstRTSPHeaderField = 43;
90pub const GST_RTSP_HDR_SUBSCRIBE: GstRTSPHeaderField = 44;
91pub const GST_RTSP_HDR_ALERT: GstRTSPHeaderField = 45;
92pub const GST_RTSP_HDR_CLIENT_ID: GstRTSPHeaderField = 46;
93pub const GST_RTSP_HDR_COMPANY_ID: GstRTSPHeaderField = 47;
94pub const GST_RTSP_HDR_GUID: GstRTSPHeaderField = 48;
95pub const GST_RTSP_HDR_REGION_DATA: GstRTSPHeaderField = 49;
96pub const GST_RTSP_HDR_MAX_ASM_WIDTH: GstRTSPHeaderField = 50;
97pub const GST_RTSP_HDR_LANGUAGE: GstRTSPHeaderField = 51;
98pub const GST_RTSP_HDR_PLAYER_START_TIME: GstRTSPHeaderField = 52;
99pub const GST_RTSP_HDR_LOCATION: GstRTSPHeaderField = 53;
100pub const GST_RTSP_HDR_ETAG: GstRTSPHeaderField = 54;
101pub const GST_RTSP_HDR_IF_MATCH: GstRTSPHeaderField = 55;
102pub const GST_RTSP_HDR_ACCEPT_CHARSET: GstRTSPHeaderField = 56;
103pub const GST_RTSP_HDR_SUPPORTED: GstRTSPHeaderField = 57;
104pub const GST_RTSP_HDR_VARY: GstRTSPHeaderField = 58;
105pub const GST_RTSP_HDR_X_ACCELERATE_STREAMING: GstRTSPHeaderField = 59;
106pub const GST_RTSP_HDR_X_ACCEPT_AUTHENT: GstRTSPHeaderField = 60;
107pub const GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT: GstRTSPHeaderField = 61;
108pub const GST_RTSP_HDR_X_BROADCAST_ID: GstRTSPHeaderField = 62;
109pub const GST_RTSP_HDR_X_BURST_STREAMING: GstRTSPHeaderField = 63;
110pub const GST_RTSP_HDR_X_NOTICE: GstRTSPHeaderField = 64;
111pub const GST_RTSP_HDR_X_PLAYER_LAG_TIME: GstRTSPHeaderField = 65;
112pub const GST_RTSP_HDR_X_PLAYLIST: GstRTSPHeaderField = 66;
113pub const GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE: GstRTSPHeaderField = 67;
114pub const GST_RTSP_HDR_X_PLAYLIST_GEN_ID: GstRTSPHeaderField = 68;
115pub const GST_RTSP_HDR_X_PLAYLIST_SEEK_ID: GstRTSPHeaderField = 69;
116pub const GST_RTSP_HDR_X_PROXY_CLIENT_AGENT: GstRTSPHeaderField = 70;
117pub const GST_RTSP_HDR_X_PROXY_CLIENT_VERB: GstRTSPHeaderField = 71;
118pub const GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE: GstRTSPHeaderField = 72;
119pub const GST_RTSP_HDR_X_RTP_INFO: GstRTSPHeaderField = 73;
120pub const GST_RTSP_HDR_X_STARTUPPROFILE: GstRTSPHeaderField = 74;
121pub const GST_RTSP_HDR_TIMESTAMP: GstRTSPHeaderField = 75;
122pub const GST_RTSP_HDR_AUTHENTICATION_INFO: GstRTSPHeaderField = 76;
123pub const GST_RTSP_HDR_HOST: GstRTSPHeaderField = 77;
124pub const GST_RTSP_HDR_PRAGMA: GstRTSPHeaderField = 78;
125pub const GST_RTSP_HDR_X_SERVER_IP_ADDRESS: GstRTSPHeaderField = 79;
126pub const GST_RTSP_HDR_X_SESSIONCOOKIE: GstRTSPHeaderField = 80;
127pub const GST_RTSP_HDR_RTCP_INTERVAL: GstRTSPHeaderField = 81;
128pub const GST_RTSP_HDR_KEYMGMT: GstRTSPHeaderField = 82;
129pub const GST_RTSP_HDR_PIPELINED_REQUESTS: GstRTSPHeaderField = 83;
130pub const GST_RTSP_HDR_MEDIA_PROPERTIES: GstRTSPHeaderField = 84;
131pub const GST_RTSP_HDR_SEEK_STYLE: GstRTSPHeaderField = 85;
132pub const GST_RTSP_HDR_ACCEPT_RANGES: GstRTSPHeaderField = 86;
133pub const GST_RTSP_HDR_FRAMES: GstRTSPHeaderField = 87;
134pub const GST_RTSP_HDR_RATE_CONTROL: GstRTSPHeaderField = 88;
135pub const GST_RTSP_HDR_LAST: GstRTSPHeaderField = 89;
136
137pub type GstRTSPMsgType = c_int;
138pub const GST_RTSP_MESSAGE_INVALID: GstRTSPMsgType = 0;
139pub const GST_RTSP_MESSAGE_REQUEST: GstRTSPMsgType = 1;
140pub const GST_RTSP_MESSAGE_RESPONSE: GstRTSPMsgType = 2;
141pub const GST_RTSP_MESSAGE_HTTP_REQUEST: GstRTSPMsgType = 3;
142pub const GST_RTSP_MESSAGE_HTTP_RESPONSE: GstRTSPMsgType = 4;
143pub const GST_RTSP_MESSAGE_DATA: GstRTSPMsgType = 5;
144
145pub type GstRTSPRangeUnit = c_int;
146pub const GST_RTSP_RANGE_SMPTE: GstRTSPRangeUnit = 0;
147pub const GST_RTSP_RANGE_SMPTE_30_DROP: GstRTSPRangeUnit = 1;
148pub const GST_RTSP_RANGE_SMPTE_25: GstRTSPRangeUnit = 2;
149pub const GST_RTSP_RANGE_NPT: GstRTSPRangeUnit = 3;
150pub const GST_RTSP_RANGE_CLOCK: GstRTSPRangeUnit = 4;
151
152pub type GstRTSPResult = c_int;
153pub const GST_RTSP_OK: GstRTSPResult = 0;
154#[cfg(feature = "v1_24")]
155#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
156pub const GST_RTSP_OK_REDIRECT: GstRTSPResult = 1;
157pub const GST_RTSP_ERROR: GstRTSPResult = -1;
158pub const GST_RTSP_EINVAL: GstRTSPResult = -2;
159pub const GST_RTSP_EINTR: GstRTSPResult = -3;
160pub const GST_RTSP_ENOMEM: GstRTSPResult = -4;
161pub const GST_RTSP_ERESOLV: GstRTSPResult = -5;
162pub const GST_RTSP_ENOTIMPL: GstRTSPResult = -6;
163pub const GST_RTSP_ESYS: GstRTSPResult = -7;
164pub const GST_RTSP_EPARSE: GstRTSPResult = -8;
165pub const GST_RTSP_EWSASTART: GstRTSPResult = -9;
166pub const GST_RTSP_EWSAVERSION: GstRTSPResult = -10;
167pub const GST_RTSP_EEOF: GstRTSPResult = -11;
168pub const GST_RTSP_ENET: GstRTSPResult = -12;
169pub const GST_RTSP_ENOTIP: GstRTSPResult = -13;
170pub const GST_RTSP_ETIMEOUT: GstRTSPResult = -14;
171pub const GST_RTSP_ETGET: GstRTSPResult = -15;
172pub const GST_RTSP_ETPOST: GstRTSPResult = -16;
173pub const GST_RTSP_ELAST: GstRTSPResult = -17;
174
175pub type GstRTSPState = c_int;
176pub const GST_RTSP_STATE_INVALID: GstRTSPState = 0;
177pub const GST_RTSP_STATE_INIT: GstRTSPState = 1;
178pub const GST_RTSP_STATE_READY: GstRTSPState = 2;
179pub const GST_RTSP_STATE_SEEKING: GstRTSPState = 3;
180pub const GST_RTSP_STATE_PLAYING: GstRTSPState = 4;
181pub const GST_RTSP_STATE_RECORDING: GstRTSPState = 5;
182
183pub type GstRTSPStatusCode = c_int;
184pub const GST_RTSP_STS_INVALID: GstRTSPStatusCode = 0;
185pub const GST_RTSP_STS_CONTINUE: GstRTSPStatusCode = 100;
186pub const GST_RTSP_STS_OK: GstRTSPStatusCode = 200;
187pub const GST_RTSP_STS_CREATED: GstRTSPStatusCode = 201;
188pub const GST_RTSP_STS_LOW_ON_STORAGE: GstRTSPStatusCode = 250;
189pub const GST_RTSP_STS_MULTIPLE_CHOICES: GstRTSPStatusCode = 300;
190pub const GST_RTSP_STS_MOVED_PERMANENTLY: GstRTSPStatusCode = 301;
191pub const GST_RTSP_STS_MOVE_TEMPORARILY: GstRTSPStatusCode = 302;
192pub const GST_RTSP_STS_SEE_OTHER: GstRTSPStatusCode = 303;
193pub const GST_RTSP_STS_NOT_MODIFIED: GstRTSPStatusCode = 304;
194pub const GST_RTSP_STS_USE_PROXY: GstRTSPStatusCode = 305;
195#[cfg(feature = "v1_24")]
196#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
197pub const GST_RTSP_STS_REDIRECT_TEMPORARILY: GstRTSPStatusCode = 307;
198#[cfg(feature = "v1_24")]
199#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
200pub const GST_RTSP_STS_REDIRECT_PERMANENTLY: GstRTSPStatusCode = 308;
201pub const GST_RTSP_STS_BAD_REQUEST: GstRTSPStatusCode = 400;
202pub const GST_RTSP_STS_UNAUTHORIZED: GstRTSPStatusCode = 401;
203pub const GST_RTSP_STS_PAYMENT_REQUIRED: GstRTSPStatusCode = 402;
204pub const GST_RTSP_STS_FORBIDDEN: GstRTSPStatusCode = 403;
205pub const GST_RTSP_STS_NOT_FOUND: GstRTSPStatusCode = 404;
206pub const GST_RTSP_STS_METHOD_NOT_ALLOWED: GstRTSPStatusCode = 405;
207pub const GST_RTSP_STS_NOT_ACCEPTABLE: GstRTSPStatusCode = 406;
208pub const GST_RTSP_STS_PROXY_AUTH_REQUIRED: GstRTSPStatusCode = 407;
209pub const GST_RTSP_STS_REQUEST_TIMEOUT: GstRTSPStatusCode = 408;
210pub const GST_RTSP_STS_GONE: GstRTSPStatusCode = 410;
211pub const GST_RTSP_STS_LENGTH_REQUIRED: GstRTSPStatusCode = 411;
212pub const GST_RTSP_STS_PRECONDITION_FAILED: GstRTSPStatusCode = 412;
213pub const GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE: GstRTSPStatusCode = 413;
214pub const GST_RTSP_STS_REQUEST_URI_TOO_LARGE: GstRTSPStatusCode = 414;
215pub const GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE: GstRTSPStatusCode = 415;
216pub const GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD: GstRTSPStatusCode = 451;
217pub const GST_RTSP_STS_CONFERENCE_NOT_FOUND: GstRTSPStatusCode = 452;
218pub const GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH: GstRTSPStatusCode = 453;
219pub const GST_RTSP_STS_SESSION_NOT_FOUND: GstRTSPStatusCode = 454;
220pub const GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE: GstRTSPStatusCode = 455;
221pub const GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE: GstRTSPStatusCode = 456;
222pub const GST_RTSP_STS_INVALID_RANGE: GstRTSPStatusCode = 457;
223pub const GST_RTSP_STS_PARAMETER_IS_READONLY: GstRTSPStatusCode = 458;
224pub const GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED: GstRTSPStatusCode = 459;
225pub const GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED: GstRTSPStatusCode = 460;
226pub const GST_RTSP_STS_UNSUPPORTED_TRANSPORT: GstRTSPStatusCode = 461;
227pub const GST_RTSP_STS_DESTINATION_UNREACHABLE: GstRTSPStatusCode = 462;
228pub const GST_RTSP_STS_KEY_MANAGEMENT_FAILURE: GstRTSPStatusCode = 463;
229pub const GST_RTSP_STS_INTERNAL_SERVER_ERROR: GstRTSPStatusCode = 500;
230pub const GST_RTSP_STS_NOT_IMPLEMENTED: GstRTSPStatusCode = 501;
231pub const GST_RTSP_STS_BAD_GATEWAY: GstRTSPStatusCode = 502;
232pub const GST_RTSP_STS_SERVICE_UNAVAILABLE: GstRTSPStatusCode = 503;
233pub const GST_RTSP_STS_GATEWAY_TIMEOUT: GstRTSPStatusCode = 504;
234pub const GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED: GstRTSPStatusCode = 505;
235pub const GST_RTSP_STS_OPTION_NOT_SUPPORTED: GstRTSPStatusCode = 551;
236
237pub type GstRTSPTimeType = c_int;
238pub const GST_RTSP_TIME_SECONDS: GstRTSPTimeType = 0;
239pub const GST_RTSP_TIME_NOW: GstRTSPTimeType = 1;
240pub const GST_RTSP_TIME_END: GstRTSPTimeType = 2;
241pub const GST_RTSP_TIME_FRAMES: GstRTSPTimeType = 3;
242pub const GST_RTSP_TIME_UTC: GstRTSPTimeType = 4;
243
244pub type GstRTSPVersion = c_int;
245pub const GST_RTSP_VERSION_INVALID: GstRTSPVersion = 0;
246pub const GST_RTSP_VERSION_1_0: GstRTSPVersion = 16;
247pub const GST_RTSP_VERSION_1_1: GstRTSPVersion = 17;
248pub const GST_RTSP_VERSION_2_0: GstRTSPVersion = 32;
249
250pub const GST_RTSP_DEFAULT_PORT: c_int = 554;
252
253pub type GstRTSPEvent = c_uint;
255pub const GST_RTSP_EV_READ: GstRTSPEvent = 1;
256pub const GST_RTSP_EV_WRITE: GstRTSPEvent = 2;
257
258pub type GstRTSPLowerTrans = c_uint;
259pub const GST_RTSP_LOWER_TRANS_UNKNOWN: GstRTSPLowerTrans = 0;
260pub const GST_RTSP_LOWER_TRANS_UDP: GstRTSPLowerTrans = 1;
261pub const GST_RTSP_LOWER_TRANS_UDP_MCAST: GstRTSPLowerTrans = 2;
262pub const GST_RTSP_LOWER_TRANS_TCP: GstRTSPLowerTrans = 4;
263pub const GST_RTSP_LOWER_TRANS_HTTP: GstRTSPLowerTrans = 16;
264pub const GST_RTSP_LOWER_TRANS_TLS: GstRTSPLowerTrans = 32;
265
266pub type GstRTSPMethod = c_uint;
267pub const GST_RTSP_INVALID: GstRTSPMethod = 0;
268pub const GST_RTSP_DESCRIBE: GstRTSPMethod = 1;
269pub const GST_RTSP_ANNOUNCE: GstRTSPMethod = 2;
270pub const GST_RTSP_GET_PARAMETER: GstRTSPMethod = 4;
271pub const GST_RTSP_OPTIONS: GstRTSPMethod = 8;
272pub const GST_RTSP_PAUSE: GstRTSPMethod = 16;
273pub const GST_RTSP_PLAY: GstRTSPMethod = 32;
274pub const GST_RTSP_RECORD: GstRTSPMethod = 64;
275pub const GST_RTSP_REDIRECT: GstRTSPMethod = 128;
276pub const GST_RTSP_SETUP: GstRTSPMethod = 256;
277pub const GST_RTSP_SET_PARAMETER: GstRTSPMethod = 512;
278pub const GST_RTSP_TEARDOWN: GstRTSPMethod = 1024;
279pub const GST_RTSP_GET: GstRTSPMethod = 2048;
280pub const GST_RTSP_POST: GstRTSPMethod = 4096;
281
282pub type GstRTSPProfile = c_uint;
283pub const GST_RTSP_PROFILE_UNKNOWN: GstRTSPProfile = 0;
284pub const GST_RTSP_PROFILE_AVP: GstRTSPProfile = 1;
285pub const GST_RTSP_PROFILE_SAVP: GstRTSPProfile = 2;
286pub const GST_RTSP_PROFILE_AVPF: GstRTSPProfile = 4;
287pub const GST_RTSP_PROFILE_SAVPF: GstRTSPProfile = 8;
288
289pub type GstRTSPTransMode = c_uint;
290pub const GST_RTSP_TRANS_UNKNOWN: GstRTSPTransMode = 0;
291pub const GST_RTSP_TRANS_RTP: GstRTSPTransMode = 1;
292pub const GST_RTSP_TRANS_RDT: GstRTSPTransMode = 2;
293
294#[derive(Copy, Clone)]
296#[repr(C)]
297pub union GstRTSPMessage_type_data {
298 pub request: GstRTSPMessage_type_data_request,
299 pub response: GstRTSPMessage_type_data_response,
300 pub data: GstRTSPMessage_type_data_data,
301}
302
303impl ::std::fmt::Debug for GstRTSPMessage_type_data {
304 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
305 f.debug_struct(&format!("GstRTSPMessage_type_data @ {self:p}"))
306 .field("request", unsafe { &self.request })
307 .field("response", unsafe { &self.response })
308 .field("data", unsafe { &self.data })
309 .finish()
310 }
311}
312
313pub type GstRTSPConnectionAcceptCertificateFunc = Option<
315 unsafe extern "C" fn(
316 *mut gio::GTlsConnection,
317 *mut gio::GTlsCertificate,
318 gio::GTlsCertificateFlags,
319 gpointer,
320 ) -> gboolean,
321>;
322
323#[derive(Copy, Clone)]
325#[repr(C)]
326pub struct GstRTSPAuthCredential {
327 pub scheme: GstRTSPAuthMethod,
328 pub params: *mut *mut GstRTSPAuthParam,
329 pub authorization: *mut c_char,
330}
331
332impl ::std::fmt::Debug for GstRTSPAuthCredential {
333 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
334 f.debug_struct(&format!("GstRTSPAuthCredential @ {self:p}"))
335 .field("scheme", &self.scheme)
336 .field("params", &self.params)
337 .field("authorization", &self.authorization)
338 .finish()
339 }
340}
341
342#[derive(Copy, Clone)]
343#[repr(C)]
344pub struct GstRTSPAuthParam {
345 pub name: *mut c_char,
346 pub value: *mut c_char,
347}
348
349impl ::std::fmt::Debug for GstRTSPAuthParam {
350 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
351 f.debug_struct(&format!("GstRTSPAuthParam @ {self:p}"))
352 .field("name", &self.name)
353 .field("value", &self.value)
354 .finish()
355 }
356}
357
358#[repr(C)]
359#[allow(dead_code)]
360pub struct _GstRTSPConnection {
361 _data: [u8; 0],
362 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
363}
364
365pub type GstRTSPConnection = _GstRTSPConnection;
366
367#[derive(Copy, Clone)]
368#[repr(C)]
369pub struct GstRTSPExtensionInterface {
370 pub parent: gobject::GTypeInterface,
371 pub detect_server:
372 Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut GstRTSPMessage) -> gboolean>,
373 pub before_send:
374 Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut GstRTSPMessage) -> GstRTSPResult>,
375 pub after_send: Option<
376 unsafe extern "C" fn(
377 *mut GstRTSPExtension,
378 *mut GstRTSPMessage,
379 *mut GstRTSPMessage,
380 ) -> GstRTSPResult,
381 >,
382 pub parse_sdp: Option<
383 unsafe extern "C" fn(
384 *mut GstRTSPExtension,
385 *mut gst_sdp::GstSDPMessage,
386 *mut gst::GstStructure,
387 ) -> GstRTSPResult,
388 >,
389 pub setup_media: Option<
390 unsafe extern "C" fn(*mut GstRTSPExtension, *mut gst_sdp::GstSDPMedia) -> GstRTSPResult,
391 >,
392 pub configure_stream:
393 Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut gst::GstCaps) -> gboolean>,
394 pub get_transports: Option<
395 unsafe extern "C" fn(
396 *mut GstRTSPExtension,
397 GstRTSPLowerTrans,
398 *mut *mut c_char,
399 ) -> GstRTSPResult,
400 >,
401 pub stream_select:
402 Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut GstRTSPUrl) -> GstRTSPResult>,
403 pub send: Option<
404 unsafe extern "C" fn(
405 *mut GstRTSPExtension,
406 *mut GstRTSPMessage,
407 *mut GstRTSPMessage,
408 ) -> GstRTSPResult,
409 >,
410 pub receive_request:
411 Option<unsafe extern "C" fn(*mut GstRTSPExtension, *mut GstRTSPMessage) -> GstRTSPResult>,
412 pub _gst_reserved: [gpointer; 4],
413}
414
415impl ::std::fmt::Debug for GstRTSPExtensionInterface {
416 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
417 f.debug_struct(&format!("GstRTSPExtensionInterface @ {self:p}"))
418 .field("parent", &self.parent)
419 .field("detect_server", &self.detect_server)
420 .field("before_send", &self.before_send)
421 .field("after_send", &self.after_send)
422 .field("parse_sdp", &self.parse_sdp)
423 .field("setup_media", &self.setup_media)
424 .field("configure_stream", &self.configure_stream)
425 .field("get_transports", &self.get_transports)
426 .field("stream_select", &self.stream_select)
427 .field("send", &self.send)
428 .field("receive_request", &self.receive_request)
429 .finish()
430 }
431}
432
433#[derive(Copy, Clone)]
434#[repr(C)]
435pub struct GstRTSPMessage {
436 pub type_: GstRTSPMsgType,
437 pub type_data: GstRTSPMessage_type_data,
438 pub hdr_fields: *mut glib::GArray,
439 pub body: *mut u8,
440 pub body_size: c_uint,
441 pub body_buffer: *mut gst::GstBuffer,
442 pub _gst_reserved: [gpointer; 3],
443}
444
445impl ::std::fmt::Debug for GstRTSPMessage {
446 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
447 f.debug_struct(&format!("GstRTSPMessage @ {self:p}"))
448 .field("type_", &self.type_)
449 .field("type_data", &self.type_data)
450 .finish()
451 }
452}
453
454#[derive(Copy, Clone)]
455#[repr(C)]
456pub struct GstRTSPMessage_type_data_data {
457 pub channel: u8,
458}
459
460impl ::std::fmt::Debug for GstRTSPMessage_type_data_data {
461 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
462 f.debug_struct(&format!("GstRTSPMessage_type_data_data @ {self:p}"))
463 .field("channel", &self.channel)
464 .finish()
465 }
466}
467
468#[derive(Copy, Clone)]
469#[repr(C)]
470pub struct GstRTSPMessage_type_data_request {
471 pub method: GstRTSPMethod,
472 pub uri: *mut c_char,
473 pub version: GstRTSPVersion,
474}
475
476impl ::std::fmt::Debug for GstRTSPMessage_type_data_request {
477 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
478 f.debug_struct(&format!("GstRTSPMessage_type_data_request @ {self:p}"))
479 .field("method", &self.method)
480 .field("uri", &self.uri)
481 .field("version", &self.version)
482 .finish()
483 }
484}
485
486#[derive(Copy, Clone)]
487#[repr(C)]
488pub struct GstRTSPMessage_type_data_response {
489 pub code: GstRTSPStatusCode,
490 pub reason: *mut c_char,
491 pub version: GstRTSPVersion,
492}
493
494impl ::std::fmt::Debug for GstRTSPMessage_type_data_response {
495 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
496 f.debug_struct(&format!("GstRTSPMessage_type_data_response @ {self:p}"))
497 .field("code", &self.code)
498 .field("reason", &self.reason)
499 .field("version", &self.version)
500 .finish()
501 }
502}
503
504#[derive(Copy, Clone)]
505#[repr(C)]
506pub struct GstRTSPRange {
507 pub min: c_int,
508 pub max: c_int,
509}
510
511impl ::std::fmt::Debug for GstRTSPRange {
512 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
513 f.debug_struct(&format!("GstRTSPRange @ {self:p}"))
514 .field("min", &self.min)
515 .field("max", &self.max)
516 .finish()
517 }
518}
519
520#[derive(Copy, Clone)]
521#[repr(C)]
522pub struct GstRTSPTime {
523 pub type_: GstRTSPTimeType,
524 pub seconds: c_double,
525}
526
527impl ::std::fmt::Debug for GstRTSPTime {
528 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
529 f.debug_struct(&format!("GstRTSPTime @ {self:p}"))
530 .field("type_", &self.type_)
531 .field("seconds", &self.seconds)
532 .finish()
533 }
534}
535
536#[derive(Copy, Clone)]
537#[repr(C)]
538pub struct GstRTSPTime2 {
539 pub frames: c_double,
540 pub year: c_uint,
541 pub month: c_uint,
542 pub day: c_uint,
543}
544
545impl ::std::fmt::Debug for GstRTSPTime2 {
546 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
547 f.debug_struct(&format!("GstRTSPTime2 @ {self:p}"))
548 .field("frames", &self.frames)
549 .field("year", &self.year)
550 .field("month", &self.month)
551 .field("day", &self.day)
552 .finish()
553 }
554}
555
556#[derive(Copy, Clone)]
557#[repr(C)]
558pub struct GstRTSPTimeRange {
559 pub unit: GstRTSPRangeUnit,
560 pub min: GstRTSPTime,
561 pub max: GstRTSPTime,
562 pub min2: GstRTSPTime2,
563 pub max2: GstRTSPTime2,
564}
565
566impl ::std::fmt::Debug for GstRTSPTimeRange {
567 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
568 f.debug_struct(&format!("GstRTSPTimeRange @ {self:p}"))
569 .field("unit", &self.unit)
570 .field("min", &self.min)
571 .field("max", &self.max)
572 .field("min2", &self.min2)
573 .field("max2", &self.max2)
574 .finish()
575 }
576}
577
578#[derive(Copy, Clone)]
579#[repr(C)]
580pub struct GstRTSPTransport {
581 pub trans: GstRTSPTransMode,
582 pub profile: GstRTSPProfile,
583 pub lower_transport: GstRTSPLowerTrans,
584 pub destination: *mut c_char,
585 pub source: *mut c_char,
586 pub layers: c_uint,
587 pub mode_play: gboolean,
588 pub mode_record: gboolean,
589 pub append: gboolean,
590 pub interleaved: GstRTSPRange,
591 pub ttl: c_uint,
592 pub port: GstRTSPRange,
593 pub client_port: GstRTSPRange,
594 pub server_port: GstRTSPRange,
595 pub ssrc: c_uint,
596 pub _gst_reserved: [gpointer; 4],
597}
598
599impl ::std::fmt::Debug for GstRTSPTransport {
600 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
601 f.debug_struct(&format!("GstRTSPTransport @ {self:p}"))
602 .field("trans", &self.trans)
603 .field("profile", &self.profile)
604 .field("lower_transport", &self.lower_transport)
605 .field("destination", &self.destination)
606 .field("source", &self.source)
607 .field("layers", &self.layers)
608 .field("mode_play", &self.mode_play)
609 .field("mode_record", &self.mode_record)
610 .field("append", &self.append)
611 .field("interleaved", &self.interleaved)
612 .field("ttl", &self.ttl)
613 .field("port", &self.port)
614 .field("client_port", &self.client_port)
615 .field("server_port", &self.server_port)
616 .field("ssrc", &self.ssrc)
617 .finish()
618 }
619}
620
621#[derive(Copy, Clone)]
622#[repr(C)]
623pub struct GstRTSPUrl {
624 pub transports: GstRTSPLowerTrans,
625 pub family: GstRTSPFamily,
626 pub user: *mut c_char,
627 pub passwd: *mut c_char,
628 pub host: *mut c_char,
629 pub port: u16,
630 pub abspath: *mut c_char,
631 pub query: *mut c_char,
632}
633
634impl ::std::fmt::Debug for GstRTSPUrl {
635 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
636 f.debug_struct(&format!("GstRTSPUrl @ {self:p}"))
637 .field("transports", &self.transports)
638 .field("family", &self.family)
639 .field("user", &self.user)
640 .field("passwd", &self.passwd)
641 .field("host", &self.host)
642 .field("port", &self.port)
643 .field("abspath", &self.abspath)
644 .field("query", &self.query)
645 .finish()
646 }
647}
648
649#[repr(C)]
650#[allow(dead_code)]
651pub struct _GstRTSPWatch {
652 _data: [u8; 0],
653 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
654}
655
656pub type GstRTSPWatch = _GstRTSPWatch;
657
658#[derive(Copy, Clone)]
659#[repr(C)]
660pub struct GstRTSPWatchFuncs {
661 pub message_received: Option<
662 unsafe extern "C" fn(*mut GstRTSPWatch, *mut GstRTSPMessage, gpointer) -> GstRTSPResult,
663 >,
664 pub message_sent:
665 Option<unsafe extern "C" fn(*mut GstRTSPWatch, c_uint, gpointer) -> GstRTSPResult>,
666 pub closed: Option<unsafe extern "C" fn(*mut GstRTSPWatch, gpointer) -> GstRTSPResult>,
667 pub error:
668 Option<unsafe extern "C" fn(*mut GstRTSPWatch, GstRTSPResult, gpointer) -> GstRTSPResult>,
669 pub tunnel_start:
670 Option<unsafe extern "C" fn(*mut GstRTSPWatch, gpointer) -> GstRTSPStatusCode>,
671 pub tunnel_complete: Option<unsafe extern "C" fn(*mut GstRTSPWatch, gpointer) -> GstRTSPResult>,
672 pub error_full: Option<
673 unsafe extern "C" fn(
674 *mut GstRTSPWatch,
675 GstRTSPResult,
676 *mut GstRTSPMessage,
677 c_uint,
678 gpointer,
679 ) -> GstRTSPResult,
680 >,
681 pub tunnel_lost: Option<unsafe extern "C" fn(*mut GstRTSPWatch, gpointer) -> GstRTSPResult>,
682 pub tunnel_http_response: Option<
683 unsafe extern "C" fn(
684 *mut GstRTSPWatch,
685 *mut GstRTSPMessage,
686 *mut GstRTSPMessage,
687 gpointer,
688 ) -> GstRTSPResult,
689 >,
690 pub _gst_reserved: [gpointer; 3],
691}
692
693impl ::std::fmt::Debug for GstRTSPWatchFuncs {
694 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
695 f.debug_struct(&format!("GstRTSPWatchFuncs @ {self:p}"))
696 .field("message_received", &self.message_received)
697 .field("message_sent", &self.message_sent)
698 .field("closed", &self.closed)
699 .field("error", &self.error)
700 .field("tunnel_start", &self.tunnel_start)
701 .field("tunnel_complete", &self.tunnel_complete)
702 .field("error_full", &self.error_full)
703 .field("tunnel_lost", &self.tunnel_lost)
704 .field("tunnel_http_response", &self.tunnel_http_response)
705 .finish()
706 }
707}
708
709#[repr(C)]
711#[allow(dead_code)]
712pub struct GstRTSPExtension {
713 _data: [u8; 0],
714 _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
715}
716
717impl ::std::fmt::Debug for GstRTSPExtension {
718 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
719 write!(f, "GstRTSPExtension @ {self:p}")
720 }
721}
722
723extern "C" {
724
725 pub fn gst_rtsp_auth_method_get_type() -> GType;
729
730 pub fn gst_rtsp_family_get_type() -> GType;
734
735 pub fn gst_rtsp_header_field_get_type() -> GType;
739
740 pub fn gst_rtsp_msg_type_get_type() -> GType;
744
745 pub fn gst_rtsp_range_unit_get_type() -> GType;
749
750 pub fn gst_rtsp_result_get_type() -> GType;
754
755 pub fn gst_rtsp_state_get_type() -> GType;
759
760 pub fn gst_rtsp_status_code_get_type() -> GType;
764
765 pub fn gst_rtsp_time_type_get_type() -> GType;
769
770 pub fn gst_rtsp_version_get_type() -> GType;
774 pub fn gst_rtsp_version_as_text(version: GstRTSPVersion) -> *const c_char;
775
776 pub fn gst_rtsp_event_get_type() -> GType;
780
781 pub fn gst_rtsp_lower_trans_get_type() -> GType;
785
786 pub fn gst_rtsp_method_get_type() -> GType;
790 pub fn gst_rtsp_method_as_text(method: GstRTSPMethod) -> *const c_char;
791
792 pub fn gst_rtsp_profile_get_type() -> GType;
796
797 pub fn gst_rtsp_trans_mode_get_type() -> GType;
801
802 pub fn gst_rtsp_auth_credential_get_type() -> GType;
806
807 pub fn gst_rtsp_auth_param_get_type() -> GType;
811 pub fn gst_rtsp_auth_param_copy(param: *mut GstRTSPAuthParam) -> *mut GstRTSPAuthParam;
812 pub fn gst_rtsp_auth_param_free(param: *mut GstRTSPAuthParam);
813
814 #[cfg(feature = "v1_24")]
818 #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
819 pub fn gst_rtsp_connection_add_extra_http_request_header(
820 conn: *mut GstRTSPConnection,
821 key: *const c_char,
822 value: *const c_char,
823 );
824 pub fn gst_rtsp_connection_clear_auth_params(conn: *mut GstRTSPConnection);
825 pub fn gst_rtsp_connection_close(conn: *mut GstRTSPConnection) -> GstRTSPResult;
826 pub fn gst_rtsp_connection_connect(
827 conn: *mut GstRTSPConnection,
828 timeout: *mut glib::GTimeVal,
829 ) -> GstRTSPResult;
830 #[cfg(feature = "v1_18")]
831 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
832 pub fn gst_rtsp_connection_connect_usec(
833 conn: *mut GstRTSPConnection,
834 timeout: i64,
835 ) -> GstRTSPResult;
836 pub fn gst_rtsp_connection_connect_with_response(
837 conn: *mut GstRTSPConnection,
838 timeout: *mut glib::GTimeVal,
839 response: *mut GstRTSPMessage,
840 ) -> GstRTSPResult;
841 #[cfg(feature = "v1_18")]
842 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
843 pub fn gst_rtsp_connection_connect_with_response_usec(
844 conn: *mut GstRTSPConnection,
845 timeout: i64,
846 response: *mut GstRTSPMessage,
847 ) -> GstRTSPResult;
848 pub fn gst_rtsp_connection_do_tunnel(
849 conn: *mut GstRTSPConnection,
850 conn2: *mut GstRTSPConnection,
851 ) -> GstRTSPResult;
852 pub fn gst_rtsp_connection_flush(
853 conn: *mut GstRTSPConnection,
854 flush: gboolean,
855 ) -> GstRTSPResult;
856 pub fn gst_rtsp_connection_free(conn: *mut GstRTSPConnection) -> GstRTSPResult;
857 #[cfg(feature = "v1_20")]
858 #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
859 pub fn gst_rtsp_connection_get_ignore_x_server_reply(
860 conn: *const GstRTSPConnection,
861 ) -> gboolean;
862 pub fn gst_rtsp_connection_get_ip(conn: *const GstRTSPConnection) -> *const c_char;
863 pub fn gst_rtsp_connection_get_read_socket(conn: *const GstRTSPConnection)
864 -> *mut gio::GSocket;
865 pub fn gst_rtsp_connection_get_remember_session_id(conn: *mut GstRTSPConnection) -> gboolean;
866 pub fn gst_rtsp_connection_get_tls(
867 conn: *mut GstRTSPConnection,
868 error: *mut *mut glib::GError,
869 ) -> *mut gio::GTlsConnection;
870 pub fn gst_rtsp_connection_get_tls_database(
871 conn: *mut GstRTSPConnection,
872 ) -> *mut gio::GTlsDatabase;
873 pub fn gst_rtsp_connection_get_tls_interaction(
874 conn: *mut GstRTSPConnection,
875 ) -> *mut gio::GTlsInteraction;
876 pub fn gst_rtsp_connection_get_tls_validation_flags(
877 conn: *mut GstRTSPConnection,
878 ) -> gio::GTlsCertificateFlags;
879 pub fn gst_rtsp_connection_get_tunnelid(conn: *const GstRTSPConnection) -> *const c_char;
880 pub fn gst_rtsp_connection_get_url(conn: *const GstRTSPConnection) -> *mut GstRTSPUrl;
881 pub fn gst_rtsp_connection_get_write_socket(
882 conn: *const GstRTSPConnection,
883 ) -> *mut gio::GSocket;
884 pub fn gst_rtsp_connection_is_tunneled(conn: *const GstRTSPConnection) -> gboolean;
885 pub fn gst_rtsp_connection_next_timeout(
886 conn: *mut GstRTSPConnection,
887 timeout: *mut glib::GTimeVal,
888 ) -> GstRTSPResult;
889 #[cfg(feature = "v1_18")]
890 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
891 pub fn gst_rtsp_connection_next_timeout_usec(conn: *mut GstRTSPConnection) -> i64;
892 pub fn gst_rtsp_connection_poll(
893 conn: *mut GstRTSPConnection,
894 events: GstRTSPEvent,
895 revents: *mut GstRTSPEvent,
896 timeout: *mut glib::GTimeVal,
897 ) -> GstRTSPResult;
898 #[cfg(feature = "v1_18")]
899 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
900 pub fn gst_rtsp_connection_poll_usec(
901 conn: *mut GstRTSPConnection,
902 events: GstRTSPEvent,
903 revents: *mut GstRTSPEvent,
904 timeout: i64,
905 ) -> GstRTSPResult;
906 pub fn gst_rtsp_connection_read(
907 conn: *mut GstRTSPConnection,
908 data: *mut u8,
909 size: c_uint,
910 timeout: *mut glib::GTimeVal,
911 ) -> GstRTSPResult;
912 #[cfg(feature = "v1_18")]
913 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
914 pub fn gst_rtsp_connection_read_usec(
915 conn: *mut GstRTSPConnection,
916 data: *mut u8,
917 size: c_uint,
918 timeout: i64,
919 ) -> GstRTSPResult;
920 pub fn gst_rtsp_connection_receive(
921 conn: *mut GstRTSPConnection,
922 message: *mut GstRTSPMessage,
923 timeout: *mut glib::GTimeVal,
924 ) -> GstRTSPResult;
925 #[cfg(feature = "v1_18")]
926 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
927 pub fn gst_rtsp_connection_receive_usec(
928 conn: *mut GstRTSPConnection,
929 message: *mut GstRTSPMessage,
930 timeout: i64,
931 ) -> GstRTSPResult;
932 pub fn gst_rtsp_connection_reset_timeout(conn: *mut GstRTSPConnection) -> GstRTSPResult;
933 pub fn gst_rtsp_connection_send(
934 conn: *mut GstRTSPConnection,
935 message: *mut GstRTSPMessage,
936 timeout: *mut glib::GTimeVal,
937 ) -> GstRTSPResult;
938 #[cfg(feature = "v1_16")]
939 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
940 pub fn gst_rtsp_connection_send_messages(
941 conn: *mut GstRTSPConnection,
942 messages: *mut GstRTSPMessage,
943 n_messages: c_uint,
944 timeout: *mut glib::GTimeVal,
945 ) -> GstRTSPResult;
946 #[cfg(feature = "v1_18")]
947 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
948 pub fn gst_rtsp_connection_send_messages_usec(
949 conn: *mut GstRTSPConnection,
950 messages: *mut GstRTSPMessage,
951 n_messages: c_uint,
952 timeout: i64,
953 ) -> GstRTSPResult;
954 #[cfg(feature = "v1_18")]
955 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
956 pub fn gst_rtsp_connection_send_usec(
957 conn: *mut GstRTSPConnection,
958 message: *mut GstRTSPMessage,
959 timeout: i64,
960 ) -> GstRTSPResult;
961 pub fn gst_rtsp_connection_set_accept_certificate_func(
962 conn: *mut GstRTSPConnection,
963 func: GstRTSPConnectionAcceptCertificateFunc,
964 user_data: gpointer,
965 destroy_notify: glib::GDestroyNotify,
966 );
967 pub fn gst_rtsp_connection_set_auth(
968 conn: *mut GstRTSPConnection,
969 method: GstRTSPAuthMethod,
970 user: *const c_char,
971 pass: *const c_char,
972 ) -> GstRTSPResult;
973 pub fn gst_rtsp_connection_set_auth_param(
974 conn: *mut GstRTSPConnection,
975 param: *const c_char,
976 value: *const c_char,
977 );
978 #[cfg(feature = "v1_18")]
979 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
980 pub fn gst_rtsp_connection_set_content_length_limit(
981 conn: *mut GstRTSPConnection,
982 limit: c_uint,
983 );
984 pub fn gst_rtsp_connection_set_http_mode(conn: *mut GstRTSPConnection, enable: gboolean);
985 #[cfg(feature = "v1_20")]
986 #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
987 pub fn gst_rtsp_connection_set_ignore_x_server_reply(
988 conn: *mut GstRTSPConnection,
989 ignore: gboolean,
990 );
991 pub fn gst_rtsp_connection_set_ip(conn: *mut GstRTSPConnection, ip: *const c_char);
992 pub fn gst_rtsp_connection_set_proxy(
993 conn: *mut GstRTSPConnection,
994 host: *const c_char,
995 port: c_uint,
996 ) -> GstRTSPResult;
997 pub fn gst_rtsp_connection_set_qos_dscp(
998 conn: *mut GstRTSPConnection,
999 qos_dscp: c_uint,
1000 ) -> GstRTSPResult;
1001 pub fn gst_rtsp_connection_set_remember_session_id(
1002 conn: *mut GstRTSPConnection,
1003 remember: gboolean,
1004 );
1005 pub fn gst_rtsp_connection_set_tls_database(
1006 conn: *mut GstRTSPConnection,
1007 database: *mut gio::GTlsDatabase,
1008 );
1009 pub fn gst_rtsp_connection_set_tls_interaction(
1010 conn: *mut GstRTSPConnection,
1011 interaction: *mut gio::GTlsInteraction,
1012 );
1013 pub fn gst_rtsp_connection_set_tls_validation_flags(
1014 conn: *mut GstRTSPConnection,
1015 flags: gio::GTlsCertificateFlags,
1016 ) -> gboolean;
1017 pub fn gst_rtsp_connection_set_tunneled(conn: *mut GstRTSPConnection, tunneled: gboolean);
1018 pub fn gst_rtsp_connection_write(
1019 conn: *mut GstRTSPConnection,
1020 data: *const u8,
1021 size: c_uint,
1022 timeout: *mut glib::GTimeVal,
1023 ) -> GstRTSPResult;
1024 #[cfg(feature = "v1_18")]
1025 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1026 pub fn gst_rtsp_connection_write_usec(
1027 conn: *mut GstRTSPConnection,
1028 data: *const u8,
1029 size: c_uint,
1030 timeout: i64,
1031 ) -> GstRTSPResult;
1032 pub fn gst_rtsp_connection_accept(
1033 socket: *mut gio::GSocket,
1034 conn: *mut *mut GstRTSPConnection,
1035 cancellable: *mut gio::GCancellable,
1036 ) -> GstRTSPResult;
1037 pub fn gst_rtsp_connection_create(
1038 url: *const GstRTSPUrl,
1039 conn: *mut *mut GstRTSPConnection,
1040 ) -> GstRTSPResult;
1041 pub fn gst_rtsp_connection_create_from_socket(
1042 socket: *mut gio::GSocket,
1043 ip: *const c_char,
1044 port: u16,
1045 initial_buffer: *const c_char,
1046 conn: *mut *mut GstRTSPConnection,
1047 ) -> GstRTSPResult;
1048
1049 pub fn gst_rtsp_msg_get_type() -> GType;
1053 pub fn gst_rtsp_message_add_header(
1054 msg: *mut GstRTSPMessage,
1055 field: GstRTSPHeaderField,
1056 value: *const c_char,
1057 ) -> GstRTSPResult;
1058 pub fn gst_rtsp_message_add_header_by_name(
1059 msg: *mut GstRTSPMessage,
1060 header: *const c_char,
1061 value: *const c_char,
1062 ) -> GstRTSPResult;
1063 pub fn gst_rtsp_message_append_headers(
1064 msg: *const GstRTSPMessage,
1065 str: *mut glib::GString,
1066 ) -> GstRTSPResult;
1067 pub fn gst_rtsp_message_copy(
1068 msg: *const GstRTSPMessage,
1069 copy: *mut *mut GstRTSPMessage,
1070 ) -> GstRTSPResult;
1071 pub fn gst_rtsp_message_dump(msg: *mut GstRTSPMessage) -> GstRTSPResult;
1072 pub fn gst_rtsp_message_free(msg: *mut GstRTSPMessage) -> GstRTSPResult;
1073 pub fn gst_rtsp_message_get_body(
1074 msg: *const GstRTSPMessage,
1075 data: *mut *mut u8,
1076 size: *mut c_uint,
1077 ) -> GstRTSPResult;
1078 #[cfg(feature = "v1_16")]
1079 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
1080 pub fn gst_rtsp_message_get_body_buffer(
1081 msg: *const GstRTSPMessage,
1082 buffer: *mut *mut gst::GstBuffer,
1083 ) -> GstRTSPResult;
1084 pub fn gst_rtsp_message_get_header(
1085 msg: *const GstRTSPMessage,
1086 field: GstRTSPHeaderField,
1087 value: *mut *mut c_char,
1088 indx: c_int,
1089 ) -> GstRTSPResult;
1090 pub fn gst_rtsp_message_get_header_by_name(
1091 msg: *mut GstRTSPMessage,
1092 header: *const c_char,
1093 value: *mut *mut c_char,
1094 index: c_int,
1095 ) -> GstRTSPResult;
1096 pub fn gst_rtsp_message_get_type(msg: *mut GstRTSPMessage) -> GstRTSPMsgType;
1097 #[cfg(feature = "v1_16")]
1098 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
1099 pub fn gst_rtsp_message_has_body_buffer(msg: *const GstRTSPMessage) -> gboolean;
1100 pub fn gst_rtsp_message_init(msg: *mut GstRTSPMessage) -> GstRTSPResult;
1101 pub fn gst_rtsp_message_init_data(msg: *mut GstRTSPMessage, channel: u8) -> GstRTSPResult;
1102 pub fn gst_rtsp_message_init_request(
1103 msg: *mut GstRTSPMessage,
1104 method: GstRTSPMethod,
1105 uri: *const c_char,
1106 ) -> GstRTSPResult;
1107 pub fn gst_rtsp_message_init_response(
1108 msg: *mut GstRTSPMessage,
1109 code: GstRTSPStatusCode,
1110 reason: *const c_char,
1111 request: *const GstRTSPMessage,
1112 ) -> GstRTSPResult;
1113 pub fn gst_rtsp_message_parse_auth_credentials(
1114 msg: *mut GstRTSPMessage,
1115 field: GstRTSPHeaderField,
1116 ) -> *mut *mut GstRTSPAuthCredential;
1117 pub fn gst_rtsp_message_parse_data(msg: *mut GstRTSPMessage, channel: *mut u8)
1118 -> GstRTSPResult;
1119 pub fn gst_rtsp_message_parse_request(
1120 msg: *mut GstRTSPMessage,
1121 method: *mut GstRTSPMethod,
1122 uri: *mut *const c_char,
1123 version: *mut GstRTSPVersion,
1124 ) -> GstRTSPResult;
1125 pub fn gst_rtsp_message_parse_response(
1126 msg: *mut GstRTSPMessage,
1127 code: *mut GstRTSPStatusCode,
1128 reason: *mut *const c_char,
1129 version: *mut GstRTSPVersion,
1130 ) -> GstRTSPResult;
1131 pub fn gst_rtsp_message_remove_header(
1132 msg: *mut GstRTSPMessage,
1133 field: GstRTSPHeaderField,
1134 indx: c_int,
1135 ) -> GstRTSPResult;
1136 pub fn gst_rtsp_message_remove_header_by_name(
1137 msg: *mut GstRTSPMessage,
1138 header: *const c_char,
1139 index: c_int,
1140 ) -> GstRTSPResult;
1141 pub fn gst_rtsp_message_set_body(
1142 msg: *mut GstRTSPMessage,
1143 data: *const u8,
1144 size: c_uint,
1145 ) -> GstRTSPResult;
1146 #[cfg(feature = "v1_16")]
1147 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
1148 pub fn gst_rtsp_message_set_body_buffer(
1149 msg: *mut GstRTSPMessage,
1150 buffer: *mut gst::GstBuffer,
1151 ) -> GstRTSPResult;
1152 pub fn gst_rtsp_message_steal_body(
1153 msg: *mut GstRTSPMessage,
1154 data: *mut *mut u8,
1155 size: *mut c_uint,
1156 ) -> GstRTSPResult;
1157 #[cfg(feature = "v1_16")]
1158 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
1159 pub fn gst_rtsp_message_steal_body_buffer(
1160 msg: *mut GstRTSPMessage,
1161 buffer: *mut *mut gst::GstBuffer,
1162 ) -> GstRTSPResult;
1163 pub fn gst_rtsp_message_take_body(
1164 msg: *mut GstRTSPMessage,
1165 data: *mut u8,
1166 size: c_uint,
1167 ) -> GstRTSPResult;
1168 #[cfg(feature = "v1_16")]
1169 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
1170 pub fn gst_rtsp_message_take_body_buffer(
1171 msg: *mut GstRTSPMessage,
1172 buffer: *mut gst::GstBuffer,
1173 ) -> GstRTSPResult;
1174 pub fn gst_rtsp_message_take_header(
1175 msg: *mut GstRTSPMessage,
1176 field: GstRTSPHeaderField,
1177 value: *mut c_char,
1178 ) -> GstRTSPResult;
1179 pub fn gst_rtsp_message_take_header_by_name(
1180 msg: *mut GstRTSPMessage,
1181 header: *const c_char,
1182 value: *mut c_char,
1183 ) -> GstRTSPResult;
1184 pub fn gst_rtsp_message_unset(msg: *mut GstRTSPMessage) -> GstRTSPResult;
1185
1186 pub fn gst_rtsp_range_convert_units(
1190 range: *mut GstRTSPTimeRange,
1191 unit: GstRTSPRangeUnit,
1192 ) -> gboolean;
1193 pub fn gst_rtsp_range_free(range: *mut GstRTSPTimeRange);
1194 pub fn gst_rtsp_range_get_times(
1195 range: *const GstRTSPTimeRange,
1196 min: *mut gst::GstClockTime,
1197 max: *mut gst::GstClockTime,
1198 ) -> gboolean;
1199 pub fn gst_rtsp_range_parse(
1200 rangestr: *const c_char,
1201 range: *mut *mut GstRTSPTimeRange,
1202 ) -> GstRTSPResult;
1203 pub fn gst_rtsp_range_to_string(range: *const GstRTSPTimeRange) -> *mut c_char;
1204
1205 pub fn gst_rtsp_transport_as_text(transport: *mut GstRTSPTransport) -> *mut c_char;
1209 pub fn gst_rtsp_transport_free(transport: *mut GstRTSPTransport) -> GstRTSPResult;
1210 pub fn gst_rtsp_transport_get_media_type(
1211 transport: *mut GstRTSPTransport,
1212 media_type: *mut *const c_char,
1213 ) -> GstRTSPResult;
1214 pub fn gst_rtsp_transport_get_manager(
1215 trans: GstRTSPTransMode,
1216 manager: *mut *const c_char,
1217 option: c_uint,
1218 ) -> GstRTSPResult;
1219 pub fn gst_rtsp_transport_get_mime(
1220 trans: GstRTSPTransMode,
1221 mime: *mut *const c_char,
1222 ) -> GstRTSPResult;
1223 pub fn gst_rtsp_transport_init(transport: *mut GstRTSPTransport) -> GstRTSPResult;
1224 pub fn gst_rtsp_transport_new(transport: *mut *mut GstRTSPTransport) -> GstRTSPResult;
1225 pub fn gst_rtsp_transport_parse(
1226 str: *const c_char,
1227 transport: *mut GstRTSPTransport,
1228 ) -> GstRTSPResult;
1229
1230 pub fn gst_rtsp_url_get_type() -> GType;
1234 pub fn gst_rtsp_url_copy(url: *const GstRTSPUrl) -> *mut GstRTSPUrl;
1235 pub fn gst_rtsp_url_decode_path_components(url: *const GstRTSPUrl) -> *mut *mut c_char;
1236 pub fn gst_rtsp_url_free(url: *mut GstRTSPUrl);
1237 pub fn gst_rtsp_url_get_port(url: *const GstRTSPUrl, port: *mut u16) -> GstRTSPResult;
1238 pub fn gst_rtsp_url_get_request_uri(url: *const GstRTSPUrl) -> *mut c_char;
1239 #[cfg(feature = "v1_18")]
1240 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1241 pub fn gst_rtsp_url_get_request_uri_with_control(
1242 url: *const GstRTSPUrl,
1243 control_path: *const c_char,
1244 ) -> *mut c_char;
1245 pub fn gst_rtsp_url_set_port(url: *mut GstRTSPUrl, port: u16) -> GstRTSPResult;
1246 pub fn gst_rtsp_url_parse(urlstr: *const c_char, url: *mut *mut GstRTSPUrl) -> GstRTSPResult;
1247
1248 pub fn gst_rtsp_watch_attach(
1252 watch: *mut GstRTSPWatch,
1253 context: *mut glib::GMainContext,
1254 ) -> c_uint;
1255 pub fn gst_rtsp_watch_get_send_backlog(
1256 watch: *mut GstRTSPWatch,
1257 bytes: *mut size_t,
1258 messages: *mut c_uint,
1259 );
1260 pub fn gst_rtsp_watch_reset(watch: *mut GstRTSPWatch);
1261 pub fn gst_rtsp_watch_send_message(
1262 watch: *mut GstRTSPWatch,
1263 message: *mut GstRTSPMessage,
1264 id: *mut c_uint,
1265 ) -> GstRTSPResult;
1266 #[cfg(feature = "v1_16")]
1267 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
1268 pub fn gst_rtsp_watch_send_messages(
1269 watch: *mut GstRTSPWatch,
1270 messages: *mut GstRTSPMessage,
1271 n_messages: c_uint,
1272 id: *mut c_uint,
1273 ) -> GstRTSPResult;
1274 pub fn gst_rtsp_watch_set_flushing(watch: *mut GstRTSPWatch, flushing: gboolean);
1275 pub fn gst_rtsp_watch_set_send_backlog(
1276 watch: *mut GstRTSPWatch,
1277 bytes: size_t,
1278 messages: c_uint,
1279 );
1280 pub fn gst_rtsp_watch_unref(watch: *mut GstRTSPWatch);
1281 pub fn gst_rtsp_watch_wait_backlog(
1282 watch: *mut GstRTSPWatch,
1283 timeout: *mut glib::GTimeVal,
1284 ) -> GstRTSPResult;
1285 #[cfg(feature = "v1_18")]
1286 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1287 pub fn gst_rtsp_watch_wait_backlog_usec(
1288 watch: *mut GstRTSPWatch,
1289 timeout: i64,
1290 ) -> GstRTSPResult;
1291 pub fn gst_rtsp_watch_write_data(
1292 watch: *mut GstRTSPWatch,
1293 data: *const u8,
1294 size: c_uint,
1295 id: *mut c_uint,
1296 ) -> GstRTSPResult;
1297 pub fn gst_rtsp_watch_new(
1298 conn: *mut GstRTSPConnection,
1299 funcs: *mut GstRTSPWatchFuncs,
1300 user_data: gpointer,
1301 notify: glib::GDestroyNotify,
1302 ) -> *mut GstRTSPWatch;
1303
1304 pub fn gst_rtsp_extension_get_type() -> GType;
1308 pub fn gst_rtsp_extension_after_send(
1309 ext: *mut GstRTSPExtension,
1310 req: *mut GstRTSPMessage,
1311 resp: *mut GstRTSPMessage,
1312 ) -> GstRTSPResult;
1313 pub fn gst_rtsp_extension_before_send(
1314 ext: *mut GstRTSPExtension,
1315 req: *mut GstRTSPMessage,
1316 ) -> GstRTSPResult;
1317 pub fn gst_rtsp_extension_configure_stream(
1318 ext: *mut GstRTSPExtension,
1319 caps: *mut gst::GstCaps,
1320 ) -> gboolean;
1321 pub fn gst_rtsp_extension_detect_server(
1322 ext: *mut GstRTSPExtension,
1323 resp: *mut GstRTSPMessage,
1324 ) -> gboolean;
1325 pub fn gst_rtsp_extension_get_transports(
1326 ext: *mut GstRTSPExtension,
1327 protocols: GstRTSPLowerTrans,
1328 transport: *mut *mut c_char,
1329 ) -> GstRTSPResult;
1330 pub fn gst_rtsp_extension_parse_sdp(
1331 ext: *mut GstRTSPExtension,
1332 sdp: *mut gst_sdp::GstSDPMessage,
1333 s: *mut gst::GstStructure,
1334 ) -> GstRTSPResult;
1335 pub fn gst_rtsp_extension_receive_request(
1336 ext: *mut GstRTSPExtension,
1337 req: *mut GstRTSPMessage,
1338 ) -> GstRTSPResult;
1339 pub fn gst_rtsp_extension_send(
1340 ext: *mut GstRTSPExtension,
1341 req: *mut GstRTSPMessage,
1342 resp: *mut GstRTSPMessage,
1343 ) -> GstRTSPResult;
1344 pub fn gst_rtsp_extension_setup_media(
1345 ext: *mut GstRTSPExtension,
1346 media: *mut gst_sdp::GstSDPMedia,
1347 ) -> GstRTSPResult;
1348 pub fn gst_rtsp_extension_stream_select(
1349 ext: *mut GstRTSPExtension,
1350 url: *mut GstRTSPUrl,
1351 ) -> GstRTSPResult;
1352
1353 pub fn gst_rtsp_auth_credentials_free(credentials: *mut *mut GstRTSPAuthCredential);
1357 pub fn gst_rtsp_find_header_field(header: *const c_char) -> GstRTSPHeaderField;
1358 pub fn gst_rtsp_find_method(method: *const c_char) -> GstRTSPMethod;
1359 pub fn gst_rtsp_generate_digest_auth_response(
1360 algorithm: *const c_char,
1361 method: *const c_char,
1362 realm: *const c_char,
1363 username: *const c_char,
1364 password: *const c_char,
1365 uri: *const c_char,
1366 nonce: *const c_char,
1367 ) -> *mut c_char;
1368 #[cfg(feature = "v1_16")]
1369 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
1370 pub fn gst_rtsp_generate_digest_auth_response_from_md5(
1371 algorithm: *const c_char,
1372 method: *const c_char,
1373 md5: *const c_char,
1374 uri: *const c_char,
1375 nonce: *const c_char,
1376 ) -> *mut c_char;
1377 pub fn gst_rtsp_header_allow_multiple(field: GstRTSPHeaderField) -> gboolean;
1378 pub fn gst_rtsp_header_as_text(field: GstRTSPHeaderField) -> *const c_char;
1379 pub fn gst_rtsp_message_new(msg: *mut *mut GstRTSPMessage) -> GstRTSPResult;
1380 pub fn gst_rtsp_message_new_data(msg: *mut *mut GstRTSPMessage, channel: u8) -> GstRTSPResult;
1381 pub fn gst_rtsp_message_new_request(
1382 msg: *mut *mut GstRTSPMessage,
1383 method: GstRTSPMethod,
1384 uri: *const c_char,
1385 ) -> GstRTSPResult;
1386 pub fn gst_rtsp_message_new_response(
1387 msg: *mut *mut GstRTSPMessage,
1388 code: GstRTSPStatusCode,
1389 reason: *const c_char,
1390 request: *const GstRTSPMessage,
1391 ) -> GstRTSPResult;
1392 pub fn gst_rtsp_options_as_text(options: GstRTSPMethod) -> *mut c_char;
1393 pub fn gst_rtsp_options_from_text(options: *const c_char) -> GstRTSPMethod;
1394 pub fn gst_rtsp_status_as_text(code: GstRTSPStatusCode) -> *const c_char;
1395 pub fn gst_rtsp_strresult(result: GstRTSPResult) -> *mut c_char;
1396
1397}