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