Skip to main content

gstreamer_rtsp_server/auto/
rtsp_media_factory.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::{
7    RTSPAddressPool, RTSPMedia, RTSPPublishClockMode, RTSPSuspendMode, RTSPTransportMode, ffi,
8};
9use glib::{
10    object::ObjectType as _,
11    prelude::*,
12    signal::{SignalHandlerId, connect_raw},
13    translate::*,
14};
15use std::boxed::Box as Box_;
16
17glib::wrapper! {
18    /// 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            unsafe {
973                let f: &F = &*(f as *const F);
974                f(
975                    RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref(),
976                    &from_glib_borrow(object),
977                )
978            }
979        }
980        unsafe {
981            let f: Box_<F> = Box_::new(f);
982            connect_raw(
983                self.as_ptr() as *mut _,
984                c"media-configure".as_ptr(),
985                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
986                    media_configure_trampoline::<Self, F> as *const (),
987                )),
988                Box_::into_raw(f),
989            )
990        }
991    }
992
993    #[doc(alias = "media-constructed")]
994    fn connect_media_constructed<F: Fn(&Self, &RTSPMedia) + Send + Sync + 'static>(
995        &self,
996        f: F,
997    ) -> SignalHandlerId {
998        unsafe extern "C" fn media_constructed_trampoline<
999            P: IsA<RTSPMediaFactory>,
1000            F: Fn(&P, &RTSPMedia) + Send + Sync + 'static,
1001        >(
1002            this: *mut ffi::GstRTSPMediaFactory,
1003            object: *mut ffi::GstRTSPMedia,
1004            f: glib::ffi::gpointer,
1005        ) {
1006            unsafe {
1007                let f: &F = &*(f as *const F);
1008                f(
1009                    RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref(),
1010                    &from_glib_borrow(object),
1011                )
1012            }
1013        }
1014        unsafe {
1015            let f: Box_<F> = Box_::new(f);
1016            connect_raw(
1017                self.as_ptr() as *mut _,
1018                c"media-constructed".as_ptr(),
1019                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1020                    media_constructed_trampoline::<Self, F> as *const (),
1021                )),
1022                Box_::into_raw(f),
1023            )
1024        }
1025    }
1026
1027    #[doc(alias = "bind-mcast-address")]
1028    fn connect_bind_mcast_address_notify<F: Fn(&Self) + Send + Sync + 'static>(
1029        &self,
1030        f: F,
1031    ) -> SignalHandlerId {
1032        unsafe extern "C" fn notify_bind_mcast_address_trampoline<
1033            P: IsA<RTSPMediaFactory>,
1034            F: Fn(&P) + Send + Sync + 'static,
1035        >(
1036            this: *mut ffi::GstRTSPMediaFactory,
1037            _param_spec: glib::ffi::gpointer,
1038            f: glib::ffi::gpointer,
1039        ) {
1040            unsafe {
1041                let f: &F = &*(f as *const F);
1042                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1043            }
1044        }
1045        unsafe {
1046            let f: Box_<F> = Box_::new(f);
1047            connect_raw(
1048                self.as_ptr() as *mut _,
1049                c"notify::bind-mcast-address".as_ptr(),
1050                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1051                    notify_bind_mcast_address_trampoline::<Self, F> as *const (),
1052                )),
1053                Box_::into_raw(f),
1054            )
1055        }
1056    }
1057
1058    #[doc(alias = "buffer-size")]
1059    fn connect_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(
1060        &self,
1061        f: F,
1062    ) -> SignalHandlerId {
1063        unsafe extern "C" fn notify_buffer_size_trampoline<
1064            P: IsA<RTSPMediaFactory>,
1065            F: Fn(&P) + Send + Sync + 'static,
1066        >(
1067            this: *mut ffi::GstRTSPMediaFactory,
1068            _param_spec: glib::ffi::gpointer,
1069            f: glib::ffi::gpointer,
1070        ) {
1071            unsafe {
1072                let f: &F = &*(f as *const F);
1073                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1074            }
1075        }
1076        unsafe {
1077            let f: Box_<F> = Box_::new(f);
1078            connect_raw(
1079                self.as_ptr() as *mut _,
1080                c"notify::buffer-size".as_ptr(),
1081                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1082                    notify_buffer_size_trampoline::<Self, F> as *const (),
1083                )),
1084                Box_::into_raw(f),
1085            )
1086        }
1087    }
1088
1089    #[doc(alias = "clock")]
1090    fn connect_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
1091        unsafe extern "C" fn notify_clock_trampoline<
1092            P: IsA<RTSPMediaFactory>,
1093            F: Fn(&P) + Send + Sync + 'static,
1094        >(
1095            this: *mut ffi::GstRTSPMediaFactory,
1096            _param_spec: glib::ffi::gpointer,
1097            f: glib::ffi::gpointer,
1098        ) {
1099            unsafe {
1100                let f: &F = &*(f as *const F);
1101                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1102            }
1103        }
1104        unsafe {
1105            let f: Box_<F> = Box_::new(f);
1106            connect_raw(
1107                self.as_ptr() as *mut _,
1108                c"notify::clock".as_ptr(),
1109                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1110                    notify_clock_trampoline::<Self, F> as *const (),
1111                )),
1112                Box_::into_raw(f),
1113            )
1114        }
1115    }
1116
1117    #[doc(alias = "dscp-qos")]
1118    fn connect_dscp_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
1119        &self,
1120        f: F,
1121    ) -> SignalHandlerId {
1122        unsafe extern "C" fn notify_dscp_qos_trampoline<
1123            P: IsA<RTSPMediaFactory>,
1124            F: Fn(&P) + Send + Sync + 'static,
1125        >(
1126            this: *mut ffi::GstRTSPMediaFactory,
1127            _param_spec: glib::ffi::gpointer,
1128            f: glib::ffi::gpointer,
1129        ) {
1130            unsafe {
1131                let f: &F = &*(f as *const F);
1132                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1133            }
1134        }
1135        unsafe {
1136            let f: Box_<F> = Box_::new(f);
1137            connect_raw(
1138                self.as_ptr() as *mut _,
1139                c"notify::dscp-qos".as_ptr(),
1140                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1141                    notify_dscp_qos_trampoline::<Self, F> as *const (),
1142                )),
1143                Box_::into_raw(f),
1144            )
1145        }
1146    }
1147
1148    #[cfg(feature = "v1_20")]
1149    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
1150    #[doc(alias = "enable-rtcp")]
1151    fn connect_enable_rtcp_notify<F: Fn(&Self) + Send + Sync + 'static>(
1152        &self,
1153        f: F,
1154    ) -> SignalHandlerId {
1155        unsafe extern "C" fn notify_enable_rtcp_trampoline<
1156            P: IsA<RTSPMediaFactory>,
1157            F: Fn(&P) + Send + Sync + 'static,
1158        >(
1159            this: *mut ffi::GstRTSPMediaFactory,
1160            _param_spec: glib::ffi::gpointer,
1161            f: glib::ffi::gpointer,
1162        ) {
1163            unsafe {
1164                let f: &F = &*(f as *const F);
1165                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1166            }
1167        }
1168        unsafe {
1169            let f: Box_<F> = Box_::new(f);
1170            connect_raw(
1171                self.as_ptr() as *mut _,
1172                c"notify::enable-rtcp".as_ptr(),
1173                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1174                    notify_enable_rtcp_trampoline::<Self, F> as *const (),
1175                )),
1176                Box_::into_raw(f),
1177            )
1178        }
1179    }
1180
1181    #[cfg(feature = "v1_24")]
1182    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
1183    #[doc(alias = "ensure-keyunit-on-start")]
1184    fn connect_ensure_keyunit_on_start_notify<F: Fn(&Self) + Send + Sync + 'static>(
1185        &self,
1186        f: F,
1187    ) -> SignalHandlerId {
1188        unsafe extern "C" fn notify_ensure_keyunit_on_start_trampoline<
1189            P: IsA<RTSPMediaFactory>,
1190            F: Fn(&P) + Send + Sync + 'static,
1191        >(
1192            this: *mut ffi::GstRTSPMediaFactory,
1193            _param_spec: glib::ffi::gpointer,
1194            f: glib::ffi::gpointer,
1195        ) {
1196            unsafe {
1197                let f: &F = &*(f as *const F);
1198                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1199            }
1200        }
1201        unsafe {
1202            let f: Box_<F> = Box_::new(f);
1203            connect_raw(
1204                self.as_ptr() as *mut _,
1205                c"notify::ensure-keyunit-on-start".as_ptr(),
1206                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1207                    notify_ensure_keyunit_on_start_trampoline::<Self, F> as *const (),
1208                )),
1209                Box_::into_raw(f),
1210            )
1211        }
1212    }
1213
1214    #[cfg(feature = "v1_24")]
1215    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
1216    #[doc(alias = "ensure-keyunit-on-start-timeout")]
1217    fn connect_ensure_keyunit_on_start_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
1218        &self,
1219        f: F,
1220    ) -> SignalHandlerId {
1221        unsafe extern "C" fn notify_ensure_keyunit_on_start_timeout_trampoline<
1222            P: IsA<RTSPMediaFactory>,
1223            F: Fn(&P) + Send + Sync + 'static,
1224        >(
1225            this: *mut ffi::GstRTSPMediaFactory,
1226            _param_spec: glib::ffi::gpointer,
1227            f: glib::ffi::gpointer,
1228        ) {
1229            unsafe {
1230                let f: &F = &*(f as *const F);
1231                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1232            }
1233        }
1234        unsafe {
1235            let f: Box_<F> = Box_::new(f);
1236            connect_raw(
1237                self.as_ptr() as *mut _,
1238                c"notify::ensure-keyunit-on-start-timeout".as_ptr(),
1239                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1240                    notify_ensure_keyunit_on_start_timeout_trampoline::<Self, F> as *const (),
1241                )),
1242                Box_::into_raw(f),
1243            )
1244        }
1245    }
1246
1247    #[doc(alias = "eos-shutdown")]
1248    fn connect_eos_shutdown_notify<F: Fn(&Self) + Send + Sync + 'static>(
1249        &self,
1250        f: F,
1251    ) -> SignalHandlerId {
1252        unsafe extern "C" fn notify_eos_shutdown_trampoline<
1253            P: IsA<RTSPMediaFactory>,
1254            F: Fn(&P) + Send + Sync + 'static,
1255        >(
1256            this: *mut ffi::GstRTSPMediaFactory,
1257            _param_spec: glib::ffi::gpointer,
1258            f: glib::ffi::gpointer,
1259        ) {
1260            unsafe {
1261                let f: &F = &*(f as *const F);
1262                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1263            }
1264        }
1265        unsafe {
1266            let f: Box_<F> = Box_::new(f);
1267            connect_raw(
1268                self.as_ptr() as *mut _,
1269                c"notify::eos-shutdown".as_ptr(),
1270                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1271                    notify_eos_shutdown_trampoline::<Self, F> as *const (),
1272                )),
1273                Box_::into_raw(f),
1274            )
1275        }
1276    }
1277
1278    #[doc(alias = "latency")]
1279    fn connect_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
1280        &self,
1281        f: F,
1282    ) -> SignalHandlerId {
1283        unsafe extern "C" fn notify_latency_trampoline<
1284            P: IsA<RTSPMediaFactory>,
1285            F: Fn(&P) + Send + Sync + 'static,
1286        >(
1287            this: *mut ffi::GstRTSPMediaFactory,
1288            _param_spec: glib::ffi::gpointer,
1289            f: glib::ffi::gpointer,
1290        ) {
1291            unsafe {
1292                let f: &F = &*(f as *const F);
1293                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1294            }
1295        }
1296        unsafe {
1297            let f: Box_<F> = Box_::new(f);
1298            connect_raw(
1299                self.as_ptr() as *mut _,
1300                c"notify::latency".as_ptr(),
1301                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1302                    notify_latency_trampoline::<Self, F> as *const (),
1303                )),
1304                Box_::into_raw(f),
1305            )
1306        }
1307    }
1308
1309    #[doc(alias = "launch")]
1310    fn connect_launch_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
1311        unsafe extern "C" fn notify_launch_trampoline<
1312            P: IsA<RTSPMediaFactory>,
1313            F: Fn(&P) + Send + Sync + 'static,
1314        >(
1315            this: *mut ffi::GstRTSPMediaFactory,
1316            _param_spec: glib::ffi::gpointer,
1317            f: glib::ffi::gpointer,
1318        ) {
1319            unsafe {
1320                let f: &F = &*(f as *const F);
1321                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1322            }
1323        }
1324        unsafe {
1325            let f: Box_<F> = Box_::new(f);
1326            connect_raw(
1327                self.as_ptr() as *mut _,
1328                c"notify::launch".as_ptr(),
1329                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1330                    notify_launch_trampoline::<Self, F> as *const (),
1331                )),
1332                Box_::into_raw(f),
1333            )
1334        }
1335    }
1336
1337    #[doc(alias = "max-mcast-ttl")]
1338    fn connect_max_mcast_ttl_notify<F: Fn(&Self) + Send + Sync + 'static>(
1339        &self,
1340        f: F,
1341    ) -> SignalHandlerId {
1342        unsafe extern "C" fn notify_max_mcast_ttl_trampoline<
1343            P: IsA<RTSPMediaFactory>,
1344            F: Fn(&P) + Send + Sync + 'static,
1345        >(
1346            this: *mut ffi::GstRTSPMediaFactory,
1347            _param_spec: glib::ffi::gpointer,
1348            f: glib::ffi::gpointer,
1349        ) {
1350            unsafe {
1351                let f: &F = &*(f as *const F);
1352                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1353            }
1354        }
1355        unsafe {
1356            let f: Box_<F> = Box_::new(f);
1357            connect_raw(
1358                self.as_ptr() as *mut _,
1359                c"notify::max-mcast-ttl".as_ptr(),
1360                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1361                    notify_max_mcast_ttl_trampoline::<Self, F> as *const (),
1362                )),
1363                Box_::into_raw(f),
1364            )
1365        }
1366    }
1367
1368    #[doc(alias = "profiles")]
1369    fn connect_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(
1370        &self,
1371        f: F,
1372    ) -> SignalHandlerId {
1373        unsafe extern "C" fn notify_profiles_trampoline<
1374            P: IsA<RTSPMediaFactory>,
1375            F: Fn(&P) + Send + Sync + 'static,
1376        >(
1377            this: *mut ffi::GstRTSPMediaFactory,
1378            _param_spec: glib::ffi::gpointer,
1379            f: glib::ffi::gpointer,
1380        ) {
1381            unsafe {
1382                let f: &F = &*(f as *const F);
1383                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1384            }
1385        }
1386        unsafe {
1387            let f: Box_<F> = Box_::new(f);
1388            connect_raw(
1389                self.as_ptr() as *mut _,
1390                c"notify::profiles".as_ptr(),
1391                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1392                    notify_profiles_trampoline::<Self, F> as *const (),
1393                )),
1394                Box_::into_raw(f),
1395            )
1396        }
1397    }
1398
1399    #[doc(alias = "protocols")]
1400    fn connect_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(
1401        &self,
1402        f: F,
1403    ) -> SignalHandlerId {
1404        unsafe extern "C" fn notify_protocols_trampoline<
1405            P: IsA<RTSPMediaFactory>,
1406            F: Fn(&P) + Send + Sync + 'static,
1407        >(
1408            this: *mut ffi::GstRTSPMediaFactory,
1409            _param_spec: glib::ffi::gpointer,
1410            f: glib::ffi::gpointer,
1411        ) {
1412            unsafe {
1413                let f: &F = &*(f as *const F);
1414                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1415            }
1416        }
1417        unsafe {
1418            let f: Box_<F> = Box_::new(f);
1419            connect_raw(
1420                self.as_ptr() as *mut _,
1421                c"notify::protocols".as_ptr(),
1422                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1423                    notify_protocols_trampoline::<Self, F> as *const (),
1424                )),
1425                Box_::into_raw(f),
1426            )
1427        }
1428    }
1429
1430    #[doc(alias = "shared")]
1431    fn connect_shared_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
1432        unsafe extern "C" fn notify_shared_trampoline<
1433            P: IsA<RTSPMediaFactory>,
1434            F: Fn(&P) + Send + Sync + 'static,
1435        >(
1436            this: *mut ffi::GstRTSPMediaFactory,
1437            _param_spec: glib::ffi::gpointer,
1438            f: glib::ffi::gpointer,
1439        ) {
1440            unsafe {
1441                let f: &F = &*(f as *const F);
1442                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1443            }
1444        }
1445        unsafe {
1446            let f: Box_<F> = Box_::new(f);
1447            connect_raw(
1448                self.as_ptr() as *mut _,
1449                c"notify::shared".as_ptr(),
1450                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1451                    notify_shared_trampoline::<Self, F> as *const (),
1452                )),
1453                Box_::into_raw(f),
1454            )
1455        }
1456    }
1457
1458    #[doc(alias = "stop-on-disconnect")]
1459    fn connect_stop_on_disconnect_notify<F: Fn(&Self) + Send + Sync + 'static>(
1460        &self,
1461        f: F,
1462    ) -> SignalHandlerId {
1463        unsafe extern "C" fn notify_stop_on_disconnect_trampoline<
1464            P: IsA<RTSPMediaFactory>,
1465            F: Fn(&P) + Send + Sync + 'static,
1466        >(
1467            this: *mut ffi::GstRTSPMediaFactory,
1468            _param_spec: glib::ffi::gpointer,
1469            f: glib::ffi::gpointer,
1470        ) {
1471            unsafe {
1472                let f: &F = &*(f as *const F);
1473                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1474            }
1475        }
1476        unsafe {
1477            let f: Box_<F> = Box_::new(f);
1478            connect_raw(
1479                self.as_ptr() as *mut _,
1480                c"notify::stop-on-disconnect".as_ptr(),
1481                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1482                    notify_stop_on_disconnect_trampoline::<Self, F> as *const (),
1483                )),
1484                Box_::into_raw(f),
1485            )
1486        }
1487    }
1488
1489    #[doc(alias = "suspend-mode")]
1490    fn connect_suspend_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(
1491        &self,
1492        f: F,
1493    ) -> SignalHandlerId {
1494        unsafe extern "C" fn notify_suspend_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            unsafe {
1503                let f: &F = &*(f as *const F);
1504                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1505            }
1506        }
1507        unsafe {
1508            let f: Box_<F> = Box_::new(f);
1509            connect_raw(
1510                self.as_ptr() as *mut _,
1511                c"notify::suspend-mode".as_ptr(),
1512                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1513                    notify_suspend_mode_trampoline::<Self, F> as *const (),
1514                )),
1515                Box_::into_raw(f),
1516            )
1517        }
1518    }
1519
1520    #[doc(alias = "transport-mode")]
1521    fn connect_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(
1522        &self,
1523        f: F,
1524    ) -> SignalHandlerId {
1525        unsafe extern "C" fn notify_transport_mode_trampoline<
1526            P: IsA<RTSPMediaFactory>,
1527            F: Fn(&P) + Send + Sync + 'static,
1528        >(
1529            this: *mut ffi::GstRTSPMediaFactory,
1530            _param_spec: glib::ffi::gpointer,
1531            f: glib::ffi::gpointer,
1532        ) {
1533            unsafe {
1534                let f: &F = &*(f as *const F);
1535                f(RTSPMediaFactory::from_glib_borrow(this).unsafe_cast_ref())
1536            }
1537        }
1538        unsafe {
1539            let f: Box_<F> = Box_::new(f);
1540            connect_raw(
1541                self.as_ptr() as *mut _,
1542                c"notify::transport-mode".as_ptr(),
1543                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1544                    notify_transport_mode_trampoline::<Self, F> as *const (),
1545                )),
1546                Box_::into_raw(f),
1547            )
1548        }
1549    }
1550}
1551
1552impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {}