Skip to main content

gstreamer_rtsp_server/auto/
rtsp_media_factory.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::{
7    RTSPAddressPool, RTSPMedia, RTSPPublishClockMode, RTSPSuspendMode, RTSPTransportMode, ffi,
8};
9use glib::{
10    object::ObjectType as _,
11    prelude::*,
12    signal::{SignalHandlerId, connect_raw},
13    translate::*,
14};
15use std::boxed::Box as Box_;
16
17glib::wrapper! {
18    #[doc(alias = "GstRTSPMediaFactory")]
19    pub struct RTSPMediaFactory(Object<ffi::GstRTSPMediaFactory, ffi::GstRTSPMediaFactoryClass>);
20
21    match fn {
22        type_ => || ffi::gst_rtsp_media_factory_get_type(),
23    }
24}
25
26impl RTSPMediaFactory {
27    pub const NONE: Option<&'static RTSPMediaFactory> = None;
28
29    #[doc(alias = "gst_rtsp_media_factory_new")]
30    pub fn new() -> RTSPMediaFactory {
31        assert_initialized_main_thread!();
32        unsafe { from_glib_full(ffi::gst_rtsp_media_factory_new()) }
33    }
34}
35
36impl Default for RTSPMediaFactory {
37    fn default() -> Self {
38        Self::new()
39    }
40}
41
42unsafe impl Send for RTSPMediaFactory {}
43unsafe impl Sync for RTSPMediaFactory {}
44
45pub trait RTSPMediaFactoryExt: IsA<RTSPMediaFactory> + 'static {
46    //#[doc(alias = "gst_rtsp_media_factory_add_role")]
47    //fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
48    //    unsafe { TODO: call ffi:gst_rtsp_media_factory_add_role() }
49    //}
50
51    #[doc(alias = "gst_rtsp_media_factory_construct")]
52    fn construct(&self, url: &gst_rtsp::RTSPUrl) -> Result<RTSPMedia, glib::BoolError> {
53        unsafe {
54            Option::<_>::from_glib_full(ffi::gst_rtsp_media_factory_construct(
55                self.as_ref().to_glib_none().0,
56                url.to_glib_none().0,
57            ))
58            .ok_or_else(|| glib::bool_error!("Failed to construct media"))
59        }
60    }
61
62    #[doc(alias = "gst_rtsp_media_factory_create_element")]
63    fn create_element(&self, url: &gst_rtsp::RTSPUrl) -> Result<gst::Element, glib::BoolError> {
64        unsafe {
65            Option::<_>::from_glib_none(ffi::gst_rtsp_media_factory_create_element(
66                self.as_ref().to_glib_none().0,
67                url.to_glib_none().0,
68            ))
69            .ok_or_else(|| glib::bool_error!("Failed to create media element"))
70        }
71    }
72
73    #[doc(alias = "gst_rtsp_media_factory_get_address_pool")]
74    #[doc(alias = "get_address_pool")]
75    fn address_pool(&self) -> Option<RTSPAddressPool> {
76        unsafe {
77            from_glib_full(ffi::gst_rtsp_media_factory_get_address_pool(
78                self.as_ref().to_glib_none().0,
79            ))
80        }
81    }
82
83    #[doc(alias = "gst_rtsp_media_factory_get_buffer_size")]
84    #[doc(alias = "get_buffer_size")]
85    #[doc(alias = "buffer-size")]
86    fn buffer_size(&self) -> u32 {
87        unsafe { ffi::gst_rtsp_media_factory_get_buffer_size(self.as_ref().to_glib_none().0) }
88    }
89
90    #[doc(alias = "gst_rtsp_media_factory_get_clock")]
91    #[doc(alias = "get_clock")]
92    fn clock(&self) -> Option<gst::Clock> {
93        unsafe {
94            from_glib_full(ffi::gst_rtsp_media_factory_get_clock(
95                self.as_ref().to_glib_none().0,
96            ))
97        }
98    }
99
100    #[cfg(feature = "v1_16")]
101    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
102    #[doc(alias = "gst_rtsp_media_factory_get_do_retransmission")]
103    #[doc(alias = "get_do_retransmission")]
104    fn does_retransmission(&self) -> bool {
105        unsafe {
106            from_glib(ffi::gst_rtsp_media_factory_get_do_retransmission(
107                self.as_ref().to_glib_none().0,
108            ))
109        }
110    }
111
112    #[cfg(feature = "v1_18")]
113    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
114    #[doc(alias = "gst_rtsp_media_factory_get_dscp_qos")]
115    #[doc(alias = "get_dscp_qos")]
116    #[doc(alias = "dscp-qos")]
117    fn dscp_qos(&self) -> i32 {
118        unsafe { ffi::gst_rtsp_media_factory_get_dscp_qos(self.as_ref().to_glib_none().0) }
119    }
120
121    #[cfg(feature = "v1_24")]
122    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
123    #[doc(alias = "gst_rtsp_media_factory_get_ensure_keyunit_on_start")]
124    #[doc(alias = "get_ensure_keyunit_on_start")]
125    #[doc(alias = "ensure-keyunit-on-start")]
126    fn is_ensure_keyunit_on_start(&self) -> bool {
127        unsafe {
128            from_glib(ffi::gst_rtsp_media_factory_get_ensure_keyunit_on_start(
129                self.as_ref().to_glib_none().0,
130            ))
131        }
132    }
133
134    #[cfg(feature = "v1_24")]
135    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
136    #[doc(alias = "gst_rtsp_media_factory_get_ensure_keyunit_on_start_timeout")]
137    #[doc(alias = "get_ensure_keyunit_on_start_timeout")]
138    #[doc(alias = "ensure-keyunit-on-start-timeout")]
139    fn ensure_keyunit_on_start_timeout(&self) -> u32 {
140        unsafe {
141            ffi::gst_rtsp_media_factory_get_ensure_keyunit_on_start_timeout(
142                self.as_ref().to_glib_none().0,
143            )
144        }
145    }
146
147    #[doc(alias = "gst_rtsp_media_factory_get_latency")]
148    #[doc(alias = "get_latency")]
149    fn latency(&self) -> u32 {
150        unsafe { ffi::gst_rtsp_media_factory_get_latency(self.as_ref().to_glib_none().0) }
151    }
152
153    #[doc(alias = "gst_rtsp_media_factory_get_launch")]
154    #[doc(alias = "get_launch")]
155    fn launch(&self) -> Option<glib::GString> {
156        unsafe {
157            from_glib_full(ffi::gst_rtsp_media_factory_get_launch(
158                self.as_ref().to_glib_none().0,
159            ))
160        }
161    }
162
163    #[cfg(feature = "v1_16")]
164    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
165    #[doc(alias = "gst_rtsp_media_factory_get_max_mcast_ttl")]
166    #[doc(alias = "get_max_mcast_ttl")]
167    #[doc(alias = "max-mcast-ttl")]
168    fn max_mcast_ttl(&self) -> u32 {
169        unsafe { ffi::gst_rtsp_media_factory_get_max_mcast_ttl(self.as_ref().to_glib_none().0) }
170    }
171
172    #[doc(alias = "gst_rtsp_media_factory_get_media_gtype")]
173    #[doc(alias = "get_media_gtype")]
174    fn media_gtype(&self) -> glib::types::Type {
175        unsafe {
176            from_glib(ffi::gst_rtsp_media_factory_get_media_gtype(
177                self.as_ref().to_glib_none().0,
178            ))
179        }
180    }
181
182    #[doc(alias = "gst_rtsp_media_factory_get_multicast_iface")]
183    #[doc(alias = "get_multicast_iface")]
184    fn multicast_iface(&self) -> Option<glib::GString> {
185        unsafe {
186            from_glib_full(ffi::gst_rtsp_media_factory_get_multicast_iface(
187                self.as_ref().to_glib_none().0,
188            ))
189        }
190    }
191
192    //#[doc(alias = "gst_rtsp_media_factory_get_permissions")]
193    //#[doc(alias = "get_permissions")]
194    //fn permissions(&self) -> /*Ignored*/Option<RTSPPermissions> {
195    //    unsafe { TODO: call ffi:gst_rtsp_media_factory_get_permissions() }
196    //}
197
198    #[doc(alias = "gst_rtsp_media_factory_get_profiles")]
199    #[doc(alias = "get_profiles")]
200    fn profiles(&self) -> gst_rtsp::RTSPProfile {
201        unsafe {
202            from_glib(ffi::gst_rtsp_media_factory_get_profiles(
203                self.as_ref().to_glib_none().0,
204            ))
205        }
206    }
207
208    #[doc(alias = "gst_rtsp_media_factory_get_protocols")]
209    #[doc(alias = "get_protocols")]
210    fn protocols(&self) -> gst_rtsp::RTSPLowerTrans {
211        unsafe {
212            from_glib(ffi::gst_rtsp_media_factory_get_protocols(
213                self.as_ref().to_glib_none().0,
214            ))
215        }
216    }
217
218    #[doc(alias = "gst_rtsp_media_factory_get_publish_clock_mode")]
219    #[doc(alias = "get_publish_clock_mode")]
220    fn publish_clock_mode(&self) -> RTSPPublishClockMode {
221        unsafe {
222            from_glib(ffi::gst_rtsp_media_factory_get_publish_clock_mode(
223                self.as_ref().to_glib_none().0,
224            ))
225        }
226    }
227
228    #[doc(alias = "gst_rtsp_media_factory_get_retransmission_time")]
229    #[doc(alias = "get_retransmission_time")]
230    fn retransmission_time(&self) -> Option<gst::ClockTime> {
231        unsafe {
232            from_glib(ffi::gst_rtsp_media_factory_get_retransmission_time(
233                self.as_ref().to_glib_none().0,
234            ))
235        }
236    }
237
238    #[doc(alias = "gst_rtsp_media_factory_get_suspend_mode")]
239    #[doc(alias = "get_suspend_mode")]
240    #[doc(alias = "suspend-mode")]
241    fn suspend_mode(&self) -> RTSPSuspendMode {
242        unsafe {
243            from_glib(ffi::gst_rtsp_media_factory_get_suspend_mode(
244                self.as_ref().to_glib_none().0,
245            ))
246        }
247    }
248
249    #[doc(alias = "gst_rtsp_media_factory_get_transport_mode")]
250    #[doc(alias = "get_transport_mode")]
251    #[doc(alias = "transport-mode")]
252    fn transport_mode(&self) -> RTSPTransportMode {
253        unsafe {
254            from_glib(ffi::gst_rtsp_media_factory_get_transport_mode(
255                self.as_ref().to_glib_none().0,
256            ))
257        }
258    }
259
260    #[cfg(feature = "v1_16")]
261    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
262    #[doc(alias = "gst_rtsp_media_factory_is_bind_mcast_address")]
263    #[doc(alias = "bind-mcast-address")]
264    fn is_bind_mcast_address(&self) -> bool {
265        unsafe {
266            from_glib(ffi::gst_rtsp_media_factory_is_bind_mcast_address(
267                self.as_ref().to_glib_none().0,
268            ))
269        }
270    }
271
272    #[cfg(feature = "v1_20")]
273    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
274    #[doc(alias = "gst_rtsp_media_factory_is_enable_rtcp")]
275    #[doc(alias = "enable-rtcp")]
276    fn is_enable_rtcp(&self) -> bool {
277        unsafe {
278            from_glib(ffi::gst_rtsp_media_factory_is_enable_rtcp(
279                self.as_ref().to_glib_none().0,
280            ))
281        }
282    }
283
284    #[doc(alias = "gst_rtsp_media_factory_is_eos_shutdown")]
285    #[doc(alias = "eos-shutdown")]
286    fn is_eos_shutdown(&self) -> bool {
287        unsafe {
288            from_glib(ffi::gst_rtsp_media_factory_is_eos_shutdown(
289                self.as_ref().to_glib_none().0,
290            ))
291        }
292    }
293
294    #[doc(alias = "gst_rtsp_media_factory_is_shared")]
295    #[doc(alias = "shared")]
296    fn is_shared(&self) -> bool {
297        unsafe {
298            from_glib(ffi::gst_rtsp_media_factory_is_shared(
299                self.as_ref().to_glib_none().0,
300            ))
301        }
302    }
303
304    #[doc(alias = "gst_rtsp_media_factory_is_stop_on_disonnect")]
305    fn is_stop_on_disonnect(&self) -> bool {
306        unsafe {
307            from_glib(ffi::gst_rtsp_media_factory_is_stop_on_disonnect(
308                self.as_ref().to_glib_none().0,
309            ))
310        }
311    }
312
313    #[doc(alias = "gst_rtsp_media_factory_set_address_pool")]
314    fn set_address_pool(&self, pool: Option<&impl IsA<RTSPAddressPool>>) {
315        unsafe {
316            ffi::gst_rtsp_media_factory_set_address_pool(
317                self.as_ref().to_glib_none().0,
318                pool.map(|p| p.as_ref()).to_glib_none().0,
319            );
320        }
321    }
322
323    #[cfg(feature = "v1_16")]
324    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
325    #[doc(alias = "gst_rtsp_media_factory_set_bind_mcast_address")]
326    #[doc(alias = "bind-mcast-address")]
327    fn set_bind_mcast_address(&self, bind_mcast_addr: bool) {
328        unsafe {
329            ffi::gst_rtsp_media_factory_set_bind_mcast_address(
330                self.as_ref().to_glib_none().0,
331                bind_mcast_addr.into_glib(),
332            );
333        }
334    }
335
336    #[doc(alias = "gst_rtsp_media_factory_set_buffer_size")]
337    #[doc(alias = "buffer-size")]
338    fn set_buffer_size(&self, size: u32) {
339        unsafe {
340            ffi::gst_rtsp_media_factory_set_buffer_size(self.as_ref().to_glib_none().0, size);
341        }
342    }
343
344    #[doc(alias = "gst_rtsp_media_factory_set_clock")]
345    #[doc(alias = "clock")]
346    fn set_clock(&self, clock: Option<&impl IsA<gst::Clock>>) {
347        unsafe {
348            ffi::gst_rtsp_media_factory_set_clock(
349                self.as_ref().to_glib_none().0,
350                clock.map(|p| p.as_ref()).to_glib_none().0,
351            );
352        }
353    }
354
355    #[cfg(feature = "v1_16")]
356    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
357    #[doc(alias = "gst_rtsp_media_factory_set_do_retransmission")]
358    fn set_do_retransmission(&self, do_retransmission: bool) {
359        unsafe {
360            ffi::gst_rtsp_media_factory_set_do_retransmission(
361                self.as_ref().to_glib_none().0,
362                do_retransmission.into_glib(),
363            );
364        }
365    }
366
367    #[cfg(feature = "v1_18")]
368    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
369    #[doc(alias = "gst_rtsp_media_factory_set_dscp_qos")]
370    #[doc(alias = "dscp-qos")]
371    fn set_dscp_qos(&self, dscp_qos: i32) {
372        unsafe {
373            ffi::gst_rtsp_media_factory_set_dscp_qos(self.as_ref().to_glib_none().0, dscp_qos);
374        }
375    }
376
377    #[cfg(feature = "v1_20")]
378    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
379    #[doc(alias = "gst_rtsp_media_factory_set_enable_rtcp")]
380    #[doc(alias = "enable-rtcp")]
381    fn set_enable_rtcp(&self, enable: bool) {
382        unsafe {
383            ffi::gst_rtsp_media_factory_set_enable_rtcp(
384                self.as_ref().to_glib_none().0,
385                enable.into_glib(),
386            );
387        }
388    }
389
390    #[cfg(feature = "v1_24")]
391    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
392    #[doc(alias = "gst_rtsp_media_factory_set_ensure_keyunit_on_start")]
393    #[doc(alias = "ensure-keyunit-on-start")]
394    fn set_ensure_keyunit_on_start(&self, ensure_keyunit_on_start: bool) {
395        unsafe {
396            ffi::gst_rtsp_media_factory_set_ensure_keyunit_on_start(
397                self.as_ref().to_glib_none().0,
398                ensure_keyunit_on_start.into_glib(),
399            );
400        }
401    }
402
403    #[cfg(feature = "v1_24")]
404    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
405    #[doc(alias = "gst_rtsp_media_factory_set_ensure_keyunit_on_start_timeout")]
406    #[doc(alias = "ensure-keyunit-on-start-timeout")]
407    fn set_ensure_keyunit_on_start_timeout(&self, timeout: u32) {
408        unsafe {
409            ffi::gst_rtsp_media_factory_set_ensure_keyunit_on_start_timeout(
410                self.as_ref().to_glib_none().0,
411                timeout,
412            );
413        }
414    }
415
416    #[doc(alias = "gst_rtsp_media_factory_set_eos_shutdown")]
417    #[doc(alias = "eos-shutdown")]
418    fn set_eos_shutdown(&self, eos_shutdown: bool) {
419        unsafe {
420            ffi::gst_rtsp_media_factory_set_eos_shutdown(
421                self.as_ref().to_glib_none().0,
422                eos_shutdown.into_glib(),
423            );
424        }
425    }
426
427    #[doc(alias = "gst_rtsp_media_factory_set_latency")]
428    #[doc(alias = "latency")]
429    fn set_latency(&self, latency: u32) {
430        unsafe {
431            ffi::gst_rtsp_media_factory_set_latency(self.as_ref().to_glib_none().0, latency);
432        }
433    }
434
435    #[doc(alias = "gst_rtsp_media_factory_set_launch")]
436    #[doc(alias = "launch")]
437    fn set_launch(&self, launch: &str) {
438        unsafe {
439            ffi::gst_rtsp_media_factory_set_launch(
440                self.as_ref().to_glib_none().0,
441                launch.to_glib_none().0,
442            );
443        }
444    }
445
446    #[cfg(feature = "v1_16")]
447    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
448    #[doc(alias = "gst_rtsp_media_factory_set_max_mcast_ttl")]
449    #[doc(alias = "max-mcast-ttl")]
450    fn set_max_mcast_ttl(&self, ttl: u32) -> bool {
451        unsafe {
452            from_glib(ffi::gst_rtsp_media_factory_set_max_mcast_ttl(
453                self.as_ref().to_glib_none().0,
454                ttl,
455            ))
456        }
457    }
458
459    #[doc(alias = "gst_rtsp_media_factory_set_media_gtype")]
460    fn set_media_gtype(&self, media_gtype: glib::types::Type) {
461        unsafe {
462            ffi::gst_rtsp_media_factory_set_media_gtype(
463                self.as_ref().to_glib_none().0,
464                media_gtype.into_glib(),
465            );
466        }
467    }
468
469    #[doc(alias = "gst_rtsp_media_factory_set_multicast_iface")]
470    fn set_multicast_iface(&self, multicast_iface: Option<&str>) {
471        unsafe {
472            ffi::gst_rtsp_media_factory_set_multicast_iface(
473                self.as_ref().to_glib_none().0,
474                multicast_iface.to_glib_none().0,
475            );
476        }
477    }
478
479    //#[doc(alias = "gst_rtsp_media_factory_set_permissions")]
480    //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) {
481    //    unsafe { TODO: call ffi:gst_rtsp_media_factory_set_permissions() }
482    //}
483
484    #[doc(alias = "gst_rtsp_media_factory_set_profiles")]
485    #[doc(alias = "profiles")]
486    fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) {
487        unsafe {
488            ffi::gst_rtsp_media_factory_set_profiles(
489                self.as_ref().to_glib_none().0,
490                profiles.into_glib(),
491            );
492        }
493    }
494
495    #[doc(alias = "gst_rtsp_media_factory_set_protocols")]
496    #[doc(alias = "protocols")]
497    fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) {
498        unsafe {
499            ffi::gst_rtsp_media_factory_set_protocols(
500                self.as_ref().to_glib_none().0,
501                protocols.into_glib(),
502            );
503        }
504    }
505
506    #[doc(alias = "gst_rtsp_media_factory_set_publish_clock_mode")]
507    fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) {
508        unsafe {
509            ffi::gst_rtsp_media_factory_set_publish_clock_mode(
510                self.as_ref().to_glib_none().0,
511                mode.into_glib(),
512            );
513        }
514    }
515
516    #[doc(alias = "gst_rtsp_media_factory_set_retransmission_time")]
517    fn set_retransmission_time(&self, time: impl Into<Option<gst::ClockTime>>) {
518        unsafe {
519            ffi::gst_rtsp_media_factory_set_retransmission_time(
520                self.as_ref().to_glib_none().0,
521                time.into().into_glib(),
522            );
523        }
524    }
525
526    #[doc(alias = "gst_rtsp_media_factory_set_shared")]
527    #[doc(alias = "shared")]
528    fn set_shared(&self, shared: bool) {
529        unsafe {
530            ffi::gst_rtsp_media_factory_set_shared(
531                self.as_ref().to_glib_none().0,
532                shared.into_glib(),
533            );
534        }
535    }
536
537    #[doc(alias = "gst_rtsp_media_factory_set_stop_on_disconnect")]
538    #[doc(alias = "stop-on-disconnect")]
539    fn set_stop_on_disconnect(&self, stop_on_disconnect: bool) {
540        unsafe {
541            ffi::gst_rtsp_media_factory_set_stop_on_disconnect(
542                self.as_ref().to_glib_none().0,
543                stop_on_disconnect.into_glib(),
544            );
545        }
546    }
547
548    #[doc(alias = "gst_rtsp_media_factory_set_suspend_mode")]
549    #[doc(alias = "suspend-mode")]
550    fn set_suspend_mode(&self, mode: RTSPSuspendMode) {
551        unsafe {
552            ffi::gst_rtsp_media_factory_set_suspend_mode(
553                self.as_ref().to_glib_none().0,
554                mode.into_glib(),
555            );
556        }
557    }
558
559    #[doc(alias = "gst_rtsp_media_factory_set_transport_mode")]
560    #[doc(alias = "transport-mode")]
561    fn set_transport_mode(&self, mode: RTSPTransportMode) {
562        unsafe {
563            ffi::gst_rtsp_media_factory_set_transport_mode(
564                self.as_ref().to_glib_none().0,
565                mode.into_glib(),
566            );
567        }
568    }
569
570    #[cfg(not(feature = "v1_16"))]
571    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_16"))))]
572    #[doc(alias = "bind-mcast-address")]
573    fn is_bind_mcast_address(&self) -> bool {
574        ObjectExt::property(self.as_ref(), "bind-mcast-address")
575    }
576
577    #[cfg(not(feature = "v1_16"))]
578    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_16"))))]
579    #[doc(alias = "bind-mcast-address")]
580    fn set_bind_mcast_address(&self, bind_mcast_address: bool) {
581        ObjectExt::set_property(self.as_ref(), "bind-mcast-address", bind_mcast_address)
582    }
583
584    #[cfg(not(feature = "v1_18"))]
585    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_18"))))]
586    #[doc(alias = "dscp-qos")]
587    fn dscp_qos(&self) -> i32 {
588        ObjectExt::property(self.as_ref(), "dscp-qos")
589    }
590
591    #[cfg(not(feature = "v1_18"))]
592    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_18"))))]
593    #[doc(alias = "dscp-qos")]
594    fn set_dscp_qos(&self, dscp_qos: i32) {
595        ObjectExt::set_property(self.as_ref(), "dscp-qos", dscp_qos)
596    }
597
598    #[cfg(not(feature = "v1_16"))]
599    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_16"))))]
600    #[doc(alias = "max-mcast-ttl")]
601    fn max_mcast_ttl(&self) -> u32 {
602        ObjectExt::property(self.as_ref(), "max-mcast-ttl")
603    }
604
605    #[cfg(not(feature = "v1_16"))]
606    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_16"))))]
607    #[doc(alias = "max-mcast-ttl")]
608    fn set_max_mcast_ttl(&self, max_mcast_ttl: u32) {
609        ObjectExt::set_property(self.as_ref(), "max-mcast-ttl", max_mcast_ttl)
610    }
611
612    #[doc(alias = "stop-on-disconnect")]
613    fn is_stop_on_disconnect(&self) -> bool {
614        ObjectExt::property(self.as_ref(), "stop-on-disconnect")
615    }
616
617    #[doc(alias = "media-configure")]
618    fn connect_media_configure<F: Fn(&Self, &RTSPMedia) + Send + Sync + 'static>(
619        &self,
620        f: F,
621    ) -> SignalHandlerId {
622        unsafe extern "C" fn media_configure_trampoline<
623            P: IsA<RTSPMediaFactory>,
624            F: Fn(&P, &RTSPMedia) + Send + Sync + 'static,
625        >(
626            this: *mut ffi::GstRTSPMediaFactory,
627            object: *mut ffi::GstRTSPMedia,
628            f: glib::ffi::gpointer,
629        ) {
630            unsafe {
631                let f: &F = &*(f as *const F);
632                f(
633                    RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref(),
634                    &from_glib_borrow(object),
635                )
636            }
637        }
638        unsafe {
639            let f: Box_<F> = Box_::new(f);
640            connect_raw(
641                self.as_ptr() as *mut _,
642                c"media-configure".as_ptr(),
643                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
644                    media_configure_trampoline::<Self, F> as *const (),
645                )),
646                Box_::into_raw(f),
647            )
648        }
649    }
650
651    #[doc(alias = "media-constructed")]
652    fn connect_media_constructed<F: Fn(&Self, &RTSPMedia) + Send + Sync + 'static>(
653        &self,
654        f: F,
655    ) -> SignalHandlerId {
656        unsafe extern "C" fn media_constructed_trampoline<
657            P: IsA<RTSPMediaFactory>,
658            F: Fn(&P, &RTSPMedia) + Send + Sync + 'static,
659        >(
660            this: *mut ffi::GstRTSPMediaFactory,
661            object: *mut ffi::GstRTSPMedia,
662            f: glib::ffi::gpointer,
663        ) {
664            unsafe {
665                let f: &F = &*(f as *const F);
666                f(
667                    RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref(),
668                    &from_glib_borrow(object),
669                )
670            }
671        }
672        unsafe {
673            let f: Box_<F> = Box_::new(f);
674            connect_raw(
675                self.as_ptr() as *mut _,
676                c"media-constructed".as_ptr(),
677                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
678                    media_constructed_trampoline::<Self, F> as *const (),
679                )),
680                Box_::into_raw(f),
681            )
682        }
683    }
684
685    #[doc(alias = "bind-mcast-address")]
686    fn connect_bind_mcast_address_notify<F: Fn(&Self) + Send + Sync + 'static>(
687        &self,
688        f: F,
689    ) -> SignalHandlerId {
690        unsafe extern "C" fn notify_bind_mcast_address_trampoline<
691            P: IsA<RTSPMediaFactory>,
692            F: Fn(&P) + Send + Sync + 'static,
693        >(
694            this: *mut ffi::GstRTSPMediaFactory,
695            _param_spec: glib::ffi::gpointer,
696            f: glib::ffi::gpointer,
697        ) {
698            unsafe {
699                let f: &F = &*(f as *const F);
700                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
701            }
702        }
703        unsafe {
704            let f: Box_<F> = Box_::new(f);
705            connect_raw(
706                self.as_ptr() as *mut _,
707                c"notify::bind-mcast-address".as_ptr(),
708                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
709                    notify_bind_mcast_address_trampoline::<Self, F> as *const (),
710                )),
711                Box_::into_raw(f),
712            )
713        }
714    }
715
716    #[doc(alias = "buffer-size")]
717    fn connect_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(
718        &self,
719        f: F,
720    ) -> SignalHandlerId {
721        unsafe extern "C" fn notify_buffer_size_trampoline<
722            P: IsA<RTSPMediaFactory>,
723            F: Fn(&P) + Send + Sync + 'static,
724        >(
725            this: *mut ffi::GstRTSPMediaFactory,
726            _param_spec: glib::ffi::gpointer,
727            f: glib::ffi::gpointer,
728        ) {
729            unsafe {
730                let f: &F = &*(f as *const F);
731                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
732            }
733        }
734        unsafe {
735            let f: Box_<F> = Box_::new(f);
736            connect_raw(
737                self.as_ptr() as *mut _,
738                c"notify::buffer-size".as_ptr(),
739                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
740                    notify_buffer_size_trampoline::<Self, F> as *const (),
741                )),
742                Box_::into_raw(f),
743            )
744        }
745    }
746
747    #[doc(alias = "clock")]
748    fn connect_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
749        unsafe extern "C" fn notify_clock_trampoline<
750            P: IsA<RTSPMediaFactory>,
751            F: Fn(&P) + Send + Sync + 'static,
752        >(
753            this: *mut ffi::GstRTSPMediaFactory,
754            _param_spec: glib::ffi::gpointer,
755            f: glib::ffi::gpointer,
756        ) {
757            unsafe {
758                let f: &F = &*(f as *const F);
759                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
760            }
761        }
762        unsafe {
763            let f: Box_<F> = Box_::new(f);
764            connect_raw(
765                self.as_ptr() as *mut _,
766                c"notify::clock".as_ptr(),
767                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
768                    notify_clock_trampoline::<Self, F> as *const (),
769                )),
770                Box_::into_raw(f),
771            )
772        }
773    }
774
775    #[doc(alias = "dscp-qos")]
776    fn connect_dscp_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
777        &self,
778        f: F,
779    ) -> SignalHandlerId {
780        unsafe extern "C" fn notify_dscp_qos_trampoline<
781            P: IsA<RTSPMediaFactory>,
782            F: Fn(&P) + Send + Sync + 'static,
783        >(
784            this: *mut ffi::GstRTSPMediaFactory,
785            _param_spec: glib::ffi::gpointer,
786            f: glib::ffi::gpointer,
787        ) {
788            unsafe {
789                let f: &F = &*(f as *const F);
790                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
791            }
792        }
793        unsafe {
794            let f: Box_<F> = Box_::new(f);
795            connect_raw(
796                self.as_ptr() as *mut _,
797                c"notify::dscp-qos".as_ptr(),
798                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
799                    notify_dscp_qos_trampoline::<Self, F> as *const (),
800                )),
801                Box_::into_raw(f),
802            )
803        }
804    }
805
806    #[cfg(feature = "v1_20")]
807    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
808    #[doc(alias = "enable-rtcp")]
809    fn connect_enable_rtcp_notify<F: Fn(&Self) + Send + Sync + 'static>(
810        &self,
811        f: F,
812    ) -> SignalHandlerId {
813        unsafe extern "C" fn notify_enable_rtcp_trampoline<
814            P: IsA<RTSPMediaFactory>,
815            F: Fn(&P) + Send + Sync + 'static,
816        >(
817            this: *mut ffi::GstRTSPMediaFactory,
818            _param_spec: glib::ffi::gpointer,
819            f: glib::ffi::gpointer,
820        ) {
821            unsafe {
822                let f: &F = &*(f as *const F);
823                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
824            }
825        }
826        unsafe {
827            let f: Box_<F> = Box_::new(f);
828            connect_raw(
829                self.as_ptr() as *mut _,
830                c"notify::enable-rtcp".as_ptr(),
831                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
832                    notify_enable_rtcp_trampoline::<Self, F> as *const (),
833                )),
834                Box_::into_raw(f),
835            )
836        }
837    }
838
839    #[cfg(feature = "v1_24")]
840    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
841    #[doc(alias = "ensure-keyunit-on-start")]
842    fn connect_ensure_keyunit_on_start_notify<F: Fn(&Self) + Send + Sync + 'static>(
843        &self,
844        f: F,
845    ) -> SignalHandlerId {
846        unsafe extern "C" fn notify_ensure_keyunit_on_start_trampoline<
847            P: IsA<RTSPMediaFactory>,
848            F: Fn(&P) + Send + Sync + 'static,
849        >(
850            this: *mut ffi::GstRTSPMediaFactory,
851            _param_spec: glib::ffi::gpointer,
852            f: glib::ffi::gpointer,
853        ) {
854            unsafe {
855                let f: &F = &*(f as *const F);
856                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
857            }
858        }
859        unsafe {
860            let f: Box_<F> = Box_::new(f);
861            connect_raw(
862                self.as_ptr() as *mut _,
863                c"notify::ensure-keyunit-on-start".as_ptr(),
864                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
865                    notify_ensure_keyunit_on_start_trampoline::<Self, F> as *const (),
866                )),
867                Box_::into_raw(f),
868            )
869        }
870    }
871
872    #[cfg(feature = "v1_24")]
873    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
874    #[doc(alias = "ensure-keyunit-on-start-timeout")]
875    fn connect_ensure_keyunit_on_start_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
876        &self,
877        f: F,
878    ) -> SignalHandlerId {
879        unsafe extern "C" fn notify_ensure_keyunit_on_start_timeout_trampoline<
880            P: IsA<RTSPMediaFactory>,
881            F: Fn(&P) + Send + Sync + 'static,
882        >(
883            this: *mut ffi::GstRTSPMediaFactory,
884            _param_spec: glib::ffi::gpointer,
885            f: glib::ffi::gpointer,
886        ) {
887            unsafe {
888                let f: &F = &*(f as *const F);
889                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
890            }
891        }
892        unsafe {
893            let f: Box_<F> = Box_::new(f);
894            connect_raw(
895                self.as_ptr() as *mut _,
896                c"notify::ensure-keyunit-on-start-timeout".as_ptr(),
897                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
898                    notify_ensure_keyunit_on_start_timeout_trampoline::<Self, F> as *const (),
899                )),
900                Box_::into_raw(f),
901            )
902        }
903    }
904
905    #[doc(alias = "eos-shutdown")]
906    fn connect_eos_shutdown_notify<F: Fn(&Self) + Send + Sync + 'static>(
907        &self,
908        f: F,
909    ) -> SignalHandlerId {
910        unsafe extern "C" fn notify_eos_shutdown_trampoline<
911            P: IsA<RTSPMediaFactory>,
912            F: Fn(&P) + Send + Sync + 'static,
913        >(
914            this: *mut ffi::GstRTSPMediaFactory,
915            _param_spec: glib::ffi::gpointer,
916            f: glib::ffi::gpointer,
917        ) {
918            unsafe {
919                let f: &F = &*(f as *const F);
920                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
921            }
922        }
923        unsafe {
924            let f: Box_<F> = Box_::new(f);
925            connect_raw(
926                self.as_ptr() as *mut _,
927                c"notify::eos-shutdown".as_ptr(),
928                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
929                    notify_eos_shutdown_trampoline::<Self, F> as *const (),
930                )),
931                Box_::into_raw(f),
932            )
933        }
934    }
935
936    #[doc(alias = "latency")]
937    fn connect_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
938        &self,
939        f: F,
940    ) -> SignalHandlerId {
941        unsafe extern "C" fn notify_latency_trampoline<
942            P: IsA<RTSPMediaFactory>,
943            F: Fn(&P) + Send + Sync + 'static,
944        >(
945            this: *mut ffi::GstRTSPMediaFactory,
946            _param_spec: glib::ffi::gpointer,
947            f: glib::ffi::gpointer,
948        ) {
949            unsafe {
950                let f: &F = &*(f as *const F);
951                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
952            }
953        }
954        unsafe {
955            let f: Box_<F> = Box_::new(f);
956            connect_raw(
957                self.as_ptr() as *mut _,
958                c"notify::latency".as_ptr(),
959                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
960                    notify_latency_trampoline::<Self, F> as *const (),
961                )),
962                Box_::into_raw(f),
963            )
964        }
965    }
966
967    #[doc(alias = "launch")]
968    fn connect_launch_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
969        unsafe extern "C" fn notify_launch_trampoline<
970            P: IsA<RTSPMediaFactory>,
971            F: Fn(&P) + Send + Sync + 'static,
972        >(
973            this: *mut ffi::GstRTSPMediaFactory,
974            _param_spec: glib::ffi::gpointer,
975            f: glib::ffi::gpointer,
976        ) {
977            unsafe {
978                let f: &F = &*(f as *const F);
979                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
980            }
981        }
982        unsafe {
983            let f: Box_<F> = Box_::new(f);
984            connect_raw(
985                self.as_ptr() as *mut _,
986                c"notify::launch".as_ptr(),
987                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
988                    notify_launch_trampoline::<Self, F> as *const (),
989                )),
990                Box_::into_raw(f),
991            )
992        }
993    }
994
995    #[doc(alias = "max-mcast-ttl")]
996    fn connect_max_mcast_ttl_notify<F: Fn(&Self) + Send + Sync + 'static>(
997        &self,
998        f: F,
999    ) -> SignalHandlerId {
1000        unsafe extern "C" fn notify_max_mcast_ttl_trampoline<
1001            P: IsA<RTSPMediaFactory>,
1002            F: Fn(&P) + Send + Sync + 'static,
1003        >(
1004            this: *mut ffi::GstRTSPMediaFactory,
1005            _param_spec: glib::ffi::gpointer,
1006            f: glib::ffi::gpointer,
1007        ) {
1008            unsafe {
1009                let f: &F = &*(f as *const F);
1010                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1011            }
1012        }
1013        unsafe {
1014            let f: Box_<F> = Box_::new(f);
1015            connect_raw(
1016                self.as_ptr() as *mut _,
1017                c"notify::max-mcast-ttl".as_ptr(),
1018                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1019                    notify_max_mcast_ttl_trampoline::<Self, F> as *const (),
1020                )),
1021                Box_::into_raw(f),
1022            )
1023        }
1024    }
1025
1026    #[doc(alias = "profiles")]
1027    fn connect_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(
1028        &self,
1029        f: F,
1030    ) -> SignalHandlerId {
1031        unsafe extern "C" fn notify_profiles_trampoline<
1032            P: IsA<RTSPMediaFactory>,
1033            F: Fn(&P) + Send + Sync + 'static,
1034        >(
1035            this: *mut ffi::GstRTSPMediaFactory,
1036            _param_spec: glib::ffi::gpointer,
1037            f: glib::ffi::gpointer,
1038        ) {
1039            unsafe {
1040                let f: &F = &*(f as *const F);
1041                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1042            }
1043        }
1044        unsafe {
1045            let f: Box_<F> = Box_::new(f);
1046            connect_raw(
1047                self.as_ptr() as *mut _,
1048                c"notify::profiles".as_ptr(),
1049                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1050                    notify_profiles_trampoline::<Self, F> as *const (),
1051                )),
1052                Box_::into_raw(f),
1053            )
1054        }
1055    }
1056
1057    #[doc(alias = "protocols")]
1058    fn connect_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(
1059        &self,
1060        f: F,
1061    ) -> SignalHandlerId {
1062        unsafe extern "C" fn notify_protocols_trampoline<
1063            P: IsA<RTSPMediaFactory>,
1064            F: Fn(&P) + Send + Sync + 'static,
1065        >(
1066            this: *mut ffi::GstRTSPMediaFactory,
1067            _param_spec: glib::ffi::gpointer,
1068            f: glib::ffi::gpointer,
1069        ) {
1070            unsafe {
1071                let f: &F = &*(f as *const F);
1072                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1073            }
1074        }
1075        unsafe {
1076            let f: Box_<F> = Box_::new(f);
1077            connect_raw(
1078                self.as_ptr() as *mut _,
1079                c"notify::protocols".as_ptr(),
1080                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1081                    notify_protocols_trampoline::<Self, F> as *const (),
1082                )),
1083                Box_::into_raw(f),
1084            )
1085        }
1086    }
1087
1088    #[doc(alias = "shared")]
1089    fn connect_shared_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
1090        unsafe extern "C" fn notify_shared_trampoline<
1091            P: IsA<RTSPMediaFactory>,
1092            F: Fn(&P) + Send + Sync + 'static,
1093        >(
1094            this: *mut ffi::GstRTSPMediaFactory,
1095            _param_spec: glib::ffi::gpointer,
1096            f: glib::ffi::gpointer,
1097        ) {
1098            unsafe {
1099                let f: &F = &*(f as *const F);
1100                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1101            }
1102        }
1103        unsafe {
1104            let f: Box_<F> = Box_::new(f);
1105            connect_raw(
1106                self.as_ptr() as *mut _,
1107                c"notify::shared".as_ptr(),
1108                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1109                    notify_shared_trampoline::<Self, F> as *const (),
1110                )),
1111                Box_::into_raw(f),
1112            )
1113        }
1114    }
1115
1116    #[doc(alias = "stop-on-disconnect")]
1117    fn connect_stop_on_disconnect_notify<F: Fn(&Self) + Send + Sync + 'static>(
1118        &self,
1119        f: F,
1120    ) -> SignalHandlerId {
1121        unsafe extern "C" fn notify_stop_on_disconnect_trampoline<
1122            P: IsA<RTSPMediaFactory>,
1123            F: Fn(&P) + Send + Sync + 'static,
1124        >(
1125            this: *mut ffi::GstRTSPMediaFactory,
1126            _param_spec: glib::ffi::gpointer,
1127            f: glib::ffi::gpointer,
1128        ) {
1129            unsafe {
1130                let f: &F = &*(f as *const F);
1131                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1132            }
1133        }
1134        unsafe {
1135            let f: Box_<F> = Box_::new(f);
1136            connect_raw(
1137                self.as_ptr() as *mut _,
1138                c"notify::stop-on-disconnect".as_ptr(),
1139                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1140                    notify_stop_on_disconnect_trampoline::<Self, F> as *const (),
1141                )),
1142                Box_::into_raw(f),
1143            )
1144        }
1145    }
1146
1147    #[doc(alias = "suspend-mode")]
1148    fn connect_suspend_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(
1149        &self,
1150        f: F,
1151    ) -> SignalHandlerId {
1152        unsafe extern "C" fn notify_suspend_mode_trampoline<
1153            P: IsA<RTSPMediaFactory>,
1154            F: Fn(&P) + Send + Sync + 'static,
1155        >(
1156            this: *mut ffi::GstRTSPMediaFactory,
1157            _param_spec: glib::ffi::gpointer,
1158            f: glib::ffi::gpointer,
1159        ) {
1160            unsafe {
1161                let f: &F = &*(f as *const F);
1162                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1163            }
1164        }
1165        unsafe {
1166            let f: Box_<F> = Box_::new(f);
1167            connect_raw(
1168                self.as_ptr() as *mut _,
1169                c"notify::suspend-mode".as_ptr(),
1170                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1171                    notify_suspend_mode_trampoline::<Self, F> as *const (),
1172                )),
1173                Box_::into_raw(f),
1174            )
1175        }
1176    }
1177
1178    #[doc(alias = "transport-mode")]
1179    fn connect_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(
1180        &self,
1181        f: F,
1182    ) -> SignalHandlerId {
1183        unsafe extern "C" fn notify_transport_mode_trampoline<
1184            P: IsA<RTSPMediaFactory>,
1185            F: Fn(&P) + Send + Sync + 'static,
1186        >(
1187            this: *mut ffi::GstRTSPMediaFactory,
1188            _param_spec: glib::ffi::gpointer,
1189            f: glib::ffi::gpointer,
1190        ) {
1191            unsafe {
1192                let f: &F = &*(f as *const F);
1193                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1194            }
1195        }
1196        unsafe {
1197            let f: Box_<F> = Box_::new(f);
1198            connect_raw(
1199                self.as_ptr() as *mut _,
1200                c"notify::transport-mode".as_ptr(),
1201                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1202                    notify_transport_mode_trampoline::<Self, F> as *const (),
1203                )),
1204                Box_::into_raw(f),
1205            )
1206        }
1207    }
1208}
1209
1210impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {}