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    ffi, RTSPAddressPool, RTSPMedia, RTSPPublishClockMode, RTSPSuspendMode, RTSPTransportMode,
8};
9use glib::{
10    object::ObjectType as _,
11    prelude::*,
12    signal::{connect_raw, SignalHandlerId},
13    translate::*,
14};
15use std::boxed::Box as Box_;
16
17glib::wrapper! {
18    /// The definition and logic for constructing the pipeline for a media. The media
19    /// can contain multiple streams like audio and video.
20    ///
21    /// ## Properties
22    ///
23    ///
24    /// #### `bind-mcast-address`
25    ///  Readable | Writeable
26    ///
27    ///
28    /// #### `buffer-size`
29    ///  Readable | Writeable
30    ///
31    ///
32    /// #### `clock`
33    ///  Readable | Writeable
34    ///
35    ///
36    /// #### `dscp-qos`
37    ///  Readable | Writeable
38    ///
39    ///
40    /// #### `enable-rtcp`
41    ///  Whether the created media should send and receive RTCP
42    ///
43    /// Readable | Writeable
44    ///
45    ///
46    /// #### `ensure-keyunit-on-start`
47    ///  If media from this factory should ensure a key unit when a client connects.
48    ///
49    /// This property will ensure that the stream always starts on a key unit
50    /// instead of a delta unit which the client would not be able to decode.
51    ///
52    /// Note that this will only affect non-shared medias for now.
53    ///
54    /// Readable | Writeable
55    ///
56    ///
57    /// #### `ensure-keyunit-on-start-timeout`
58    ///  Timeout in milliseconds used to determine if a keyunit should be discarded
59    /// when a client connects.
60    ///
61    /// If the timeout has been reached a new keyframe will be forced, otherwise
62    /// the currently blocking keyframe will be used.
63    ///
64    /// This options is only relevant when ensure-keyunit-on-start is enabled.
65    ///
66    /// Readable | Writeable
67    ///
68    ///
69    /// #### `eos-shutdown`
70    ///  Readable | Writeable
71    ///
72    ///
73    /// #### `latency`
74    ///  Readable | Writeable
75    ///
76    ///
77    /// #### `launch`
78    ///  Readable | Writeable
79    ///
80    ///
81    /// #### `max-mcast-ttl`
82    ///  Readable | Writeable
83    ///
84    ///
85    /// #### `profiles`
86    ///  Readable | Writeable
87    ///
88    ///
89    /// #### `protocols`
90    ///  Readable | Writeable
91    ///
92    ///
93    /// #### `shared`
94    ///  Readable | Writeable
95    ///
96    ///
97    /// #### `stop-on-disconnect`
98    ///  Readable | Writeable
99    ///
100    ///
101    /// #### `suspend-mode`
102    ///  Readable | Writeable
103    ///
104    ///
105    /// #### `transport-mode`
106    ///  Readable | Writeable
107    ///
108    /// ## Signals
109    ///
110    ///
111    /// #### `media-configure`
112    ///
113    ///
114    ///
115    /// #### `media-constructed`
116    ///
117    ///
118    /// # Implements
119    ///
120    /// [`RTSPMediaFactoryExt`][trait@crate::prelude::RTSPMediaFactoryExt], [`trait@glib::ObjectExt`], [`RTSPMediaFactoryExtManual`][trait@crate::prelude::RTSPMediaFactoryExtManual]
121    #[doc(alias = "GstRTSPMediaFactory")]
122    pub struct RTSPMediaFactory(Object<ffi::GstRTSPMediaFactory, ffi::GstRTSPMediaFactoryClass>);
123
124    match fn {
125        type_ => || ffi::gst_rtsp_media_factory_get_type(),
126    }
127}
128
129impl RTSPMediaFactory {
130    pub const NONE: Option<&'static RTSPMediaFactory> = None;
131
132    /// Create a new [`RTSPMediaFactory`][crate::RTSPMediaFactory] instance.
133    ///
134    /// # Returns
135    ///
136    /// a new [`RTSPMediaFactory`][crate::RTSPMediaFactory] object.
137    #[doc(alias = "gst_rtsp_media_factory_new")]
138    pub fn new() -> RTSPMediaFactory {
139        assert_initialized_main_thread!();
140        unsafe { from_glib_full(ffi::gst_rtsp_media_factory_new()) }
141    }
142}
143
144impl Default for RTSPMediaFactory {
145    fn default() -> Self {
146        Self::new()
147    }
148}
149
150unsafe impl Send for RTSPMediaFactory {}
151unsafe impl Sync for RTSPMediaFactory {}
152
153mod sealed {
154    pub trait Sealed {}
155    impl<T: super::IsA<super::RTSPMediaFactory>> Sealed for T {}
156}
157
158/// Trait containing all [`struct@RTSPMediaFactory`] methods.
159///
160/// # Implementors
161///
162/// [`RTSPMediaFactoryURI`][struct@crate::RTSPMediaFactoryURI], [`RTSPMediaFactory`][struct@crate::RTSPMediaFactory], [`RTSPOnvifMediaFactory`][struct@crate::RTSPOnvifMediaFactory]
163pub trait RTSPMediaFactoryExt: IsA<RTSPMediaFactory> + sealed::Sealed + 'static {
164    //#[doc(alias = "gst_rtsp_media_factory_add_role")]
165    //fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
166    //    unsafe { TODO: call ffi:gst_rtsp_media_factory_add_role() }
167    //}
168
169    /// Construct the media object and create its streams. Implementations
170    /// should create the needed gstreamer elements and add them to the result
171    /// object. No state changes should be performed on them yet.
172    ///
173    /// One or more GstRTSPStream objects should be created from the result
174    /// with gst_rtsp_media_create_stream ().
175    ///
176    /// After the media is constructed, it can be configured and then prepared
177    /// with gst_rtsp_media_prepare ().
178    ///
179    /// The returned media will be locked and must be unlocked afterwards.
180    /// ## `url`
181    /// the url used
182    ///
183    /// # Returns
184    ///
185    /// a new [`RTSPMedia`][crate::RTSPMedia] if the media could be prepared.
186    #[doc(alias = "gst_rtsp_media_factory_construct")]
187    fn construct(&self, url: &gst_rtsp::RTSPUrl) -> Result<RTSPMedia, glib::BoolError> {
188        unsafe {
189            Option::<_>::from_glib_full(ffi::gst_rtsp_media_factory_construct(
190                self.as_ref().to_glib_none().0,
191                url.to_glib_none().0,
192            ))
193            .ok_or_else(|| glib::bool_error!("Failed to construct media"))
194        }
195    }
196
197    /// Construct and return a [`gst::Element`][crate::gst::Element] that is a [`gst::Bin`][crate::gst::Bin] containing
198    /// the elements to use for streaming the media.
199    ///
200    /// The bin should contain payloaders pay\`d` for each stream. The default
201    /// implementation of this function returns the bin created from the
202    /// launch parameter.
203    /// ## `url`
204    /// the url used
205    ///
206    /// # Returns
207    ///
208    /// a new [`gst::Element`][crate::gst::Element].
209    #[doc(alias = "gst_rtsp_media_factory_create_element")]
210    fn create_element(&self, url: &gst_rtsp::RTSPUrl) -> Result<gst::Element, glib::BoolError> {
211        unsafe {
212            Option::<_>::from_glib_none(ffi::gst_rtsp_media_factory_create_element(
213                self.as_ref().to_glib_none().0,
214                url.to_glib_none().0,
215            ))
216            .ok_or_else(|| glib::bool_error!("Failed to create media element"))
217        }
218    }
219
220    /// Get the [`RTSPAddressPool`][crate::RTSPAddressPool] used as the address pool of `self`.
221    ///
222    /// # Returns
223    ///
224    /// the [`RTSPAddressPool`][crate::RTSPAddressPool] of `self`. `g_object_unref()` after
225    /// usage.
226    #[doc(alias = "gst_rtsp_media_factory_get_address_pool")]
227    #[doc(alias = "get_address_pool")]
228    fn address_pool(&self) -> Option<RTSPAddressPool> {
229        unsafe {
230            from_glib_full(ffi::gst_rtsp_media_factory_get_address_pool(
231                self.as_ref().to_glib_none().0,
232            ))
233        }
234    }
235
236    /// Get the kernel UDP buffer size.
237    ///
238    /// # Returns
239    ///
240    /// the kernel UDP buffer size.
241    #[doc(alias = "gst_rtsp_media_factory_get_buffer_size")]
242    #[doc(alias = "get_buffer_size")]
243    #[doc(alias = "buffer-size")]
244    fn buffer_size(&self) -> u32 {
245        unsafe { ffi::gst_rtsp_media_factory_get_buffer_size(self.as_ref().to_glib_none().0) }
246    }
247
248    /// Returns the clock that is going to be used by the pipelines
249    /// of all medias created from this factory.
250    ///
251    /// # Returns
252    ///
253    /// The GstClock
254    #[doc(alias = "gst_rtsp_media_factory_get_clock")]
255    #[doc(alias = "get_clock")]
256    fn clock(&self) -> Option<gst::Clock> {
257        unsafe {
258            from_glib_full(ffi::gst_rtsp_media_factory_get_clock(
259                self.as_ref().to_glib_none().0,
260            ))
261        }
262    }
263
264    ///
265    /// # Returns
266    ///
267    /// Whether retransmission requests will be sent for receiving media
268    #[cfg(feature = "v1_16")]
269    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
270    #[doc(alias = "gst_rtsp_media_factory_get_do_retransmission")]
271    #[doc(alias = "get_do_retransmission")]
272    fn does_retransmission(&self) -> bool {
273        unsafe {
274            from_glib(ffi::gst_rtsp_media_factory_get_do_retransmission(
275                self.as_ref().to_glib_none().0,
276            ))
277        }
278    }
279
280    /// Get the configured media DSCP QoS.
281    ///
282    /// # Returns
283    ///
284    /// the media DSCP QoS value or -1 if disabled.
285    #[cfg(feature = "v1_18")]
286    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
287    #[doc(alias = "gst_rtsp_media_factory_get_dscp_qos")]
288    #[doc(alias = "get_dscp_qos")]
289    #[doc(alias = "dscp-qos")]
290    fn dscp_qos(&self) -> i32 {
291        unsafe { ffi::gst_rtsp_media_factory_get_dscp_qos(self.as_ref().to_glib_none().0) }
292    }
293
294    /// Get ensure-keyunit-on-start flag.
295    ///
296    /// # Returns
297    ///
298    /// The ensure-keyunit-on-start flag.
299    #[cfg(feature = "v1_24")]
300    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
301    #[doc(alias = "gst_rtsp_media_factory_get_ensure_keyunit_on_start")]
302    #[doc(alias = "get_ensure_keyunit_on_start")]
303    #[doc(alias = "ensure-keyunit-on-start")]
304    fn is_ensure_keyunit_on_start(&self) -> bool {
305        unsafe {
306            from_glib(ffi::gst_rtsp_media_factory_get_ensure_keyunit_on_start(
307                self.as_ref().to_glib_none().0,
308            ))
309        }
310    }
311
312    /// Get ensure-keyunit-on-start-timeout time.
313    ///
314    /// # Returns
315    ///
316    /// The ensure-keyunit-on-start-timeout time.
317    #[cfg(feature = "v1_24")]
318    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
319    #[doc(alias = "gst_rtsp_media_factory_get_ensure_keyunit_on_start_timeout")]
320    #[doc(alias = "get_ensure_keyunit_on_start_timeout")]
321    #[doc(alias = "ensure-keyunit-on-start-timeout")]
322    fn ensure_keyunit_on_start_timeout(&self) -> u32 {
323        unsafe {
324            ffi::gst_rtsp_media_factory_get_ensure_keyunit_on_start_timeout(
325                self.as_ref().to_glib_none().0,
326            )
327        }
328    }
329
330    /// Get the latency that is used for receiving media
331    ///
332    /// # Returns
333    ///
334    /// latency in milliseconds
335    #[doc(alias = "gst_rtsp_media_factory_get_latency")]
336    #[doc(alias = "get_latency")]
337    fn latency(&self) -> u32 {
338        unsafe { ffi::gst_rtsp_media_factory_get_latency(self.as_ref().to_glib_none().0) }
339    }
340
341    /// Get the `gst_parse_launch()` pipeline description that will be used in the
342    /// default prepare vmethod.
343    ///
344    /// # Returns
345    ///
346    /// the configured launch description. `g_free()` after
347    /// usage.
348    #[doc(alias = "gst_rtsp_media_factory_get_launch")]
349    #[doc(alias = "get_launch")]
350    fn launch(&self) -> Option<glib::GString> {
351        unsafe {
352            from_glib_full(ffi::gst_rtsp_media_factory_get_launch(
353                self.as_ref().to_glib_none().0,
354            ))
355        }
356    }
357
358    /// Get the the maximum time-to-live value of outgoing multicast packets.
359    ///
360    /// # Returns
361    ///
362    /// the maximum time-to-live value of outgoing multicast packets.
363    #[cfg(feature = "v1_16")]
364    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
365    #[doc(alias = "gst_rtsp_media_factory_get_max_mcast_ttl")]
366    #[doc(alias = "get_max_mcast_ttl")]
367    #[doc(alias = "max-mcast-ttl")]
368    fn max_mcast_ttl(&self) -> u32 {
369        unsafe { ffi::gst_rtsp_media_factory_get_max_mcast_ttl(self.as_ref().to_glib_none().0) }
370    }
371
372    /// Return the GType of the GstRTSPMedia subclass this
373    /// factory will create.
374    #[doc(alias = "gst_rtsp_media_factory_get_media_gtype")]
375    #[doc(alias = "get_media_gtype")]
376    fn media_gtype(&self) -> glib::types::Type {
377        unsafe {
378            from_glib(ffi::gst_rtsp_media_factory_get_media_gtype(
379                self.as_ref().to_glib_none().0,
380            ))
381        }
382    }
383
384    /// Get the multicast interface used for `self`.
385    ///
386    /// # Returns
387    ///
388    /// the multicast interface for `self`. `g_free()` after
389    /// usage.
390    #[doc(alias = "gst_rtsp_media_factory_get_multicast_iface")]
391    #[doc(alias = "get_multicast_iface")]
392    fn multicast_iface(&self) -> Option<glib::GString> {
393        unsafe {
394            from_glib_full(ffi::gst_rtsp_media_factory_get_multicast_iface(
395                self.as_ref().to_glib_none().0,
396            ))
397        }
398    }
399
400    //#[doc(alias = "gst_rtsp_media_factory_get_permissions")]
401    //#[doc(alias = "get_permissions")]
402    //fn permissions(&self) -> /*Ignored*/Option<RTSPPermissions> {
403    //    unsafe { TODO: call ffi:gst_rtsp_media_factory_get_permissions() }
404    //}
405
406    /// Get the allowed profiles of `self`.
407    ///
408    /// # Returns
409    ///
410    /// a [`gst_rtsp::RTSPProfile`][crate::gst_rtsp::RTSPProfile]
411    #[doc(alias = "gst_rtsp_media_factory_get_profiles")]
412    #[doc(alias = "get_profiles")]
413    fn profiles(&self) -> gst_rtsp::RTSPProfile {
414        unsafe {
415            from_glib(ffi::gst_rtsp_media_factory_get_profiles(
416                self.as_ref().to_glib_none().0,
417            ))
418        }
419    }
420
421    /// Get the allowed protocols of `self`.
422    ///
423    /// # Returns
424    ///
425    /// a [`gst_rtsp::RTSPLowerTrans`][crate::gst_rtsp::RTSPLowerTrans]
426    #[doc(alias = "gst_rtsp_media_factory_get_protocols")]
427    #[doc(alias = "get_protocols")]
428    fn protocols(&self) -> gst_rtsp::RTSPLowerTrans {
429        unsafe {
430            from_glib(ffi::gst_rtsp_media_factory_get_protocols(
431                self.as_ref().to_glib_none().0,
432            ))
433        }
434    }
435
436    /// Gets if and how the media clock should be published according to RFC7273.
437    ///
438    /// # Returns
439    ///
440    /// The GstRTSPPublishClockMode
441    #[doc(alias = "gst_rtsp_media_factory_get_publish_clock_mode")]
442    #[doc(alias = "get_publish_clock_mode")]
443    fn publish_clock_mode(&self) -> RTSPPublishClockMode {
444        unsafe {
445            from_glib(ffi::gst_rtsp_media_factory_get_publish_clock_mode(
446                self.as_ref().to_glib_none().0,
447            ))
448        }
449    }
450
451    /// Get the time that is stored for retransmission purposes
452    ///
453    /// # Returns
454    ///
455    /// a `GstClockTime`
456    #[doc(alias = "gst_rtsp_media_factory_get_retransmission_time")]
457    #[doc(alias = "get_retransmission_time")]
458    fn retransmission_time(&self) -> Option<gst::ClockTime> {
459        unsafe {
460            from_glib(ffi::gst_rtsp_media_factory_get_retransmission_time(
461                self.as_ref().to_glib_none().0,
462            ))
463        }
464    }
465
466    /// Get how media created from this factory will be suspended.
467    ///
468    /// # Returns
469    ///
470    /// a [`RTSPSuspendMode`][crate::RTSPSuspendMode].
471    #[doc(alias = "gst_rtsp_media_factory_get_suspend_mode")]
472    #[doc(alias = "get_suspend_mode")]
473    #[doc(alias = "suspend-mode")]
474    fn suspend_mode(&self) -> RTSPSuspendMode {
475        unsafe {
476            from_glib(ffi::gst_rtsp_media_factory_get_suspend_mode(
477                self.as_ref().to_glib_none().0,
478            ))
479        }
480    }
481
482    /// Get if media created from this factory can be used for PLAY or RECORD
483    /// methods.
484    ///
485    /// # Returns
486    ///
487    /// The transport mode.
488    #[doc(alias = "gst_rtsp_media_factory_get_transport_mode")]
489    #[doc(alias = "get_transport_mode")]
490    #[doc(alias = "transport-mode")]
491    fn transport_mode(&self) -> RTSPTransportMode {
492        unsafe {
493            from_glib(ffi::gst_rtsp_media_factory_get_transport_mode(
494                self.as_ref().to_glib_none().0,
495            ))
496        }
497    }
498
499    /// Check if multicast sockets are configured to be bound to multicast addresses.
500    ///
501    /// # Returns
502    ///
503    /// [`true`] if multicast sockets are configured to be bound to multicast addresses.
504    #[cfg(feature = "v1_16")]
505    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
506    #[doc(alias = "gst_rtsp_media_factory_is_bind_mcast_address")]
507    #[doc(alias = "bind-mcast-address")]
508    fn is_bind_mcast_address(&self) -> bool {
509        unsafe {
510            from_glib(ffi::gst_rtsp_media_factory_is_bind_mcast_address(
511                self.as_ref().to_glib_none().0,
512            ))
513        }
514    }
515
516    /// Check if created media will send and receive RTCP
517    ///
518    /// # Returns
519    ///
520    /// [`true`] if created media will send and receive RTCP
521    #[cfg(feature = "v1_20")]
522    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
523    #[doc(alias = "gst_rtsp_media_factory_is_enable_rtcp")]
524    #[doc(alias = "enable-rtcp")]
525    fn is_enable_rtcp(&self) -> bool {
526        unsafe {
527            from_glib(ffi::gst_rtsp_media_factory_is_enable_rtcp(
528                self.as_ref().to_glib_none().0,
529            ))
530        }
531    }
532
533    /// Get if media created from this factory will have an EOS event sent to the
534    /// pipeline before shutdown.
535    ///
536    /// # Returns
537    ///
538    /// [`true`] if the media will receive EOS before shutdown.
539    #[doc(alias = "gst_rtsp_media_factory_is_eos_shutdown")]
540    #[doc(alias = "eos-shutdown")]
541    fn is_eos_shutdown(&self) -> bool {
542        unsafe {
543            from_glib(ffi::gst_rtsp_media_factory_is_eos_shutdown(
544                self.as_ref().to_glib_none().0,
545            ))
546        }
547    }
548
549    /// Get if media created from this factory can be shared between clients.
550    ///
551    /// # Returns
552    ///
553    /// [`true`] if the media will be shared between clients.
554    #[doc(alias = "gst_rtsp_media_factory_is_shared")]
555    #[doc(alias = "shared")]
556    fn is_shared(&self) -> bool {
557        unsafe {
558            from_glib(ffi::gst_rtsp_media_factory_is_shared(
559                self.as_ref().to_glib_none().0,
560            ))
561        }
562    }
563
564    #[doc(alias = "gst_rtsp_media_factory_is_stop_on_disonnect")]
565    fn is_stop_on_disonnect(&self) -> bool {
566        unsafe {
567            from_glib(ffi::gst_rtsp_media_factory_is_stop_on_disonnect(
568                self.as_ref().to_glib_none().0,
569            ))
570        }
571    }
572
573    /// configure `pool` to be used as the address pool of `self`.
574    /// ## `pool`
575    /// a [`RTSPAddressPool`][crate::RTSPAddressPool]
576    #[doc(alias = "gst_rtsp_media_factory_set_address_pool")]
577    fn set_address_pool(&self, pool: Option<&impl IsA<RTSPAddressPool>>) {
578        unsafe {
579            ffi::gst_rtsp_media_factory_set_address_pool(
580                self.as_ref().to_glib_none().0,
581                pool.map(|p| p.as_ref()).to_glib_none().0,
582            );
583        }
584    }
585
586    /// Decide whether the multicast socket should be bound to a multicast address or
587    /// INADDR_ANY.
588    /// ## `bind_mcast_addr`
589    /// the new value
590    #[cfg(feature = "v1_16")]
591    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
592    #[doc(alias = "gst_rtsp_media_factory_set_bind_mcast_address")]
593    #[doc(alias = "bind-mcast-address")]
594    fn set_bind_mcast_address(&self, bind_mcast_addr: bool) {
595        unsafe {
596            ffi::gst_rtsp_media_factory_set_bind_mcast_address(
597                self.as_ref().to_glib_none().0,
598                bind_mcast_addr.into_glib(),
599            );
600        }
601    }
602
603    /// Set the kernel UDP buffer size.
604    /// ## `size`
605    /// the new value
606    #[doc(alias = "gst_rtsp_media_factory_set_buffer_size")]
607    #[doc(alias = "buffer-size")]
608    fn set_buffer_size(&self, size: u32) {
609        unsafe {
610            ffi::gst_rtsp_media_factory_set_buffer_size(self.as_ref().to_glib_none().0, size);
611        }
612    }
613
614    /// Configures a specific clock to be used by the pipelines
615    /// of all medias created from this factory.
616    /// ## `clock`
617    /// the clock to be used by the media factory
618    #[doc(alias = "gst_rtsp_media_factory_set_clock")]
619    #[doc(alias = "clock")]
620    fn set_clock(&self, clock: Option<&impl IsA<gst::Clock>>) {
621        unsafe {
622            ffi::gst_rtsp_media_factory_set_clock(
623                self.as_ref().to_glib_none().0,
624                clock.map(|p| p.as_ref()).to_glib_none().0,
625            );
626        }
627    }
628
629    /// Set whether retransmission requests will be sent for
630    /// receiving media
631    #[cfg(feature = "v1_16")]
632    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
633    #[doc(alias = "gst_rtsp_media_factory_set_do_retransmission")]
634    fn set_do_retransmission(&self, do_retransmission: bool) {
635        unsafe {
636            ffi::gst_rtsp_media_factory_set_do_retransmission(
637                self.as_ref().to_glib_none().0,
638                do_retransmission.into_glib(),
639            );
640        }
641    }
642
643    /// Configure the media dscp qos to `dscp_qos`.
644    /// ## `dscp_qos`
645    /// a new dscp qos value (0-63, or -1 to disable)
646    #[cfg(feature = "v1_18")]
647    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
648    #[doc(alias = "gst_rtsp_media_factory_set_dscp_qos")]
649    #[doc(alias = "dscp-qos")]
650    fn set_dscp_qos(&self, dscp_qos: i32) {
651        unsafe {
652            ffi::gst_rtsp_media_factory_set_dscp_qos(self.as_ref().to_glib_none().0, dscp_qos);
653        }
654    }
655
656    /// Decide whether the created media should send and receive RTCP
657    /// ## `enable`
658    /// the new value
659    #[cfg(feature = "v1_20")]
660    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
661    #[doc(alias = "gst_rtsp_media_factory_set_enable_rtcp")]
662    #[doc(alias = "enable-rtcp")]
663    fn set_enable_rtcp(&self, enable: bool) {
664        unsafe {
665            ffi::gst_rtsp_media_factory_set_enable_rtcp(
666                self.as_ref().to_glib_none().0,
667                enable.into_glib(),
668            );
669        }
670    }
671
672    /// If media from this factory should ensure a key unit when a client connects.
673    /// ## `ensure_keyunit_on_start`
674    /// the new value
675    #[cfg(feature = "v1_24")]
676    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
677    #[doc(alias = "gst_rtsp_media_factory_set_ensure_keyunit_on_start")]
678    #[doc(alias = "ensure-keyunit-on-start")]
679    fn set_ensure_keyunit_on_start(&self, ensure_keyunit_on_start: bool) {
680        unsafe {
681            ffi::gst_rtsp_media_factory_set_ensure_keyunit_on_start(
682                self.as_ref().to_glib_none().0,
683                ensure_keyunit_on_start.into_glib(),
684            );
685        }
686    }
687
688    /// Configures medias from this factory to consider keyunits older than timeout
689    /// to be expired. Expired keyunits will be discarded.
690    /// ## `timeout`
691    /// the new value
692    #[cfg(feature = "v1_24")]
693    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
694    #[doc(alias = "gst_rtsp_media_factory_set_ensure_keyunit_on_start_timeout")]
695    #[doc(alias = "ensure-keyunit-on-start-timeout")]
696    fn set_ensure_keyunit_on_start_timeout(&self, timeout: u32) {
697        unsafe {
698            ffi::gst_rtsp_media_factory_set_ensure_keyunit_on_start_timeout(
699                self.as_ref().to_glib_none().0,
700                timeout,
701            );
702        }
703    }
704
705    /// Configure if media created from this factory will have an EOS sent to the
706    /// pipeline before shutdown.
707    /// ## `eos_shutdown`
708    /// the new value
709    #[doc(alias = "gst_rtsp_media_factory_set_eos_shutdown")]
710    #[doc(alias = "eos-shutdown")]
711    fn set_eos_shutdown(&self, eos_shutdown: bool) {
712        unsafe {
713            ffi::gst_rtsp_media_factory_set_eos_shutdown(
714                self.as_ref().to_glib_none().0,
715                eos_shutdown.into_glib(),
716            );
717        }
718    }
719
720    /// Configure the latency used for receiving media
721    /// ## `latency`
722    /// latency in milliseconds
723    #[doc(alias = "gst_rtsp_media_factory_set_latency")]
724    #[doc(alias = "latency")]
725    fn set_latency(&self, latency: u32) {
726        unsafe {
727            ffi::gst_rtsp_media_factory_set_latency(self.as_ref().to_glib_none().0, latency);
728        }
729    }
730
731    /// The `gst_parse_launch()` line to use for constructing the pipeline in the
732    /// default prepare vmethod.
733    ///
734    /// The pipeline description should return a GstBin as the toplevel element
735    /// which can be accomplished by enclosing the description with brackets '('
736    /// ')'.
737    ///
738    /// The description should return a pipeline with payloaders named pay0, pay1,
739    /// etc.. Each of the payloaders will result in a stream.
740    /// ## `launch`
741    /// the launch description
742    #[doc(alias = "gst_rtsp_media_factory_set_launch")]
743    #[doc(alias = "launch")]
744    fn set_launch(&self, launch: &str) {
745        unsafe {
746            ffi::gst_rtsp_media_factory_set_launch(
747                self.as_ref().to_glib_none().0,
748                launch.to_glib_none().0,
749            );
750        }
751    }
752
753    /// Set the maximum time-to-live value of outgoing multicast packets.
754    /// ## `ttl`
755    /// the new multicast ttl value
756    ///
757    /// # Returns
758    ///
759    /// [`true`] if the requested ttl has been set successfully.
760    #[cfg(feature = "v1_16")]
761    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
762    #[doc(alias = "gst_rtsp_media_factory_set_max_mcast_ttl")]
763    #[doc(alias = "max-mcast-ttl")]
764    fn set_max_mcast_ttl(&self, ttl: u32) -> bool {
765        unsafe {
766            from_glib(ffi::gst_rtsp_media_factory_set_max_mcast_ttl(
767                self.as_ref().to_glib_none().0,
768                ttl,
769            ))
770        }
771    }
772
773    /// Configure the GType of the GstRTSPMedia subclass to
774    /// create (by default, overridden construct vmethods
775    /// may of course do something different)
776    /// ## `media_gtype`
777    /// the GType of the class to create
778    #[doc(alias = "gst_rtsp_media_factory_set_media_gtype")]
779    fn set_media_gtype(&self, media_gtype: glib::types::Type) {
780        unsafe {
781            ffi::gst_rtsp_media_factory_set_media_gtype(
782                self.as_ref().to_glib_none().0,
783                media_gtype.into_glib(),
784            );
785        }
786    }
787
788    /// configure `multicast_iface` to be used for `self`.
789    /// ## `multicast_iface`
790    /// a multicast interface name
791    #[doc(alias = "gst_rtsp_media_factory_set_multicast_iface")]
792    fn set_multicast_iface(&self, multicast_iface: Option<&str>) {
793        unsafe {
794            ffi::gst_rtsp_media_factory_set_multicast_iface(
795                self.as_ref().to_glib_none().0,
796                multicast_iface.to_glib_none().0,
797            );
798        }
799    }
800
801    //#[doc(alias = "gst_rtsp_media_factory_set_permissions")]
802    //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) {
803    //    unsafe { TODO: call ffi:gst_rtsp_media_factory_set_permissions() }
804    //}
805
806    /// Configure the allowed profiles for `self`.
807    /// ## `profiles`
808    /// the new flags
809    #[doc(alias = "gst_rtsp_media_factory_set_profiles")]
810    #[doc(alias = "profiles")]
811    fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) {
812        unsafe {
813            ffi::gst_rtsp_media_factory_set_profiles(
814                self.as_ref().to_glib_none().0,
815                profiles.into_glib(),
816            );
817        }
818    }
819
820    /// Configure the allowed lower transport for `self`.
821    /// ## `protocols`
822    /// the new flags
823    #[doc(alias = "gst_rtsp_media_factory_set_protocols")]
824    #[doc(alias = "protocols")]
825    fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) {
826        unsafe {
827            ffi::gst_rtsp_media_factory_set_protocols(
828                self.as_ref().to_glib_none().0,
829                protocols.into_glib(),
830            );
831        }
832    }
833
834    /// Sets if and how the media clock should be published according to RFC7273.
835    /// ## `mode`
836    /// the clock publish mode
837    #[doc(alias = "gst_rtsp_media_factory_set_publish_clock_mode")]
838    fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) {
839        unsafe {
840            ffi::gst_rtsp_media_factory_set_publish_clock_mode(
841                self.as_ref().to_glib_none().0,
842                mode.into_glib(),
843            );
844        }
845    }
846
847    /// Configure the time to store for possible retransmission
848    /// ## `time`
849    /// a `GstClockTime`
850    #[doc(alias = "gst_rtsp_media_factory_set_retransmission_time")]
851    fn set_retransmission_time(&self, time: impl Into<Option<gst::ClockTime>>) {
852        unsafe {
853            ffi::gst_rtsp_media_factory_set_retransmission_time(
854                self.as_ref().to_glib_none().0,
855                time.into().into_glib(),
856            );
857        }
858    }
859
860    /// Configure if media created from this factory can be shared between clients.
861    /// ## `shared`
862    /// the new value
863    #[doc(alias = "gst_rtsp_media_factory_set_shared")]
864    #[doc(alias = "shared")]
865    fn set_shared(&self, shared: bool) {
866        unsafe {
867            ffi::gst_rtsp_media_factory_set_shared(
868                self.as_ref().to_glib_none().0,
869                shared.into_glib(),
870            );
871        }
872    }
873
874    /// Configure if media created from this factory should be stopped
875    /// when a client disconnects without sending TEARDOWN.
876    /// ## `stop_on_disconnect`
877    /// the new value
878    #[doc(alias = "gst_rtsp_media_factory_set_stop_on_disconnect")]
879    #[doc(alias = "stop-on-disconnect")]
880    fn set_stop_on_disconnect(&self, stop_on_disconnect: bool) {
881        unsafe {
882            ffi::gst_rtsp_media_factory_set_stop_on_disconnect(
883                self.as_ref().to_glib_none().0,
884                stop_on_disconnect.into_glib(),
885            );
886        }
887    }
888
889    /// Configure how media created from this factory will be suspended.
890    /// ## `mode`
891    /// the new [`RTSPSuspendMode`][crate::RTSPSuspendMode]
892    #[doc(alias = "gst_rtsp_media_factory_set_suspend_mode")]
893    #[doc(alias = "suspend-mode")]
894    fn set_suspend_mode(&self, mode: RTSPSuspendMode) {
895        unsafe {
896            ffi::gst_rtsp_media_factory_set_suspend_mode(
897                self.as_ref().to_glib_none().0,
898                mode.into_glib(),
899            );
900        }
901    }
902
903    /// Configure if this factory creates media for PLAY or RECORD modes.
904    /// ## `mode`
905    /// the new value
906    #[doc(alias = "gst_rtsp_media_factory_set_transport_mode")]
907    #[doc(alias = "transport-mode")]
908    fn set_transport_mode(&self, mode: RTSPTransportMode) {
909        unsafe {
910            ffi::gst_rtsp_media_factory_set_transport_mode(
911                self.as_ref().to_glib_none().0,
912                mode.into_glib(),
913            );
914        }
915    }
916
917    #[cfg(not(feature = "v1_16"))]
918    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_16"))))]
919    #[doc(alias = "bind-mcast-address")]
920    fn is_bind_mcast_address(&self) -> bool {
921        ObjectExt::property(self.as_ref(), "bind-mcast-address")
922    }
923
924    #[cfg(not(feature = "v1_16"))]
925    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_16"))))]
926    #[doc(alias = "bind-mcast-address")]
927    fn set_bind_mcast_address(&self, bind_mcast_address: bool) {
928        ObjectExt::set_property(self.as_ref(), "bind-mcast-address", bind_mcast_address)
929    }
930
931    #[cfg(not(feature = "v1_18"))]
932    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_18"))))]
933    #[doc(alias = "dscp-qos")]
934    fn dscp_qos(&self) -> i32 {
935        ObjectExt::property(self.as_ref(), "dscp-qos")
936    }
937
938    #[cfg(not(feature = "v1_18"))]
939    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_18"))))]
940    #[doc(alias = "dscp-qos")]
941    fn set_dscp_qos(&self, dscp_qos: i32) {
942        ObjectExt::set_property(self.as_ref(), "dscp-qos", dscp_qos)
943    }
944
945    #[cfg(not(feature = "v1_16"))]
946    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_16"))))]
947    #[doc(alias = "max-mcast-ttl")]
948    fn max_mcast_ttl(&self) -> u32 {
949        ObjectExt::property(self.as_ref(), "max-mcast-ttl")
950    }
951
952    #[cfg(not(feature = "v1_16"))]
953    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_16"))))]
954    #[doc(alias = "max-mcast-ttl")]
955    fn set_max_mcast_ttl(&self, max_mcast_ttl: u32) {
956        ObjectExt::set_property(self.as_ref(), "max-mcast-ttl", max_mcast_ttl)
957    }
958
959    #[doc(alias = "stop-on-disconnect")]
960    fn is_stop_on_disconnect(&self) -> bool {
961        ObjectExt::property(self.as_ref(), "stop-on-disconnect")
962    }
963
964    #[doc(alias = "media-configure")]
965    fn connect_media_configure<F: Fn(&Self, &RTSPMedia) + Send + Sync + 'static>(
966        &self,
967        f: F,
968    ) -> SignalHandlerId {
969        unsafe extern "C" fn media_configure_trampoline<
970            P: IsA<RTSPMediaFactory>,
971            F: Fn(&P, &RTSPMedia) + Send + Sync + 'static,
972        >(
973            this: *mut ffi::GstRTSPMediaFactory,
974            object: *mut ffi::GstRTSPMedia,
975            f: glib::ffi::gpointer,
976        ) {
977            let f: &F = &*(f as *const F);
978            f(
979                RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref(),
980                &from_glib_borrow(object),
981            )
982        }
983        unsafe {
984            let f: Box_<F> = Box_::new(f);
985            connect_raw(
986                self.as_ptr() as *mut _,
987                b"media-configure\0".as_ptr() as *const _,
988                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
989                    media_configure_trampoline::<Self, F> as *const (),
990                )),
991                Box_::into_raw(f),
992            )
993        }
994    }
995
996    #[doc(alias = "media-constructed")]
997    fn connect_media_constructed<F: Fn(&Self, &RTSPMedia) + Send + Sync + 'static>(
998        &self,
999        f: F,
1000    ) -> SignalHandlerId {
1001        unsafe extern "C" fn media_constructed_trampoline<
1002            P: IsA<RTSPMediaFactory>,
1003            F: Fn(&P, &RTSPMedia) + Send + Sync + 'static,
1004        >(
1005            this: *mut ffi::GstRTSPMediaFactory,
1006            object: *mut ffi::GstRTSPMedia,
1007            f: glib::ffi::gpointer,
1008        ) {
1009            let f: &F = &*(f as *const F);
1010            f(
1011                RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref(),
1012                &from_glib_borrow(object),
1013            )
1014        }
1015        unsafe {
1016            let f: Box_<F> = Box_::new(f);
1017            connect_raw(
1018                self.as_ptr() as *mut _,
1019                b"media-constructed\0".as_ptr() as *const _,
1020                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1021                    media_constructed_trampoline::<Self, F> as *const (),
1022                )),
1023                Box_::into_raw(f),
1024            )
1025        }
1026    }
1027
1028    #[doc(alias = "bind-mcast-address")]
1029    fn connect_bind_mcast_address_notify<F: Fn(&Self) + Send + Sync + 'static>(
1030        &self,
1031        f: F,
1032    ) -> SignalHandlerId {
1033        unsafe extern "C" fn notify_bind_mcast_address_trampoline<
1034            P: IsA<RTSPMediaFactory>,
1035            F: Fn(&P) + Send + Sync + 'static,
1036        >(
1037            this: *mut ffi::GstRTSPMediaFactory,
1038            _param_spec: glib::ffi::gpointer,
1039            f: glib::ffi::gpointer,
1040        ) {
1041            let f: &F = &*(f as *const F);
1042            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1043        }
1044        unsafe {
1045            let f: Box_<F> = Box_::new(f);
1046            connect_raw(
1047                self.as_ptr() as *mut _,
1048                b"notify::bind-mcast-address\0".as_ptr() as *const _,
1049                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1050                    notify_bind_mcast_address_trampoline::<Self, F> as *const (),
1051                )),
1052                Box_::into_raw(f),
1053            )
1054        }
1055    }
1056
1057    #[doc(alias = "buffer-size")]
1058    fn connect_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(
1059        &self,
1060        f: F,
1061    ) -> SignalHandlerId {
1062        unsafe extern "C" fn notify_buffer_size_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            let f: &F = &*(f as *const F);
1071            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1072        }
1073        unsafe {
1074            let f: Box_<F> = Box_::new(f);
1075            connect_raw(
1076                self.as_ptr() as *mut _,
1077                b"notify::buffer-size\0".as_ptr() as *const _,
1078                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1079                    notify_buffer_size_trampoline::<Self, F> as *const (),
1080                )),
1081                Box_::into_raw(f),
1082            )
1083        }
1084    }
1085
1086    #[doc(alias = "clock")]
1087    fn connect_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
1088        unsafe extern "C" fn notify_clock_trampoline<
1089            P: IsA<RTSPMediaFactory>,
1090            F: Fn(&P) + Send + Sync + 'static,
1091        >(
1092            this: *mut ffi::GstRTSPMediaFactory,
1093            _param_spec: glib::ffi::gpointer,
1094            f: glib::ffi::gpointer,
1095        ) {
1096            let f: &F = &*(f as *const F);
1097            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1098        }
1099        unsafe {
1100            let f: Box_<F> = Box_::new(f);
1101            connect_raw(
1102                self.as_ptr() as *mut _,
1103                b"notify::clock\0".as_ptr() as *const _,
1104                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1105                    notify_clock_trampoline::<Self, F> as *const (),
1106                )),
1107                Box_::into_raw(f),
1108            )
1109        }
1110    }
1111
1112    #[doc(alias = "dscp-qos")]
1113    fn connect_dscp_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
1114        &self,
1115        f: F,
1116    ) -> SignalHandlerId {
1117        unsafe extern "C" fn notify_dscp_qos_trampoline<
1118            P: IsA<RTSPMediaFactory>,
1119            F: Fn(&P) + Send + Sync + 'static,
1120        >(
1121            this: *mut ffi::GstRTSPMediaFactory,
1122            _param_spec: glib::ffi::gpointer,
1123            f: glib::ffi::gpointer,
1124        ) {
1125            let f: &F = &*(f as *const F);
1126            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1127        }
1128        unsafe {
1129            let f: Box_<F> = Box_::new(f);
1130            connect_raw(
1131                self.as_ptr() as *mut _,
1132                b"notify::dscp-qos\0".as_ptr() as *const _,
1133                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1134                    notify_dscp_qos_trampoline::<Self, F> as *const (),
1135                )),
1136                Box_::into_raw(f),
1137            )
1138        }
1139    }
1140
1141    #[cfg(feature = "v1_20")]
1142    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
1143    #[doc(alias = "enable-rtcp")]
1144    fn connect_enable_rtcp_notify<F: Fn(&Self) + Send + Sync + 'static>(
1145        &self,
1146        f: F,
1147    ) -> SignalHandlerId {
1148        unsafe extern "C" fn notify_enable_rtcp_trampoline<
1149            P: IsA<RTSPMediaFactory>,
1150            F: Fn(&P) + Send + Sync + 'static,
1151        >(
1152            this: *mut ffi::GstRTSPMediaFactory,
1153            _param_spec: glib::ffi::gpointer,
1154            f: glib::ffi::gpointer,
1155        ) {
1156            let f: &F = &*(f as *const F);
1157            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1158        }
1159        unsafe {
1160            let f: Box_<F> = Box_::new(f);
1161            connect_raw(
1162                self.as_ptr() as *mut _,
1163                b"notify::enable-rtcp\0".as_ptr() as *const _,
1164                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1165                    notify_enable_rtcp_trampoline::<Self, F> as *const (),
1166                )),
1167                Box_::into_raw(f),
1168            )
1169        }
1170    }
1171
1172    #[cfg(feature = "v1_24")]
1173    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
1174    #[doc(alias = "ensure-keyunit-on-start")]
1175    fn connect_ensure_keyunit_on_start_notify<F: Fn(&Self) + Send + Sync + 'static>(
1176        &self,
1177        f: F,
1178    ) -> SignalHandlerId {
1179        unsafe extern "C" fn notify_ensure_keyunit_on_start_trampoline<
1180            P: IsA<RTSPMediaFactory>,
1181            F: Fn(&P) + Send + Sync + 'static,
1182        >(
1183            this: *mut ffi::GstRTSPMediaFactory,
1184            _param_spec: glib::ffi::gpointer,
1185            f: glib::ffi::gpointer,
1186        ) {
1187            let f: &F = &*(f as *const F);
1188            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1189        }
1190        unsafe {
1191            let f: Box_<F> = Box_::new(f);
1192            connect_raw(
1193                self.as_ptr() as *mut _,
1194                b"notify::ensure-keyunit-on-start\0".as_ptr() as *const _,
1195                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1196                    notify_ensure_keyunit_on_start_trampoline::<Self, F> as *const (),
1197                )),
1198                Box_::into_raw(f),
1199            )
1200        }
1201    }
1202
1203    #[cfg(feature = "v1_24")]
1204    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
1205    #[doc(alias = "ensure-keyunit-on-start-timeout")]
1206    fn connect_ensure_keyunit_on_start_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
1207        &self,
1208        f: F,
1209    ) -> SignalHandlerId {
1210        unsafe extern "C" fn notify_ensure_keyunit_on_start_timeout_trampoline<
1211            P: IsA<RTSPMediaFactory>,
1212            F: Fn(&P) + Send + Sync + 'static,
1213        >(
1214            this: *mut ffi::GstRTSPMediaFactory,
1215            _param_spec: glib::ffi::gpointer,
1216            f: glib::ffi::gpointer,
1217        ) {
1218            let f: &F = &*(f as *const F);
1219            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1220        }
1221        unsafe {
1222            let f: Box_<F> = Box_::new(f);
1223            connect_raw(
1224                self.as_ptr() as *mut _,
1225                b"notify::ensure-keyunit-on-start-timeout\0".as_ptr() as *const _,
1226                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1227                    notify_ensure_keyunit_on_start_timeout_trampoline::<Self, F> as *const (),
1228                )),
1229                Box_::into_raw(f),
1230            )
1231        }
1232    }
1233
1234    #[doc(alias = "eos-shutdown")]
1235    fn connect_eos_shutdown_notify<F: Fn(&Self) + Send + Sync + 'static>(
1236        &self,
1237        f: F,
1238    ) -> SignalHandlerId {
1239        unsafe extern "C" fn notify_eos_shutdown_trampoline<
1240            P: IsA<RTSPMediaFactory>,
1241            F: Fn(&P) + Send + Sync + 'static,
1242        >(
1243            this: *mut ffi::GstRTSPMediaFactory,
1244            _param_spec: glib::ffi::gpointer,
1245            f: glib::ffi::gpointer,
1246        ) {
1247            let f: &F = &*(f as *const F);
1248            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1249        }
1250        unsafe {
1251            let f: Box_<F> = Box_::new(f);
1252            connect_raw(
1253                self.as_ptr() as *mut _,
1254                b"notify::eos-shutdown\0".as_ptr() as *const _,
1255                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1256                    notify_eos_shutdown_trampoline::<Self, F> as *const (),
1257                )),
1258                Box_::into_raw(f),
1259            )
1260        }
1261    }
1262
1263    #[doc(alias = "latency")]
1264    fn connect_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
1265        &self,
1266        f: F,
1267    ) -> SignalHandlerId {
1268        unsafe extern "C" fn notify_latency_trampoline<
1269            P: IsA<RTSPMediaFactory>,
1270            F: Fn(&P) + Send + Sync + 'static,
1271        >(
1272            this: *mut ffi::GstRTSPMediaFactory,
1273            _param_spec: glib::ffi::gpointer,
1274            f: glib::ffi::gpointer,
1275        ) {
1276            let f: &F = &*(f as *const F);
1277            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1278        }
1279        unsafe {
1280            let f: Box_<F> = Box_::new(f);
1281            connect_raw(
1282                self.as_ptr() as *mut _,
1283                b"notify::latency\0".as_ptr() as *const _,
1284                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1285                    notify_latency_trampoline::<Self, F> as *const (),
1286                )),
1287                Box_::into_raw(f),
1288            )
1289        }
1290    }
1291
1292    #[doc(alias = "launch")]
1293    fn connect_launch_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
1294        unsafe extern "C" fn notify_launch_trampoline<
1295            P: IsA<RTSPMediaFactory>,
1296            F: Fn(&P) + Send + Sync + 'static,
1297        >(
1298            this: *mut ffi::GstRTSPMediaFactory,
1299            _param_spec: glib::ffi::gpointer,
1300            f: glib::ffi::gpointer,
1301        ) {
1302            let f: &F = &*(f as *const F);
1303            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1304        }
1305        unsafe {
1306            let f: Box_<F> = Box_::new(f);
1307            connect_raw(
1308                self.as_ptr() as *mut _,
1309                b"notify::launch\0".as_ptr() as *const _,
1310                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1311                    notify_launch_trampoline::<Self, F> as *const (),
1312                )),
1313                Box_::into_raw(f),
1314            )
1315        }
1316    }
1317
1318    #[doc(alias = "max-mcast-ttl")]
1319    fn connect_max_mcast_ttl_notify<F: Fn(&Self) + Send + Sync + 'static>(
1320        &self,
1321        f: F,
1322    ) -> SignalHandlerId {
1323        unsafe extern "C" fn notify_max_mcast_ttl_trampoline<
1324            P: IsA<RTSPMediaFactory>,
1325            F: Fn(&P) + Send + Sync + 'static,
1326        >(
1327            this: *mut ffi::GstRTSPMediaFactory,
1328            _param_spec: glib::ffi::gpointer,
1329            f: glib::ffi::gpointer,
1330        ) {
1331            let f: &F = &*(f as *const F);
1332            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1333        }
1334        unsafe {
1335            let f: Box_<F> = Box_::new(f);
1336            connect_raw(
1337                self.as_ptr() as *mut _,
1338                b"notify::max-mcast-ttl\0".as_ptr() as *const _,
1339                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1340                    notify_max_mcast_ttl_trampoline::<Self, F> as *const (),
1341                )),
1342                Box_::into_raw(f),
1343            )
1344        }
1345    }
1346
1347    #[doc(alias = "profiles")]
1348    fn connect_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(
1349        &self,
1350        f: F,
1351    ) -> SignalHandlerId {
1352        unsafe extern "C" fn notify_profiles_trampoline<
1353            P: IsA<RTSPMediaFactory>,
1354            F: Fn(&P) + Send + Sync + 'static,
1355        >(
1356            this: *mut ffi::GstRTSPMediaFactory,
1357            _param_spec: glib::ffi::gpointer,
1358            f: glib::ffi::gpointer,
1359        ) {
1360            let f: &F = &*(f as *const F);
1361            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1362        }
1363        unsafe {
1364            let f: Box_<F> = Box_::new(f);
1365            connect_raw(
1366                self.as_ptr() as *mut _,
1367                b"notify::profiles\0".as_ptr() as *const _,
1368                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1369                    notify_profiles_trampoline::<Self, F> as *const (),
1370                )),
1371                Box_::into_raw(f),
1372            )
1373        }
1374    }
1375
1376    #[doc(alias = "protocols")]
1377    fn connect_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(
1378        &self,
1379        f: F,
1380    ) -> SignalHandlerId {
1381        unsafe extern "C" fn notify_protocols_trampoline<
1382            P: IsA<RTSPMediaFactory>,
1383            F: Fn(&P) + Send + Sync + 'static,
1384        >(
1385            this: *mut ffi::GstRTSPMediaFactory,
1386            _param_spec: glib::ffi::gpointer,
1387            f: glib::ffi::gpointer,
1388        ) {
1389            let f: &F = &*(f as *const F);
1390            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1391        }
1392        unsafe {
1393            let f: Box_<F> = Box_::new(f);
1394            connect_raw(
1395                self.as_ptr() as *mut _,
1396                b"notify::protocols\0".as_ptr() as *const _,
1397                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1398                    notify_protocols_trampoline::<Self, F> as *const (),
1399                )),
1400                Box_::into_raw(f),
1401            )
1402        }
1403    }
1404
1405    #[doc(alias = "shared")]
1406    fn connect_shared_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
1407        unsafe extern "C" fn notify_shared_trampoline<
1408            P: IsA<RTSPMediaFactory>,
1409            F: Fn(&P) + Send + Sync + 'static,
1410        >(
1411            this: *mut ffi::GstRTSPMediaFactory,
1412            _param_spec: glib::ffi::gpointer,
1413            f: glib::ffi::gpointer,
1414        ) {
1415            let f: &F = &*(f as *const F);
1416            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1417        }
1418        unsafe {
1419            let f: Box_<F> = Box_::new(f);
1420            connect_raw(
1421                self.as_ptr() as *mut _,
1422                b"notify::shared\0".as_ptr() as *const _,
1423                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1424                    notify_shared_trampoline::<Self, F> as *const (),
1425                )),
1426                Box_::into_raw(f),
1427            )
1428        }
1429    }
1430
1431    #[doc(alias = "stop-on-disconnect")]
1432    fn connect_stop_on_disconnect_notify<F: Fn(&Self) + Send + Sync + 'static>(
1433        &self,
1434        f: F,
1435    ) -> SignalHandlerId {
1436        unsafe extern "C" fn notify_stop_on_disconnect_trampoline<
1437            P: IsA<RTSPMediaFactory>,
1438            F: Fn(&P) + Send + Sync + 'static,
1439        >(
1440            this: *mut ffi::GstRTSPMediaFactory,
1441            _param_spec: glib::ffi::gpointer,
1442            f: glib::ffi::gpointer,
1443        ) {
1444            let f: &F = &*(f as *const F);
1445            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1446        }
1447        unsafe {
1448            let f: Box_<F> = Box_::new(f);
1449            connect_raw(
1450                self.as_ptr() as *mut _,
1451                b"notify::stop-on-disconnect\0".as_ptr() as *const _,
1452                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1453                    notify_stop_on_disconnect_trampoline::<Self, F> as *const (),
1454                )),
1455                Box_::into_raw(f),
1456            )
1457        }
1458    }
1459
1460    #[doc(alias = "suspend-mode")]
1461    fn connect_suspend_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(
1462        &self,
1463        f: F,
1464    ) -> SignalHandlerId {
1465        unsafe extern "C" fn notify_suspend_mode_trampoline<
1466            P: IsA<RTSPMediaFactory>,
1467            F: Fn(&P) + Send + Sync + 'static,
1468        >(
1469            this: *mut ffi::GstRTSPMediaFactory,
1470            _param_spec: glib::ffi::gpointer,
1471            f: glib::ffi::gpointer,
1472        ) {
1473            let f: &F = &*(f as *const F);
1474            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1475        }
1476        unsafe {
1477            let f: Box_<F> = Box_::new(f);
1478            connect_raw(
1479                self.as_ptr() as *mut _,
1480                b"notify::suspend-mode\0".as_ptr() as *const _,
1481                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1482                    notify_suspend_mode_trampoline::<Self, F> as *const (),
1483                )),
1484                Box_::into_raw(f),
1485            )
1486        }
1487    }
1488
1489    #[doc(alias = "transport-mode")]
1490    fn connect_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(
1491        &self,
1492        f: F,
1493    ) -> SignalHandlerId {
1494        unsafe extern "C" fn notify_transport_mode_trampoline<
1495            P: IsA<RTSPMediaFactory>,
1496            F: Fn(&P) + Send + Sync + 'static,
1497        >(
1498            this: *mut ffi::GstRTSPMediaFactory,
1499            _param_spec: glib::ffi::gpointer,
1500            f: glib::ffi::gpointer,
1501        ) {
1502            let f: &F = &*(f as *const F);
1503            f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1504        }
1505        unsafe {
1506            let f: Box_<F> = Box_::new(f);
1507            connect_raw(
1508                self.as_ptr() as *mut _,
1509                b"notify::transport-mode\0".as_ptr() as *const _,
1510                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1511                    notify_transport_mode_trampoline::<Self, F> as *const (),
1512                )),
1513                Box_::into_raw(f),
1514            )
1515        }
1516    }
1517}
1518
1519impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {}