Skip to main content

gstreamer_rtsp_server/auto/
rtsp_media.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, RTSPMediaStatus, RTSPPublishClockMode, RTSPStream, RTSPStreamTransport,
8    RTSPSuspendMode, RTSPThread, RTSPTransportMode, ffi,
9};
10use glib::{
11    object::ObjectType as _,
12    prelude::*,
13    signal::{SignalHandlerId, connect_raw},
14    translate::*,
15};
16use std::boxed::Box as Box_;
17
18glib::wrapper! {
19    #[doc(alias = "GstRTSPMedia")]
20    pub struct RTSPMedia(Object<ffi::GstRTSPMedia, ffi::GstRTSPMediaClass>);
21
22    match fn {
23        type_ => || ffi::gst_rtsp_media_get_type(),
24    }
25}
26
27impl RTSPMedia {
28    pub const NONE: Option<&'static RTSPMedia> = None;
29
30    #[doc(alias = "gst_rtsp_media_new")]
31    pub fn new(element: impl IsA<gst::Element>) -> RTSPMedia {
32        assert_initialized_main_thread!();
33        unsafe { from_glib_full(ffi::gst_rtsp_media_new(element.upcast().into_glib_ptr())) }
34    }
35}
36
37unsafe impl Send for RTSPMedia {}
38unsafe impl Sync for RTSPMedia {}
39
40pub trait RTSPMediaExt: IsA<RTSPMedia> + 'static {
41    #[cfg(feature = "v1_24")]
42    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
43    #[doc(alias = "gst_rtsp_media_can_be_shared")]
44    fn can_be_shared(&self) -> bool {
45        unsafe {
46            from_glib(ffi::gst_rtsp_media_can_be_shared(
47                self.as_ref().to_glib_none().0,
48            ))
49        }
50    }
51
52    #[doc(alias = "gst_rtsp_media_collect_streams")]
53    fn collect_streams(&self) {
54        unsafe {
55            ffi::gst_rtsp_media_collect_streams(self.as_ref().to_glib_none().0);
56        }
57    }
58
59    //#[doc(alias = "gst_rtsp_media_complete_pipeline")]
60    //fn complete_pipeline(&self, transports: /*Ignored*/&[gst_rtsp::RTSPTransport]) -> bool {
61    //    unsafe { TODO: call ffi:gst_rtsp_media_complete_pipeline() }
62    //}
63
64    #[doc(alias = "gst_rtsp_media_create_stream")]
65    fn create_stream(
66        &self,
67        payloader: &impl IsA<gst::Element>,
68        pad: &impl IsA<gst::Pad>,
69    ) -> RTSPStream {
70        unsafe {
71            from_glib_none(ffi::gst_rtsp_media_create_stream(
72                self.as_ref().to_glib_none().0,
73                payloader.as_ref().to_glib_none().0,
74                pad.as_ref().to_glib_none().0,
75            ))
76        }
77    }
78
79    #[doc(alias = "gst_rtsp_media_find_stream")]
80    fn find_stream(&self, control: &str) -> Option<RTSPStream> {
81        unsafe {
82            from_glib_none(ffi::gst_rtsp_media_find_stream(
83                self.as_ref().to_glib_none().0,
84                control.to_glib_none().0,
85            ))
86        }
87    }
88
89    #[doc(alias = "gst_rtsp_media_get_address_pool")]
90    #[doc(alias = "get_address_pool")]
91    fn address_pool(&self) -> Option<RTSPAddressPool> {
92        unsafe {
93            from_glib_full(ffi::gst_rtsp_media_get_address_pool(
94                self.as_ref().to_glib_none().0,
95            ))
96        }
97    }
98
99    #[doc(alias = "gst_rtsp_media_get_base_time")]
100    #[doc(alias = "get_base_time")]
101    fn base_time(&self) -> Option<gst::ClockTime> {
102        unsafe {
103            from_glib(ffi::gst_rtsp_media_get_base_time(
104                self.as_ref().to_glib_none().0,
105            ))
106        }
107    }
108
109    #[doc(alias = "gst_rtsp_media_get_buffer_size")]
110    #[doc(alias = "get_buffer_size")]
111    #[doc(alias = "buffer-size")]
112    fn buffer_size(&self) -> u32 {
113        unsafe { ffi::gst_rtsp_media_get_buffer_size(self.as_ref().to_glib_none().0) }
114    }
115
116    #[doc(alias = "gst_rtsp_media_get_clock")]
117    #[doc(alias = "get_clock")]
118    fn clock(&self) -> Option<gst::Clock> {
119        unsafe {
120            from_glib_full(ffi::gst_rtsp_media_get_clock(
121                self.as_ref().to_glib_none().0,
122            ))
123        }
124    }
125
126    #[cfg(feature = "v1_16")]
127    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
128    #[doc(alias = "gst_rtsp_media_get_do_retransmission")]
129    #[doc(alias = "get_do_retransmission")]
130    fn does_retransmission(&self) -> bool {
131        unsafe {
132            from_glib(ffi::gst_rtsp_media_get_do_retransmission(
133                self.as_ref().to_glib_none().0,
134            ))
135        }
136    }
137
138    #[cfg(feature = "v1_18")]
139    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
140    #[doc(alias = "gst_rtsp_media_get_dscp_qos")]
141    #[doc(alias = "get_dscp_qos")]
142    #[doc(alias = "dscp-qos")]
143    fn dscp_qos(&self) -> i32 {
144        unsafe { ffi::gst_rtsp_media_get_dscp_qos(self.as_ref().to_glib_none().0) }
145    }
146
147    #[doc(alias = "gst_rtsp_media_get_element")]
148    #[doc(alias = "get_element")]
149    fn element(&self) -> gst::Element {
150        unsafe {
151            from_glib_full(ffi::gst_rtsp_media_get_element(
152                self.as_ref().to_glib_none().0,
153            ))
154        }
155    }
156
157    #[cfg(feature = "v1_24")]
158    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
159    #[doc(alias = "gst_rtsp_media_get_ensure_keyunit_on_start")]
160    #[doc(alias = "get_ensure_keyunit_on_start")]
161    #[doc(alias = "ensure-keyunit-on-start")]
162    fn is_ensure_keyunit_on_start(&self) -> bool {
163        unsafe {
164            from_glib(ffi::gst_rtsp_media_get_ensure_keyunit_on_start(
165                self.as_ref().to_glib_none().0,
166            ))
167        }
168    }
169
170    #[cfg(feature = "v1_24")]
171    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
172    #[doc(alias = "gst_rtsp_media_get_ensure_keyunit_on_start_timeout")]
173    #[doc(alias = "get_ensure_keyunit_on_start_timeout")]
174    #[doc(alias = "ensure-keyunit-on-start-timeout")]
175    fn ensure_keyunit_on_start_timeout(&self) -> u32 {
176        unsafe {
177            ffi::gst_rtsp_media_get_ensure_keyunit_on_start_timeout(self.as_ref().to_glib_none().0)
178        }
179    }
180
181    #[doc(alias = "gst_rtsp_media_get_latency")]
182    #[doc(alias = "get_latency")]
183    fn latency(&self) -> u32 {
184        unsafe { ffi::gst_rtsp_media_get_latency(self.as_ref().to_glib_none().0) }
185    }
186
187    #[cfg(feature = "v1_16")]
188    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
189    #[doc(alias = "gst_rtsp_media_get_max_mcast_ttl")]
190    #[doc(alias = "get_max_mcast_ttl")]
191    #[doc(alias = "max-mcast-ttl")]
192    fn max_mcast_ttl(&self) -> u32 {
193        unsafe { ffi::gst_rtsp_media_get_max_mcast_ttl(self.as_ref().to_glib_none().0) }
194    }
195
196    #[doc(alias = "gst_rtsp_media_get_multicast_iface")]
197    #[doc(alias = "get_multicast_iface")]
198    fn multicast_iface(&self) -> Option<glib::GString> {
199        unsafe {
200            from_glib_full(ffi::gst_rtsp_media_get_multicast_iface(
201                self.as_ref().to_glib_none().0,
202            ))
203        }
204    }
205
206    //#[doc(alias = "gst_rtsp_media_get_permissions")]
207    //#[doc(alias = "get_permissions")]
208    //fn permissions(&self) -> /*Ignored*/Option<RTSPPermissions> {
209    //    unsafe { TODO: call ffi:gst_rtsp_media_get_permissions() }
210    //}
211
212    #[doc(alias = "gst_rtsp_media_get_profiles")]
213    #[doc(alias = "get_profiles")]
214    fn profiles(&self) -> gst_rtsp::RTSPProfile {
215        unsafe {
216            from_glib(ffi::gst_rtsp_media_get_profiles(
217                self.as_ref().to_glib_none().0,
218            ))
219        }
220    }
221
222    #[doc(alias = "gst_rtsp_media_get_protocols")]
223    #[doc(alias = "get_protocols")]
224    fn protocols(&self) -> gst_rtsp::RTSPLowerTrans {
225        unsafe {
226            from_glib(ffi::gst_rtsp_media_get_protocols(
227                self.as_ref().to_glib_none().0,
228            ))
229        }
230    }
231
232    #[doc(alias = "gst_rtsp_media_get_publish_clock_mode")]
233    #[doc(alias = "get_publish_clock_mode")]
234    fn publish_clock_mode(&self) -> RTSPPublishClockMode {
235        unsafe {
236            from_glib(ffi::gst_rtsp_media_get_publish_clock_mode(
237                self.as_ref().to_glib_none().0,
238            ))
239        }
240    }
241
242    #[doc(alias = "gst_rtsp_media_get_range_string")]
243    #[doc(alias = "get_range_string")]
244    fn range_string(&self, play: bool, unit: gst_rtsp::RTSPRangeUnit) -> Option<glib::GString> {
245        unsafe {
246            from_glib_full(ffi::gst_rtsp_media_get_range_string(
247                self.as_ref().to_glib_none().0,
248                play.into_glib(),
249                unit.into_glib(),
250            ))
251        }
252    }
253
254    #[cfg(feature = "v1_18")]
255    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
256    #[doc(alias = "gst_rtsp_media_get_rate_control")]
257    #[doc(alias = "get_rate_control")]
258    fn is_rate_control(&self) -> bool {
259        unsafe {
260            from_glib(ffi::gst_rtsp_media_get_rate_control(
261                self.as_ref().to_glib_none().0,
262            ))
263        }
264    }
265
266    #[cfg(feature = "v1_18")]
267    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
268    #[doc(alias = "gst_rtsp_media_get_rates")]
269    #[doc(alias = "get_rates")]
270    fn rates(&self) -> Option<(f64, f64)> {
271        unsafe {
272            let mut rate = std::mem::MaybeUninit::uninit();
273            let mut applied_rate = std::mem::MaybeUninit::uninit();
274            let ret = from_glib(ffi::gst_rtsp_media_get_rates(
275                self.as_ref().to_glib_none().0,
276                rate.as_mut_ptr(),
277                applied_rate.as_mut_ptr(),
278            ));
279            if ret {
280                Some((rate.assume_init(), applied_rate.assume_init()))
281            } else {
282                None
283            }
284        }
285    }
286
287    #[doc(alias = "gst_rtsp_media_get_retransmission_time")]
288    #[doc(alias = "get_retransmission_time")]
289    fn retransmission_time(&self) -> Option<gst::ClockTime> {
290        unsafe {
291            from_glib(ffi::gst_rtsp_media_get_retransmission_time(
292                self.as_ref().to_glib_none().0,
293            ))
294        }
295    }
296
297    #[doc(alias = "gst_rtsp_media_get_status")]
298    #[doc(alias = "get_status")]
299    fn status(&self) -> RTSPMediaStatus {
300        unsafe {
301            from_glib(ffi::gst_rtsp_media_get_status(
302                self.as_ref().to_glib_none().0,
303            ))
304        }
305    }
306
307    #[doc(alias = "gst_rtsp_media_get_stream")]
308    #[doc(alias = "get_stream")]
309    fn stream(&self, idx: u32) -> Option<RTSPStream> {
310        unsafe {
311            from_glib_none(ffi::gst_rtsp_media_get_stream(
312                self.as_ref().to_glib_none().0,
313                idx,
314            ))
315        }
316    }
317
318    #[doc(alias = "gst_rtsp_media_get_suspend_mode")]
319    #[doc(alias = "get_suspend_mode")]
320    #[doc(alias = "suspend-mode")]
321    fn suspend_mode(&self) -> RTSPSuspendMode {
322        unsafe {
323            from_glib(ffi::gst_rtsp_media_get_suspend_mode(
324                self.as_ref().to_glib_none().0,
325            ))
326        }
327    }
328
329    #[doc(alias = "gst_rtsp_media_get_time_provider")]
330    #[doc(alias = "get_time_provider")]
331    #[doc(alias = "time-provider")]
332    fn time_provider(&self, address: Option<&str>, port: u16) -> Option<gst_net::NetTimeProvider> {
333        unsafe {
334            from_glib_full(ffi::gst_rtsp_media_get_time_provider(
335                self.as_ref().to_glib_none().0,
336                address.to_glib_none().0,
337                port,
338            ))
339        }
340    }
341
342    #[doc(alias = "gst_rtsp_media_get_transport_mode")]
343    #[doc(alias = "get_transport_mode")]
344    #[doc(alias = "transport-mode")]
345    fn transport_mode(&self) -> RTSPTransportMode {
346        unsafe {
347            from_glib(ffi::gst_rtsp_media_get_transport_mode(
348                self.as_ref().to_glib_none().0,
349            ))
350        }
351    }
352
353    //#[doc(alias = "gst_rtsp_media_handle_sdp")]
354    //fn handle_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage) -> bool {
355    //    unsafe { TODO: call ffi:gst_rtsp_media_handle_sdp() }
356    //}
357
358    #[cfg(feature = "v1_18")]
359    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
360    #[doc(alias = "gst_rtsp_media_has_completed_sender")]
361    fn has_completed_sender(&self) -> bool {
362        unsafe {
363            from_glib(ffi::gst_rtsp_media_has_completed_sender(
364                self.as_ref().to_glib_none().0,
365            ))
366        }
367    }
368
369    #[cfg(feature = "v1_16")]
370    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
371    #[doc(alias = "gst_rtsp_media_is_bind_mcast_address")]
372    #[doc(alias = "bind-mcast-address")]
373    fn is_bind_mcast_address(&self) -> bool {
374        unsafe {
375            from_glib(ffi::gst_rtsp_media_is_bind_mcast_address(
376                self.as_ref().to_glib_none().0,
377            ))
378        }
379    }
380
381    #[doc(alias = "gst_rtsp_media_is_eos_shutdown")]
382    #[doc(alias = "eos-shutdown")]
383    fn is_eos_shutdown(&self) -> bool {
384        unsafe {
385            from_glib(ffi::gst_rtsp_media_is_eos_shutdown(
386                self.as_ref().to_glib_none().0,
387            ))
388        }
389    }
390
391    #[cfg(feature = "v1_18")]
392    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
393    #[doc(alias = "gst_rtsp_media_is_receive_only")]
394    fn is_receive_only(&self) -> bool {
395        unsafe {
396            from_glib(ffi::gst_rtsp_media_is_receive_only(
397                self.as_ref().to_glib_none().0,
398            ))
399        }
400    }
401
402    #[doc(alias = "gst_rtsp_media_is_reusable")]
403    #[doc(alias = "reusable")]
404    fn is_reusable(&self) -> bool {
405        unsafe {
406            from_glib(ffi::gst_rtsp_media_is_reusable(
407                self.as_ref().to_glib_none().0,
408            ))
409        }
410    }
411
412    #[doc(alias = "gst_rtsp_media_is_shared")]
413    #[doc(alias = "shared")]
414    fn is_shared(&self) -> bool {
415        unsafe {
416            from_glib(ffi::gst_rtsp_media_is_shared(
417                self.as_ref().to_glib_none().0,
418            ))
419        }
420    }
421
422    #[doc(alias = "gst_rtsp_media_is_stop_on_disconnect")]
423    #[doc(alias = "stop-on-disconnect")]
424    fn is_stop_on_disconnect(&self) -> bool {
425        unsafe {
426            from_glib(ffi::gst_rtsp_media_is_stop_on_disconnect(
427                self.as_ref().to_glib_none().0,
428            ))
429        }
430    }
431
432    #[doc(alias = "gst_rtsp_media_is_time_provider")]
433    #[doc(alias = "time-provider")]
434    fn is_time_provider(&self) -> bool {
435        unsafe {
436            from_glib(ffi::gst_rtsp_media_is_time_provider(
437                self.as_ref().to_glib_none().0,
438            ))
439        }
440    }
441
442    #[cfg(feature = "v1_18")]
443    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
444    #[doc(alias = "gst_rtsp_media_lock")]
445    fn lock(&self) {
446        unsafe {
447            ffi::gst_rtsp_media_lock(self.as_ref().to_glib_none().0);
448        }
449    }
450
451    #[doc(alias = "gst_rtsp_media_n_streams")]
452    fn n_streams(&self) -> u32 {
453        unsafe { ffi::gst_rtsp_media_n_streams(self.as_ref().to_glib_none().0) }
454    }
455
456    #[doc(alias = "gst_rtsp_media_prepare")]
457    fn prepare(&self, thread: Option<RTSPThread>) -> Result<(), glib::error::BoolError> {
458        unsafe {
459            glib::result_from_gboolean!(
460                ffi::gst_rtsp_media_prepare(self.as_ref().to_glib_none().0, thread.into_glib_ptr()),
461                "Failed to prepare media"
462            )
463        }
464    }
465
466    //#[doc(alias = "gst_rtsp_media_seek")]
467    //fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool {
468    //    unsafe { TODO: call ffi:gst_rtsp_media_seek() }
469    //}
470
471    //#[cfg(feature = "v1_18")]
472    //#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
473    //#[doc(alias = "gst_rtsp_media_seek_full")]
474    //fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool {
475    //    unsafe { TODO: call ffi:gst_rtsp_media_seek_full() }
476    //}
477
478    //#[cfg(feature = "v1_18")]
479    //#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
480    //#[doc(alias = "gst_rtsp_media_seek_trickmode")]
481    //fn seek_trickmode(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags, rate: f64, trickmode_interval: impl Into<Option<gst::ClockTime>>) -> bool {
482    //    unsafe { TODO: call ffi:gst_rtsp_media_seek_trickmode() }
483    //}
484
485    //#[doc(alias = "gst_rtsp_media_seekable")]
486    //fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff {
487    //    unsafe { TODO: call ffi:gst_rtsp_media_seekable() }
488    //}
489
490    #[doc(alias = "gst_rtsp_media_set_address_pool")]
491    fn set_address_pool(&self, pool: Option<&impl IsA<RTSPAddressPool>>) {
492        unsafe {
493            ffi::gst_rtsp_media_set_address_pool(
494                self.as_ref().to_glib_none().0,
495                pool.map(|p| p.as_ref()).to_glib_none().0,
496            );
497        }
498    }
499
500    #[cfg(feature = "v1_16")]
501    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
502    #[doc(alias = "gst_rtsp_media_set_bind_mcast_address")]
503    #[doc(alias = "bind-mcast-address")]
504    fn set_bind_mcast_address(&self, bind_mcast_addr: bool) {
505        unsafe {
506            ffi::gst_rtsp_media_set_bind_mcast_address(
507                self.as_ref().to_glib_none().0,
508                bind_mcast_addr.into_glib(),
509            );
510        }
511    }
512
513    #[doc(alias = "gst_rtsp_media_set_buffer_size")]
514    #[doc(alias = "buffer-size")]
515    fn set_buffer_size(&self, size: u32) {
516        unsafe {
517            ffi::gst_rtsp_media_set_buffer_size(self.as_ref().to_glib_none().0, size);
518        }
519    }
520
521    #[doc(alias = "gst_rtsp_media_set_clock")]
522    #[doc(alias = "clock")]
523    fn set_clock(&self, clock: Option<&impl IsA<gst::Clock>>) {
524        unsafe {
525            ffi::gst_rtsp_media_set_clock(
526                self.as_ref().to_glib_none().0,
527                clock.map(|p| p.as_ref()).to_glib_none().0,
528            );
529        }
530    }
531
532    #[cfg(feature = "v1_16")]
533    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
534    #[doc(alias = "gst_rtsp_media_set_do_retransmission")]
535    fn set_do_retransmission(&self, do_retransmission: bool) {
536        unsafe {
537            ffi::gst_rtsp_media_set_do_retransmission(
538                self.as_ref().to_glib_none().0,
539                do_retransmission.into_glib(),
540            );
541        }
542    }
543
544    #[cfg(feature = "v1_18")]
545    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
546    #[doc(alias = "gst_rtsp_media_set_dscp_qos")]
547    #[doc(alias = "dscp-qos")]
548    fn set_dscp_qos(&self, dscp_qos: i32) {
549        unsafe {
550            ffi::gst_rtsp_media_set_dscp_qos(self.as_ref().to_glib_none().0, dscp_qos);
551        }
552    }
553
554    #[cfg(feature = "v1_24")]
555    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
556    #[doc(alias = "gst_rtsp_media_set_ensure_keyunit_on_start")]
557    #[doc(alias = "ensure-keyunit-on-start")]
558    fn set_ensure_keyunit_on_start(&self, ensure_keyunit_on_start: bool) {
559        unsafe {
560            ffi::gst_rtsp_media_set_ensure_keyunit_on_start(
561                self.as_ref().to_glib_none().0,
562                ensure_keyunit_on_start.into_glib(),
563            );
564        }
565    }
566
567    #[cfg(feature = "v1_24")]
568    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
569    #[doc(alias = "gst_rtsp_media_set_ensure_keyunit_on_start_timeout")]
570    #[doc(alias = "ensure-keyunit-on-start-timeout")]
571    fn set_ensure_keyunit_on_start_timeout(&self, timeout: u32) {
572        unsafe {
573            ffi::gst_rtsp_media_set_ensure_keyunit_on_start_timeout(
574                self.as_ref().to_glib_none().0,
575                timeout,
576            );
577        }
578    }
579
580    #[doc(alias = "gst_rtsp_media_set_eos_shutdown")]
581    #[doc(alias = "eos-shutdown")]
582    fn set_eos_shutdown(&self, eos_shutdown: bool) {
583        unsafe {
584            ffi::gst_rtsp_media_set_eos_shutdown(
585                self.as_ref().to_glib_none().0,
586                eos_shutdown.into_glib(),
587            );
588        }
589    }
590
591    #[doc(alias = "gst_rtsp_media_set_latency")]
592    #[doc(alias = "latency")]
593    fn set_latency(&self, latency: u32) {
594        unsafe {
595            ffi::gst_rtsp_media_set_latency(self.as_ref().to_glib_none().0, latency);
596        }
597    }
598
599    #[cfg(feature = "v1_16")]
600    #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
601    #[doc(alias = "gst_rtsp_media_set_max_mcast_ttl")]
602    #[doc(alias = "max-mcast-ttl")]
603    fn set_max_mcast_ttl(&self, ttl: u32) -> bool {
604        unsafe {
605            from_glib(ffi::gst_rtsp_media_set_max_mcast_ttl(
606                self.as_ref().to_glib_none().0,
607                ttl,
608            ))
609        }
610    }
611
612    #[doc(alias = "gst_rtsp_media_set_multicast_iface")]
613    fn set_multicast_iface(&self, multicast_iface: Option<&str>) {
614        unsafe {
615            ffi::gst_rtsp_media_set_multicast_iface(
616                self.as_ref().to_glib_none().0,
617                multicast_iface.to_glib_none().0,
618            );
619        }
620    }
621
622    //#[doc(alias = "gst_rtsp_media_set_permissions")]
623    //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) {
624    //    unsafe { TODO: call ffi:gst_rtsp_media_set_permissions() }
625    //}
626
627    #[doc(alias = "gst_rtsp_media_set_pipeline_state")]
628    fn set_pipeline_state(&self, state: gst::State) {
629        unsafe {
630            ffi::gst_rtsp_media_set_pipeline_state(
631                self.as_ref().to_glib_none().0,
632                state.into_glib(),
633            );
634        }
635    }
636
637    #[doc(alias = "gst_rtsp_media_set_profiles")]
638    #[doc(alias = "profiles")]
639    fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) {
640        unsafe {
641            ffi::gst_rtsp_media_set_profiles(self.as_ref().to_glib_none().0, profiles.into_glib());
642        }
643    }
644
645    #[doc(alias = "gst_rtsp_media_set_protocols")]
646    #[doc(alias = "protocols")]
647    fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) {
648        unsafe {
649            ffi::gst_rtsp_media_set_protocols(
650                self.as_ref().to_glib_none().0,
651                protocols.into_glib(),
652            );
653        }
654    }
655
656    #[doc(alias = "gst_rtsp_media_set_publish_clock_mode")]
657    fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) {
658        unsafe {
659            ffi::gst_rtsp_media_set_publish_clock_mode(
660                self.as_ref().to_glib_none().0,
661                mode.into_glib(),
662            );
663        }
664    }
665
666    #[cfg(feature = "v1_18")]
667    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
668    #[doc(alias = "gst_rtsp_media_set_rate_control")]
669    fn set_rate_control(&self, enabled: bool) {
670        unsafe {
671            ffi::gst_rtsp_media_set_rate_control(
672                self.as_ref().to_glib_none().0,
673                enabled.into_glib(),
674            );
675        }
676    }
677
678    #[doc(alias = "gst_rtsp_media_set_retransmission_time")]
679    fn set_retransmission_time(&self, time: impl Into<Option<gst::ClockTime>>) {
680        unsafe {
681            ffi::gst_rtsp_media_set_retransmission_time(
682                self.as_ref().to_glib_none().0,
683                time.into().into_glib(),
684            );
685        }
686    }
687
688    #[doc(alias = "gst_rtsp_media_set_reusable")]
689    #[doc(alias = "reusable")]
690    fn set_reusable(&self, reusable: bool) {
691        unsafe {
692            ffi::gst_rtsp_media_set_reusable(self.as_ref().to_glib_none().0, reusable.into_glib());
693        }
694    }
695
696    #[doc(alias = "gst_rtsp_media_set_shared")]
697    #[doc(alias = "shared")]
698    fn set_shared(&self, shared: bool) {
699        unsafe {
700            ffi::gst_rtsp_media_set_shared(self.as_ref().to_glib_none().0, shared.into_glib());
701        }
702    }
703
704    #[doc(alias = "gst_rtsp_media_set_state")]
705    fn set_state(&self, state: gst::State, transports: &[RTSPStreamTransport]) -> bool {
706        unsafe {
707            from_glib(ffi::gst_rtsp_media_set_state(
708                self.as_ref().to_glib_none().0,
709                state.into_glib(),
710                transports.to_glib_none().0,
711            ))
712        }
713    }
714
715    #[doc(alias = "gst_rtsp_media_set_stop_on_disconnect")]
716    #[doc(alias = "stop-on-disconnect")]
717    fn set_stop_on_disconnect(&self, stop_on_disconnect: bool) {
718        unsafe {
719            ffi::gst_rtsp_media_set_stop_on_disconnect(
720                self.as_ref().to_glib_none().0,
721                stop_on_disconnect.into_glib(),
722            );
723        }
724    }
725
726    #[doc(alias = "gst_rtsp_media_set_suspend_mode")]
727    #[doc(alias = "suspend-mode")]
728    fn set_suspend_mode(&self, mode: RTSPSuspendMode) {
729        unsafe {
730            ffi::gst_rtsp_media_set_suspend_mode(self.as_ref().to_glib_none().0, mode.into_glib());
731        }
732    }
733
734    #[doc(alias = "gst_rtsp_media_set_transport_mode")]
735    #[doc(alias = "transport-mode")]
736    fn set_transport_mode(&self, mode: RTSPTransportMode) {
737        unsafe {
738            ffi::gst_rtsp_media_set_transport_mode(
739                self.as_ref().to_glib_none().0,
740                mode.into_glib(),
741            );
742        }
743    }
744
745    //#[doc(alias = "gst_rtsp_media_setup_sdp")]
746    //fn setup_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage, info: /*Ignored*/&mut SDPInfo) -> bool {
747    //    unsafe { TODO: call ffi:gst_rtsp_media_setup_sdp() }
748    //}
749
750    #[doc(alias = "gst_rtsp_media_suspend")]
751    fn suspend(&self) -> Result<(), glib::error::BoolError> {
752        unsafe {
753            glib::result_from_gboolean!(
754                ffi::gst_rtsp_media_suspend(self.as_ref().to_glib_none().0),
755                "Failed to suspend media"
756            )
757        }
758    }
759
760    #[cfg(feature = "v1_18")]
761    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
762    #[doc(alias = "gst_rtsp_media_unlock")]
763    fn unlock(&self) {
764        unsafe {
765            ffi::gst_rtsp_media_unlock(self.as_ref().to_glib_none().0);
766        }
767    }
768
769    #[doc(alias = "gst_rtsp_media_unprepare")]
770    fn unprepare(&self) -> Result<(), glib::error::BoolError> {
771        unsafe {
772            glib::result_from_gboolean!(
773                ffi::gst_rtsp_media_unprepare(self.as_ref().to_glib_none().0),
774                "Failed to unprepare media"
775            )
776        }
777    }
778
779    #[doc(alias = "gst_rtsp_media_unsuspend")]
780    fn unsuspend(&self) -> Result<(), glib::error::BoolError> {
781        unsafe {
782            glib::result_from_gboolean!(
783                ffi::gst_rtsp_media_unsuspend(self.as_ref().to_glib_none().0),
784                "Failed to unsuspend media"
785            )
786        }
787    }
788
789    #[doc(alias = "gst_rtsp_media_use_time_provider")]
790    fn use_time_provider(&self, time_provider: bool) {
791        unsafe {
792            ffi::gst_rtsp_media_use_time_provider(
793                self.as_ref().to_glib_none().0,
794                time_provider.into_glib(),
795            );
796        }
797    }
798
799    #[cfg(not(feature = "v1_16"))]
800    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_16"))))]
801    #[doc(alias = "bind-mcast-address")]
802    fn is_bind_mcast_address(&self) -> bool {
803        ObjectExt::property(self.as_ref(), "bind-mcast-address")
804    }
805
806    #[cfg(not(feature = "v1_16"))]
807    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_16"))))]
808    #[doc(alias = "bind-mcast-address")]
809    fn set_bind_mcast_address(&self, bind_mcast_address: bool) {
810        ObjectExt::set_property(self.as_ref(), "bind-mcast-address", bind_mcast_address)
811    }
812
813    #[cfg(not(feature = "v1_18"))]
814    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_18"))))]
815    #[doc(alias = "dscp-qos")]
816    fn dscp_qos(&self) -> i32 {
817        ObjectExt::property(self.as_ref(), "dscp-qos")
818    }
819
820    #[cfg(not(feature = "v1_18"))]
821    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_18"))))]
822    #[doc(alias = "dscp-qos")]
823    fn set_dscp_qos(&self, dscp_qos: i32) {
824        ObjectExt::set_property(self.as_ref(), "dscp-qos", dscp_qos)
825    }
826
827    #[cfg(not(feature = "v1_16"))]
828    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_16"))))]
829    #[doc(alias = "max-mcast-ttl")]
830    fn max_mcast_ttl(&self) -> u32 {
831        ObjectExt::property(self.as_ref(), "max-mcast-ttl")
832    }
833
834    #[cfg(not(feature = "v1_16"))]
835    #[cfg_attr(docsrs, doc(cfg(not(feature = "v1_16"))))]
836    #[doc(alias = "max-mcast-ttl")]
837    fn set_max_mcast_ttl(&self, max_mcast_ttl: u32) {
838        ObjectExt::set_property(self.as_ref(), "max-mcast-ttl", max_mcast_ttl)
839    }
840
841    #[doc(alias = "time-provider")]
842    fn set_time_provider(&self, time_provider: bool) {
843        ObjectExt::set_property(self.as_ref(), "time-provider", time_provider)
844    }
845
846    #[cfg(feature = "v1_22")]
847    #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
848    #[doc(alias = "handle-message")]
849    fn connect_handle_message<F: Fn(&Self, &gst::Message) -> bool + Send + Sync + 'static>(
850        &self,
851        detail: Option<&str>,
852        f: F,
853    ) -> SignalHandlerId {
854        unsafe extern "C" fn handle_message_trampoline<
855            P: IsA<RTSPMedia>,
856            F: Fn(&P, &gst::Message) -> bool + Send + Sync + 'static,
857        >(
858            this: *mut ffi::GstRTSPMedia,
859            message: *mut gst::ffi::GstMessage,
860            f: glib::ffi::gpointer,
861        ) -> glib::ffi::gboolean {
862            unsafe {
863                let f: &F = &*(f as *const F);
864                f(
865                    RTSPMedia::from_glib_borrow(this).unsafe_cast_ref(),
866                    &from_glib_borrow(message),
867                )
868                .into_glib()
869            }
870        }
871        unsafe {
872            let f: Box_<F> = Box_::new(f);
873            let detailed_signal_name = detail.map(|name| format!("handle-message::{name}\0"));
874            let signal_name = detailed_signal_name
875                .as_ref()
876                .map_or(c"handle-message", |n| {
877                    std::ffi::CStr::from_bytes_with_nul_unchecked(n.as_bytes())
878                });
879            connect_raw(
880                self.as_ptr() as *mut _,
881                signal_name.as_ptr(),
882                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
883                    handle_message_trampoline::<Self, F> as *const (),
884                )),
885                Box_::into_raw(f),
886            )
887        }
888    }
889
890    #[doc(alias = "new-state")]
891    fn connect_new_state<F: Fn(&Self, i32) + Send + Sync + 'static>(
892        &self,
893        f: F,
894    ) -> SignalHandlerId {
895        unsafe extern "C" fn new_state_trampoline<
896            P: IsA<RTSPMedia>,
897            F: Fn(&P, i32) + Send + Sync + 'static,
898        >(
899            this: *mut ffi::GstRTSPMedia,
900            object: std::ffi::c_int,
901            f: glib::ffi::gpointer,
902        ) {
903            unsafe {
904                let f: &F = &*(f as *const F);
905                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref(), object)
906            }
907        }
908        unsafe {
909            let f: Box_<F> = Box_::new(f);
910            connect_raw(
911                self.as_ptr() as *mut _,
912                c"new-state".as_ptr(),
913                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
914                    new_state_trampoline::<Self, F> as *const (),
915                )),
916                Box_::into_raw(f),
917            )
918        }
919    }
920
921    #[doc(alias = "new-stream")]
922    fn connect_new_stream<F: Fn(&Self, &RTSPStream) + Send + Sync + 'static>(
923        &self,
924        f: F,
925    ) -> SignalHandlerId {
926        unsafe extern "C" fn new_stream_trampoline<
927            P: IsA<RTSPMedia>,
928            F: Fn(&P, &RTSPStream) + Send + Sync + 'static,
929        >(
930            this: *mut ffi::GstRTSPMedia,
931            object: *mut ffi::GstRTSPStream,
932            f: glib::ffi::gpointer,
933        ) {
934            unsafe {
935                let f: &F = &*(f as *const F);
936                f(
937                    RTSPMedia::from_glib_borrow(this).unsafe_cast_ref(),
938                    &from_glib_borrow(object),
939                )
940            }
941        }
942        unsafe {
943            let f: Box_<F> = Box_::new(f);
944            connect_raw(
945                self.as_ptr() as *mut _,
946                c"new-stream".as_ptr(),
947                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
948                    new_stream_trampoline::<Self, F> as *const (),
949                )),
950                Box_::into_raw(f),
951            )
952        }
953    }
954
955    #[doc(alias = "prepared")]
956    fn connect_prepared<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
957        unsafe extern "C" fn prepared_trampoline<
958            P: IsA<RTSPMedia>,
959            F: Fn(&P) + Send + Sync + 'static,
960        >(
961            this: *mut ffi::GstRTSPMedia,
962            f: glib::ffi::gpointer,
963        ) {
964            unsafe {
965                let f: &F = &*(f as *const F);
966                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
967            }
968        }
969        unsafe {
970            let f: Box_<F> = Box_::new(f);
971            connect_raw(
972                self.as_ptr() as *mut _,
973                c"prepared".as_ptr(),
974                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
975                    prepared_trampoline::<Self, F> as *const (),
976                )),
977                Box_::into_raw(f),
978            )
979        }
980    }
981
982    #[doc(alias = "removed-stream")]
983    fn connect_removed_stream<F: Fn(&Self, &RTSPStream) + Send + Sync + 'static>(
984        &self,
985        f: F,
986    ) -> SignalHandlerId {
987        unsafe extern "C" fn removed_stream_trampoline<
988            P: IsA<RTSPMedia>,
989            F: Fn(&P, &RTSPStream) + Send + Sync + 'static,
990        >(
991            this: *mut ffi::GstRTSPMedia,
992            object: *mut ffi::GstRTSPStream,
993            f: glib::ffi::gpointer,
994        ) {
995            unsafe {
996                let f: &F = &*(f as *const F);
997                f(
998                    RTSPMedia::from_glib_borrow(this).unsafe_cast_ref(),
999                    &from_glib_borrow(object),
1000                )
1001            }
1002        }
1003        unsafe {
1004            let f: Box_<F> = Box_::new(f);
1005            connect_raw(
1006                self.as_ptr() as *mut _,
1007                c"removed-stream".as_ptr(),
1008                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1009                    removed_stream_trampoline::<Self, F> as *const (),
1010                )),
1011                Box_::into_raw(f),
1012            )
1013        }
1014    }
1015
1016    #[doc(alias = "target-state")]
1017    fn connect_target_state<F: Fn(&Self, i32) + Send + Sync + 'static>(
1018        &self,
1019        f: F,
1020    ) -> SignalHandlerId {
1021        unsafe extern "C" fn target_state_trampoline<
1022            P: IsA<RTSPMedia>,
1023            F: Fn(&P, i32) + Send + Sync + 'static,
1024        >(
1025            this: *mut ffi::GstRTSPMedia,
1026            object: std::ffi::c_int,
1027            f: glib::ffi::gpointer,
1028        ) {
1029            unsafe {
1030                let f: &F = &*(f as *const F);
1031                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref(), object)
1032            }
1033        }
1034        unsafe {
1035            let f: Box_<F> = Box_::new(f);
1036            connect_raw(
1037                self.as_ptr() as *mut _,
1038                c"target-state".as_ptr(),
1039                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1040                    target_state_trampoline::<Self, F> as *const (),
1041                )),
1042                Box_::into_raw(f),
1043            )
1044        }
1045    }
1046
1047    #[doc(alias = "unprepared")]
1048    fn connect_unprepared<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
1049        unsafe extern "C" fn unprepared_trampoline<
1050            P: IsA<RTSPMedia>,
1051            F: Fn(&P) + Send + Sync + 'static,
1052        >(
1053            this: *mut ffi::GstRTSPMedia,
1054            f: glib::ffi::gpointer,
1055        ) {
1056            unsafe {
1057                let f: &F = &*(f as *const F);
1058                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1059            }
1060        }
1061        unsafe {
1062            let f: Box_<F> = Box_::new(f);
1063            connect_raw(
1064                self.as_ptr() as *mut _,
1065                c"unprepared".as_ptr(),
1066                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1067                    unprepared_trampoline::<Self, F> as *const (),
1068                )),
1069                Box_::into_raw(f),
1070            )
1071        }
1072    }
1073
1074    #[doc(alias = "bind-mcast-address")]
1075    fn connect_bind_mcast_address_notify<F: Fn(&Self) + Send + Sync + 'static>(
1076        &self,
1077        f: F,
1078    ) -> SignalHandlerId {
1079        unsafe extern "C" fn notify_bind_mcast_address_trampoline<
1080            P: IsA<RTSPMedia>,
1081            F: Fn(&P) + Send + Sync + 'static,
1082        >(
1083            this: *mut ffi::GstRTSPMedia,
1084            _param_spec: glib::ffi::gpointer,
1085            f: glib::ffi::gpointer,
1086        ) {
1087            unsafe {
1088                let f: &F = &*(f as *const F);
1089                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1090            }
1091        }
1092        unsafe {
1093            let f: Box_<F> = Box_::new(f);
1094            connect_raw(
1095                self.as_ptr() as *mut _,
1096                c"notify::bind-mcast-address".as_ptr(),
1097                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1098                    notify_bind_mcast_address_trampoline::<Self, F> as *const (),
1099                )),
1100                Box_::into_raw(f),
1101            )
1102        }
1103    }
1104
1105    #[doc(alias = "buffer-size")]
1106    fn connect_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(
1107        &self,
1108        f: F,
1109    ) -> SignalHandlerId {
1110        unsafe extern "C" fn notify_buffer_size_trampoline<
1111            P: IsA<RTSPMedia>,
1112            F: Fn(&P) + Send + Sync + 'static,
1113        >(
1114            this: *mut ffi::GstRTSPMedia,
1115            _param_spec: glib::ffi::gpointer,
1116            f: glib::ffi::gpointer,
1117        ) {
1118            unsafe {
1119                let f: &F = &*(f as *const F);
1120                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1121            }
1122        }
1123        unsafe {
1124            let f: Box_<F> = Box_::new(f);
1125            connect_raw(
1126                self.as_ptr() as *mut _,
1127                c"notify::buffer-size".as_ptr(),
1128                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1129                    notify_buffer_size_trampoline::<Self, F> as *const (),
1130                )),
1131                Box_::into_raw(f),
1132            )
1133        }
1134    }
1135
1136    #[doc(alias = "clock")]
1137    fn connect_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
1138        unsafe extern "C" fn notify_clock_trampoline<
1139            P: IsA<RTSPMedia>,
1140            F: Fn(&P) + Send + Sync + 'static,
1141        >(
1142            this: *mut ffi::GstRTSPMedia,
1143            _param_spec: glib::ffi::gpointer,
1144            f: glib::ffi::gpointer,
1145        ) {
1146            unsafe {
1147                let f: &F = &*(f as *const F);
1148                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1149            }
1150        }
1151        unsafe {
1152            let f: Box_<F> = Box_::new(f);
1153            connect_raw(
1154                self.as_ptr() as *mut _,
1155                c"notify::clock".as_ptr(),
1156                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1157                    notify_clock_trampoline::<Self, F> as *const (),
1158                )),
1159                Box_::into_raw(f),
1160            )
1161        }
1162    }
1163
1164    #[doc(alias = "dscp-qos")]
1165    fn connect_dscp_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
1166        &self,
1167        f: F,
1168    ) -> SignalHandlerId {
1169        unsafe extern "C" fn notify_dscp_qos_trampoline<
1170            P: IsA<RTSPMedia>,
1171            F: Fn(&P) + Send + Sync + 'static,
1172        >(
1173            this: *mut ffi::GstRTSPMedia,
1174            _param_spec: glib::ffi::gpointer,
1175            f: glib::ffi::gpointer,
1176        ) {
1177            unsafe {
1178                let f: &F = &*(f as *const F);
1179                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1180            }
1181        }
1182        unsafe {
1183            let f: Box_<F> = Box_::new(f);
1184            connect_raw(
1185                self.as_ptr() as *mut _,
1186                c"notify::dscp-qos".as_ptr(),
1187                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1188                    notify_dscp_qos_trampoline::<Self, F> as *const (),
1189                )),
1190                Box_::into_raw(f),
1191            )
1192        }
1193    }
1194
1195    #[cfg(feature = "v1_24")]
1196    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
1197    #[doc(alias = "ensure-keyunit-on-start")]
1198    fn connect_ensure_keyunit_on_start_notify<F: Fn(&Self) + Send + Sync + 'static>(
1199        &self,
1200        f: F,
1201    ) -> SignalHandlerId {
1202        unsafe extern "C" fn notify_ensure_keyunit_on_start_trampoline<
1203            P: IsA<RTSPMedia>,
1204            F: Fn(&P) + Send + Sync + 'static,
1205        >(
1206            this: *mut ffi::GstRTSPMedia,
1207            _param_spec: glib::ffi::gpointer,
1208            f: glib::ffi::gpointer,
1209        ) {
1210            unsafe {
1211                let f: &F = &*(f as *const F);
1212                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1213            }
1214        }
1215        unsafe {
1216            let f: Box_<F> = Box_::new(f);
1217            connect_raw(
1218                self.as_ptr() as *mut _,
1219                c"notify::ensure-keyunit-on-start".as_ptr(),
1220                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1221                    notify_ensure_keyunit_on_start_trampoline::<Self, F> as *const (),
1222                )),
1223                Box_::into_raw(f),
1224            )
1225        }
1226    }
1227
1228    #[cfg(feature = "v1_24")]
1229    #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
1230    #[doc(alias = "ensure-keyunit-on-start-timeout")]
1231    fn connect_ensure_keyunit_on_start_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
1232        &self,
1233        f: F,
1234    ) -> SignalHandlerId {
1235        unsafe extern "C" fn notify_ensure_keyunit_on_start_timeout_trampoline<
1236            P: IsA<RTSPMedia>,
1237            F: Fn(&P) + Send + Sync + 'static,
1238        >(
1239            this: *mut ffi::GstRTSPMedia,
1240            _param_spec: glib::ffi::gpointer,
1241            f: glib::ffi::gpointer,
1242        ) {
1243            unsafe {
1244                let f: &F = &*(f as *const F);
1245                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1246            }
1247        }
1248        unsafe {
1249            let f: Box_<F> = Box_::new(f);
1250            connect_raw(
1251                self.as_ptr() as *mut _,
1252                c"notify::ensure-keyunit-on-start-timeout".as_ptr(),
1253                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1254                    notify_ensure_keyunit_on_start_timeout_trampoline::<Self, F> as *const (),
1255                )),
1256                Box_::into_raw(f),
1257            )
1258        }
1259    }
1260
1261    #[doc(alias = "eos-shutdown")]
1262    fn connect_eos_shutdown_notify<F: Fn(&Self) + Send + Sync + 'static>(
1263        &self,
1264        f: F,
1265    ) -> SignalHandlerId {
1266        unsafe extern "C" fn notify_eos_shutdown_trampoline<
1267            P: IsA<RTSPMedia>,
1268            F: Fn(&P) + Send + Sync + 'static,
1269        >(
1270            this: *mut ffi::GstRTSPMedia,
1271            _param_spec: glib::ffi::gpointer,
1272            f: glib::ffi::gpointer,
1273        ) {
1274            unsafe {
1275                let f: &F = &*(f as *const F);
1276                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1277            }
1278        }
1279        unsafe {
1280            let f: Box_<F> = Box_::new(f);
1281            connect_raw(
1282                self.as_ptr() as *mut _,
1283                c"notify::eos-shutdown".as_ptr(),
1284                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1285                    notify_eos_shutdown_trampoline::<Self, F> as *const (),
1286                )),
1287                Box_::into_raw(f),
1288            )
1289        }
1290    }
1291
1292    #[doc(alias = "latency")]
1293    fn connect_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
1294        &self,
1295        f: F,
1296    ) -> SignalHandlerId {
1297        unsafe extern "C" fn notify_latency_trampoline<
1298            P: IsA<RTSPMedia>,
1299            F: Fn(&P) + Send + Sync + 'static,
1300        >(
1301            this: *mut ffi::GstRTSPMedia,
1302            _param_spec: glib::ffi::gpointer,
1303            f: glib::ffi::gpointer,
1304        ) {
1305            unsafe {
1306                let f: &F = &*(f as *const F);
1307                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1308            }
1309        }
1310        unsafe {
1311            let f: Box_<F> = Box_::new(f);
1312            connect_raw(
1313                self.as_ptr() as *mut _,
1314                c"notify::latency".as_ptr(),
1315                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1316                    notify_latency_trampoline::<Self, F> as *const (),
1317                )),
1318                Box_::into_raw(f),
1319            )
1320        }
1321    }
1322
1323    #[doc(alias = "max-mcast-ttl")]
1324    fn connect_max_mcast_ttl_notify<F: Fn(&Self) + Send + Sync + 'static>(
1325        &self,
1326        f: F,
1327    ) -> SignalHandlerId {
1328        unsafe extern "C" fn notify_max_mcast_ttl_trampoline<
1329            P: IsA<RTSPMedia>,
1330            F: Fn(&P) + Send + Sync + 'static,
1331        >(
1332            this: *mut ffi::GstRTSPMedia,
1333            _param_spec: glib::ffi::gpointer,
1334            f: glib::ffi::gpointer,
1335        ) {
1336            unsafe {
1337                let f: &F = &*(f as *const F);
1338                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1339            }
1340        }
1341        unsafe {
1342            let f: Box_<F> = Box_::new(f);
1343            connect_raw(
1344                self.as_ptr() as *mut _,
1345                c"notify::max-mcast-ttl".as_ptr(),
1346                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1347                    notify_max_mcast_ttl_trampoline::<Self, F> as *const (),
1348                )),
1349                Box_::into_raw(f),
1350            )
1351        }
1352    }
1353
1354    #[doc(alias = "profiles")]
1355    fn connect_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(
1356        &self,
1357        f: F,
1358    ) -> SignalHandlerId {
1359        unsafe extern "C" fn notify_profiles_trampoline<
1360            P: IsA<RTSPMedia>,
1361            F: Fn(&P) + Send + Sync + 'static,
1362        >(
1363            this: *mut ffi::GstRTSPMedia,
1364            _param_spec: glib::ffi::gpointer,
1365            f: glib::ffi::gpointer,
1366        ) {
1367            unsafe {
1368                let f: &F = &*(f as *const F);
1369                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1370            }
1371        }
1372        unsafe {
1373            let f: Box_<F> = Box_::new(f);
1374            connect_raw(
1375                self.as_ptr() as *mut _,
1376                c"notify::profiles".as_ptr(),
1377                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1378                    notify_profiles_trampoline::<Self, F> as *const (),
1379                )),
1380                Box_::into_raw(f),
1381            )
1382        }
1383    }
1384
1385    #[doc(alias = "protocols")]
1386    fn connect_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(
1387        &self,
1388        f: F,
1389    ) -> SignalHandlerId {
1390        unsafe extern "C" fn notify_protocols_trampoline<
1391            P: IsA<RTSPMedia>,
1392            F: Fn(&P) + Send + Sync + 'static,
1393        >(
1394            this: *mut ffi::GstRTSPMedia,
1395            _param_spec: glib::ffi::gpointer,
1396            f: glib::ffi::gpointer,
1397        ) {
1398            unsafe {
1399                let f: &F = &*(f as *const F);
1400                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1401            }
1402        }
1403        unsafe {
1404            let f: Box_<F> = Box_::new(f);
1405            connect_raw(
1406                self.as_ptr() as *mut _,
1407                c"notify::protocols".as_ptr(),
1408                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1409                    notify_protocols_trampoline::<Self, F> as *const (),
1410                )),
1411                Box_::into_raw(f),
1412            )
1413        }
1414    }
1415
1416    #[doc(alias = "reusable")]
1417    fn connect_reusable_notify<F: Fn(&Self) + Send + Sync + 'static>(
1418        &self,
1419        f: F,
1420    ) -> SignalHandlerId {
1421        unsafe extern "C" fn notify_reusable_trampoline<
1422            P: IsA<RTSPMedia>,
1423            F: Fn(&P) + Send + Sync + 'static,
1424        >(
1425            this: *mut ffi::GstRTSPMedia,
1426            _param_spec: glib::ffi::gpointer,
1427            f: glib::ffi::gpointer,
1428        ) {
1429            unsafe {
1430                let f: &F = &*(f as *const F);
1431                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1432            }
1433        }
1434        unsafe {
1435            let f: Box_<F> = Box_::new(f);
1436            connect_raw(
1437                self.as_ptr() as *mut _,
1438                c"notify::reusable".as_ptr(),
1439                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1440                    notify_reusable_trampoline::<Self, F> as *const (),
1441                )),
1442                Box_::into_raw(f),
1443            )
1444        }
1445    }
1446
1447    #[doc(alias = "shared")]
1448    fn connect_shared_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
1449        unsafe extern "C" fn notify_shared_trampoline<
1450            P: IsA<RTSPMedia>,
1451            F: Fn(&P) + Send + Sync + 'static,
1452        >(
1453            this: *mut ffi::GstRTSPMedia,
1454            _param_spec: glib::ffi::gpointer,
1455            f: glib::ffi::gpointer,
1456        ) {
1457            unsafe {
1458                let f: &F = &*(f as *const F);
1459                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1460            }
1461        }
1462        unsafe {
1463            let f: Box_<F> = Box_::new(f);
1464            connect_raw(
1465                self.as_ptr() as *mut _,
1466                c"notify::shared".as_ptr(),
1467                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1468                    notify_shared_trampoline::<Self, F> as *const (),
1469                )),
1470                Box_::into_raw(f),
1471            )
1472        }
1473    }
1474
1475    #[doc(alias = "stop-on-disconnect")]
1476    fn connect_stop_on_disconnect_notify<F: Fn(&Self) + Send + Sync + 'static>(
1477        &self,
1478        f: F,
1479    ) -> SignalHandlerId {
1480        unsafe extern "C" fn notify_stop_on_disconnect_trampoline<
1481            P: IsA<RTSPMedia>,
1482            F: Fn(&P) + Send + Sync + 'static,
1483        >(
1484            this: *mut ffi::GstRTSPMedia,
1485            _param_spec: glib::ffi::gpointer,
1486            f: glib::ffi::gpointer,
1487        ) {
1488            unsafe {
1489                let f: &F = &*(f as *const F);
1490                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1491            }
1492        }
1493        unsafe {
1494            let f: Box_<F> = Box_::new(f);
1495            connect_raw(
1496                self.as_ptr() as *mut _,
1497                c"notify::stop-on-disconnect".as_ptr(),
1498                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1499                    notify_stop_on_disconnect_trampoline::<Self, F> as *const (),
1500                )),
1501                Box_::into_raw(f),
1502            )
1503        }
1504    }
1505
1506    #[doc(alias = "suspend-mode")]
1507    fn connect_suspend_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(
1508        &self,
1509        f: F,
1510    ) -> SignalHandlerId {
1511        unsafe extern "C" fn notify_suspend_mode_trampoline<
1512            P: IsA<RTSPMedia>,
1513            F: Fn(&P) + Send + Sync + 'static,
1514        >(
1515            this: *mut ffi::GstRTSPMedia,
1516            _param_spec: glib::ffi::gpointer,
1517            f: glib::ffi::gpointer,
1518        ) {
1519            unsafe {
1520                let f: &F = &*(f as *const F);
1521                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1522            }
1523        }
1524        unsafe {
1525            let f: Box_<F> = Box_::new(f);
1526            connect_raw(
1527                self.as_ptr() as *mut _,
1528                c"notify::suspend-mode".as_ptr(),
1529                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1530                    notify_suspend_mode_trampoline::<Self, F> as *const (),
1531                )),
1532                Box_::into_raw(f),
1533            )
1534        }
1535    }
1536
1537    #[doc(alias = "time-provider")]
1538    fn connect_time_provider_notify<F: Fn(&Self) + Send + Sync + 'static>(
1539        &self,
1540        f: F,
1541    ) -> SignalHandlerId {
1542        unsafe extern "C" fn notify_time_provider_trampoline<
1543            P: IsA<RTSPMedia>,
1544            F: Fn(&P) + Send + Sync + 'static,
1545        >(
1546            this: *mut ffi::GstRTSPMedia,
1547            _param_spec: glib::ffi::gpointer,
1548            f: glib::ffi::gpointer,
1549        ) {
1550            unsafe {
1551                let f: &F = &*(f as *const F);
1552                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1553            }
1554        }
1555        unsafe {
1556            let f: Box_<F> = Box_::new(f);
1557            connect_raw(
1558                self.as_ptr() as *mut _,
1559                c"notify::time-provider".as_ptr(),
1560                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1561                    notify_time_provider_trampoline::<Self, F> as *const (),
1562                )),
1563                Box_::into_raw(f),
1564            )
1565        }
1566    }
1567
1568    #[doc(alias = "transport-mode")]
1569    fn connect_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(
1570        &self,
1571        f: F,
1572    ) -> SignalHandlerId {
1573        unsafe extern "C" fn notify_transport_mode_trampoline<
1574            P: IsA<RTSPMedia>,
1575            F: Fn(&P) + Send + Sync + 'static,
1576        >(
1577            this: *mut ffi::GstRTSPMedia,
1578            _param_spec: glib::ffi::gpointer,
1579            f: glib::ffi::gpointer,
1580        ) {
1581            unsafe {
1582                let f: &F = &*(f as *const F);
1583                f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
1584            }
1585        }
1586        unsafe {
1587            let f: Box_<F> = Box_::new(f);
1588            connect_raw(
1589                self.as_ptr() as *mut _,
1590                c"notify::transport-mode".as_ptr(),
1591                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1592                    notify_transport_mode_trampoline::<Self, F> as *const (),
1593                )),
1594                Box_::into_raw(f),
1595            )
1596        }
1597    }
1598}
1599
1600impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {}