gstreamer_rtsp_server/auto/
rtsp_client.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
6#[cfg(feature = "v1_18")]
7#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
8use crate::RTSPStreamTransport;
9use crate::{
10    ffi, RTSPAuth, RTSPContext, RTSPFilterResult, RTSPMountPoints, RTSPSession, RTSPSessionPool,
11    RTSPThreadPool,
12};
13use glib::{
14    object::ObjectType as _,
15    prelude::*,
16    signal::{connect_raw, SignalHandlerId},
17    translate::*,
18};
19use std::boxed::Box as Box_;
20
21glib::wrapper! {
22    /// The client object represents the connection and its state with a client.
23    ///
24    /// ## Properties
25    ///
26    ///
27    /// #### `drop-backlog`
28    ///  Readable | Writeable
29    ///
30    ///
31    /// #### `mount-points`
32    ///  Readable | Writeable
33    ///
34    ///
35    /// #### `post-session-timeout`
36    ///  Readable | Writeable
37    ///
38    ///
39    /// #### `session-pool`
40    ///  Readable | Writeable
41    ///
42    /// ## Signals
43    ///
44    ///
45    /// #### `announce-request`
46    ///
47    ///
48    ///
49    /// #### `check-requirements`
50    ///
51    ///
52    ///
53    /// #### `closed`
54    ///
55    ///
56    ///
57    /// #### `describe-request`
58    ///
59    ///
60    ///
61    /// #### `get-parameter-request`
62    ///
63    ///
64    ///
65    /// #### `handle-response`
66    ///
67    ///
68    ///
69    /// #### `new-session`
70    ///
71    ///
72    ///
73    /// #### `options-request`
74    ///
75    ///
76    ///
77    /// #### `pause-request`
78    ///
79    ///
80    ///
81    /// #### `play-request`
82    ///
83    ///
84    ///
85    /// #### `pre-announce-request`
86    ///
87    ///
88    ///
89    /// #### `pre-describe-request`
90    ///
91    ///
92    ///
93    /// #### `pre-get-parameter-request`
94    ///
95    ///
96    ///
97    /// #### `pre-options-request`
98    ///
99    ///
100    ///
101    /// #### `pre-pause-request`
102    ///
103    ///
104    ///
105    /// #### `pre-play-request`
106    ///
107    ///
108    ///
109    /// #### `pre-record-request`
110    ///
111    ///
112    ///
113    /// #### `pre-set-parameter-request`
114    ///
115    ///
116    ///
117    /// #### `pre-setup-request`
118    ///
119    ///
120    ///
121    /// #### `pre-teardown-request`
122    ///
123    ///
124    ///
125    /// #### `record-request`
126    ///
127    ///
128    ///
129    /// #### `send-message`
130    ///
131    ///
132    ///
133    /// #### `set-parameter-request`
134    ///
135    ///
136    ///
137    /// #### `setup-request`
138    ///
139    ///
140    ///
141    /// #### `teardown-request`
142    ///
143    ///
144    /// # Implements
145    ///
146    /// [`RTSPClientExt`][trait@crate::prelude::RTSPClientExt], [`trait@glib::ObjectExt`], [`RTSPClientExtManual`][trait@crate::prelude::RTSPClientExtManual]
147    #[doc(alias = "GstRTSPClient")]
148    pub struct RTSPClient(Object<ffi::GstRTSPClient, ffi::GstRTSPClientClass>);
149
150    match fn {
151        type_ => || ffi::gst_rtsp_client_get_type(),
152    }
153}
154
155impl RTSPClient {
156    pub const NONE: Option<&'static RTSPClient> = None;
157
158    /// Create a new [`RTSPClient`][crate::RTSPClient] instance.
159    ///
160    /// # Returns
161    ///
162    /// a new [`RTSPClient`][crate::RTSPClient]
163    #[doc(alias = "gst_rtsp_client_new")]
164    pub fn new() -> RTSPClient {
165        assert_initialized_main_thread!();
166        unsafe { from_glib_full(ffi::gst_rtsp_client_new()) }
167    }
168}
169
170impl Default for RTSPClient {
171    fn default() -> Self {
172        Self::new()
173    }
174}
175
176unsafe impl Send for RTSPClient {}
177unsafe impl Sync for RTSPClient {}
178
179mod sealed {
180    pub trait Sealed {}
181    impl<T: super::IsA<super::RTSPClient>> Sealed for T {}
182}
183
184/// Trait containing all [`struct@RTSPClient`] methods.
185///
186/// # Implementors
187///
188/// [`RTSPClient`][struct@crate::RTSPClient], [`RTSPOnvifClient`][struct@crate::RTSPOnvifClient]
189pub trait RTSPClientExt: IsA<RTSPClient> + sealed::Sealed + 'static {
190    /// Close the connection of `self` and remove all media it was managing.
191    #[doc(alias = "gst_rtsp_client_close")]
192    fn close(&self) {
193        unsafe {
194            ffi::gst_rtsp_client_close(self.as_ref().to_glib_none().0);
195        }
196    }
197
198    /// Get the [`RTSPAuth`][crate::RTSPAuth] used as the authentication manager of `self`.
199    ///
200    /// # Returns
201    ///
202    /// the [`RTSPAuth`][crate::RTSPAuth] of `self`.
203    /// `g_object_unref()` after usage.
204    #[doc(alias = "gst_rtsp_client_get_auth")]
205    #[doc(alias = "get_auth")]
206    fn auth(&self) -> Option<RTSPAuth> {
207        unsafe {
208            from_glib_full(ffi::gst_rtsp_client_get_auth(
209                self.as_ref().to_glib_none().0,
210            ))
211        }
212    }
213
214    //#[doc(alias = "gst_rtsp_client_get_connection")]
215    //#[doc(alias = "get_connection")]
216    //fn connection(&self) -> /*Ignored*/Option<gst_rtsp::RTSPConnection> {
217    //    unsafe { TODO: call ffi:gst_rtsp_client_get_connection() }
218    //}
219
220    /// Get the Content-Length limit of `self`.
221    ///
222    /// # Returns
223    ///
224    /// the Content-Length limit.
225    #[cfg(feature = "v1_18")]
226    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
227    #[doc(alias = "gst_rtsp_client_get_content_length_limit")]
228    #[doc(alias = "get_content_length_limit")]
229    fn content_length_limit(&self) -> u32 {
230        unsafe { ffi::gst_rtsp_client_get_content_length_limit(self.as_ref().to_glib_none().0) }
231    }
232
233    /// Get the [`RTSPMountPoints`][crate::RTSPMountPoints] object that `self` uses to manage its sessions.
234    ///
235    /// # Returns
236    ///
237    /// a [`RTSPMountPoints`][crate::RTSPMountPoints], unref after usage.
238    #[doc(alias = "gst_rtsp_client_get_mount_points")]
239    #[doc(alias = "get_mount_points")]
240    #[doc(alias = "mount-points")]
241    fn mount_points(&self) -> Option<RTSPMountPoints> {
242        unsafe {
243            from_glib_full(ffi::gst_rtsp_client_get_mount_points(
244                self.as_ref().to_glib_none().0,
245            ))
246        }
247    }
248
249    /// Get the [`RTSPSessionPool`][crate::RTSPSessionPool] object that `self` uses to manage its sessions.
250    ///
251    /// # Returns
252    ///
253    /// a [`RTSPSessionPool`][crate::RTSPSessionPool], unref after usage.
254    #[doc(alias = "gst_rtsp_client_get_session_pool")]
255    #[doc(alias = "get_session_pool")]
256    #[doc(alias = "session-pool")]
257    fn session_pool(&self) -> Option<RTSPSessionPool> {
258        unsafe {
259            from_glib_full(ffi::gst_rtsp_client_get_session_pool(
260                self.as_ref().to_glib_none().0,
261            ))
262        }
263    }
264
265    /// This is useful when providing a send function through
266    /// `gst_rtsp_client_set_send_func()` when doing RTSP over TCP:
267    /// the send function must call gst_rtsp_stream_transport_message_sent ()
268    /// on the appropriate transport when data has been received for streaming
269    /// to continue.
270    ///
271    /// # Returns
272    ///
273    /// the [`RTSPStreamTransport`][crate::RTSPStreamTransport] associated with `channel`.
274    #[cfg(feature = "v1_18")]
275    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
276    #[doc(alias = "gst_rtsp_client_get_stream_transport")]
277    #[doc(alias = "get_stream_transport")]
278    fn stream_transport(&self, channel: u8) -> Option<RTSPStreamTransport> {
279        unsafe {
280            from_glib_none(ffi::gst_rtsp_client_get_stream_transport(
281                self.as_ref().to_glib_none().0,
282                channel,
283            ))
284        }
285    }
286
287    /// Get the [`RTSPThreadPool`][crate::RTSPThreadPool] used as the thread pool of `self`.
288    ///
289    /// # Returns
290    ///
291    /// the [`RTSPThreadPool`][crate::RTSPThreadPool] of `self`. `g_object_unref()` after
292    /// usage.
293    #[doc(alias = "gst_rtsp_client_get_thread_pool")]
294    #[doc(alias = "get_thread_pool")]
295    fn thread_pool(&self) -> Option<RTSPThreadPool> {
296        unsafe {
297            from_glib_full(ffi::gst_rtsp_client_get_thread_pool(
298                self.as_ref().to_glib_none().0,
299            ))
300        }
301    }
302
303    //#[doc(alias = "gst_rtsp_client_handle_message")]
304    //fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult {
305    //    unsafe { TODO: call ffi:gst_rtsp_client_handle_message() }
306    //}
307
308    //#[doc(alias = "gst_rtsp_client_send_message")]
309    //fn send_message(&self, session: Option<&impl IsA<RTSPSession>>, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult {
310    //    unsafe { TODO: call ffi:gst_rtsp_client_send_message() }
311    //}
312
313    /// Call `func` for each session managed by `self`. The result value of `func`
314    /// determines what happens to the session. `func` will be called with `self`
315    /// locked so no further actions on `self` can be performed from `func`.
316    ///
317    /// If `func` returns [`RTSPFilterResult::Remove`][crate::RTSPFilterResult::Remove], the session will be removed from
318    /// `self`.
319    ///
320    /// If `func` returns [`RTSPFilterResult::Keep`][crate::RTSPFilterResult::Keep], the session will remain in `self`.
321    ///
322    /// If `func` returns [`RTSPFilterResult::Ref`][crate::RTSPFilterResult::Ref], the session will remain in `self` but
323    /// will also be added with an additional ref to the result `GList` of this
324    /// function..
325    ///
326    /// When `func` is [`None`], [`RTSPFilterResult::Ref`][crate::RTSPFilterResult::Ref] will be assumed for each session.
327    /// ## `func`
328    /// a callback
329    ///
330    /// # Returns
331    ///
332    /// a `GList` with all
333    /// sessions for which `func` returned [`RTSPFilterResult::Ref`][crate::RTSPFilterResult::Ref]. After usage, each
334    /// element in the `GList` should be unreffed before the list is freed.
335    #[doc(alias = "gst_rtsp_client_session_filter")]
336    fn session_filter(
337        &self,
338        func: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>,
339    ) -> Vec<RTSPSession> {
340        let mut func_data: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)> =
341            func;
342        unsafe extern "C" fn func_func(
343            client: *mut ffi::GstRTSPClient,
344            sess: *mut ffi::GstRTSPSession,
345            user_data: glib::ffi::gpointer,
346        ) -> ffi::GstRTSPFilterResult {
347            let client = from_glib_borrow(client);
348            let sess = from_glib_borrow(sess);
349            let callback = user_data
350                as *mut Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>;
351            if let Some(ref mut callback) = *callback {
352                callback(&client, &sess)
353            } else {
354                panic!("cannot get closure...")
355            }
356            .into_glib()
357        }
358        let func = if func_data.is_some() {
359            Some(func_func as _)
360        } else {
361            None
362        };
363        let super_callback0: &mut Option<
364            &mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult),
365        > = &mut func_data;
366        unsafe {
367            FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_client_session_filter(
368                self.as_ref().to_glib_none().0,
369                func,
370                super_callback0 as *mut _ as *mut _,
371            ))
372        }
373    }
374
375    /// configure `auth` to be used as the authentication manager of `self`.
376    /// ## `auth`
377    /// a [`RTSPAuth`][crate::RTSPAuth]
378    #[doc(alias = "gst_rtsp_client_set_auth")]
379    fn set_auth(&self, auth: Option<&impl IsA<RTSPAuth>>) {
380        unsafe {
381            ffi::gst_rtsp_client_set_auth(
382                self.as_ref().to_glib_none().0,
383                auth.map(|p| p.as_ref()).to_glib_none().0,
384            );
385        }
386    }
387
388    //#[doc(alias = "gst_rtsp_client_set_connection")]
389    //fn set_connection(&self, conn: /*Ignored*/gst_rtsp::RTSPConnection) -> bool {
390    //    unsafe { TODO: call ffi:gst_rtsp_client_set_connection() }
391    //}
392
393    /// Configure `self` to use the specified Content-Length limit.
394    ///
395    /// Define an appropriate request size limit and reject requests exceeding the
396    /// limit with response status 413 Request Entity Too Large
397    /// ## `limit`
398    /// Content-Length limit
399    #[cfg(feature = "v1_18")]
400    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
401    #[doc(alias = "gst_rtsp_client_set_content_length_limit")]
402    fn set_content_length_limit(&self, limit: u32) {
403        unsafe {
404            ffi::gst_rtsp_client_set_content_length_limit(self.as_ref().to_glib_none().0, limit);
405        }
406    }
407
408    /// Set `mounts` as the mount points for `self` which it will use to map urls
409    /// to media streams. These mount points are usually inherited from the server that
410    /// created the client but can be overriden later.
411    /// ## `mounts`
412    /// a [`RTSPMountPoints`][crate::RTSPMountPoints]
413    #[doc(alias = "gst_rtsp_client_set_mount_points")]
414    #[doc(alias = "mount-points")]
415    fn set_mount_points(&self, mounts: Option<&impl IsA<RTSPMountPoints>>) {
416        unsafe {
417            ffi::gst_rtsp_client_set_mount_points(
418                self.as_ref().to_glib_none().0,
419                mounts.map(|p| p.as_ref()).to_glib_none().0,
420            );
421        }
422    }
423
424    //#[cfg(feature = "v1_16")]
425    //#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
426    //#[doc(alias = "gst_rtsp_client_set_send_messages_func")]
427    //fn set_send_messages_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, u32, bool) -> bool, user_data: /*Unimplemented*/Option<Basic: Pointer>) {
428    //    unsafe { TODO: call ffi:gst_rtsp_client_set_send_messages_func() }
429    //}
430
431    /// Set `pool` as the sessionpool for `self` which it will use to find
432    /// or allocate sessions. the sessionpool is usually inherited from the server
433    /// that created the client but can be overridden later.
434    /// ## `pool`
435    /// a [`RTSPSessionPool`][crate::RTSPSessionPool]
436    #[doc(alias = "gst_rtsp_client_set_session_pool")]
437    #[doc(alias = "session-pool")]
438    fn set_session_pool(&self, pool: Option<&impl IsA<RTSPSessionPool>>) {
439        unsafe {
440            ffi::gst_rtsp_client_set_session_pool(
441                self.as_ref().to_glib_none().0,
442                pool.map(|p| p.as_ref()).to_glib_none().0,
443            );
444        }
445    }
446
447    /// configure `pool` to be used as the thread pool of `self`.
448    /// ## `pool`
449    /// a [`RTSPThreadPool`][crate::RTSPThreadPool]
450    #[doc(alias = "gst_rtsp_client_set_thread_pool")]
451    fn set_thread_pool(&self, pool: Option<&impl IsA<RTSPThreadPool>>) {
452        unsafe {
453            ffi::gst_rtsp_client_set_thread_pool(
454                self.as_ref().to_glib_none().0,
455                pool.map(|p| p.as_ref()).to_glib_none().0,
456            );
457        }
458    }
459
460    #[doc(alias = "drop-backlog")]
461    fn is_drop_backlog(&self) -> bool {
462        ObjectExt::property(self.as_ref(), "drop-backlog")
463    }
464
465    #[doc(alias = "drop-backlog")]
466    fn set_drop_backlog(&self, drop_backlog: bool) {
467        ObjectExt::set_property(self.as_ref(), "drop-backlog", drop_backlog)
468    }
469
470    #[doc(alias = "post-session-timeout")]
471    fn post_session_timeout(&self) -> i32 {
472        ObjectExt::property(self.as_ref(), "post-session-timeout")
473    }
474
475    #[doc(alias = "post-session-timeout")]
476    fn set_post_session_timeout(&self, post_session_timeout: i32) {
477        ObjectExt::set_property(self.as_ref(), "post-session-timeout", post_session_timeout)
478    }
479
480    /// ## `ctx`
481    /// a [`RTSPContext`][crate::RTSPContext]
482    #[doc(alias = "announce-request")]
483    fn connect_announce_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
484        &self,
485        f: F,
486    ) -> SignalHandlerId {
487        unsafe extern "C" fn announce_request_trampoline<
488            P: IsA<RTSPClient>,
489            F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
490        >(
491            this: *mut ffi::GstRTSPClient,
492            ctx: *mut ffi::GstRTSPContext,
493            f: glib::ffi::gpointer,
494        ) {
495            let f: &F = &*(f as *const F);
496            f(
497                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
498                &from_glib_borrow(ctx),
499            )
500        }
501        unsafe {
502            let f: Box_<F> = Box_::new(f);
503            connect_raw(
504                self.as_ptr() as *mut _,
505                b"announce-request\0".as_ptr() as *const _,
506                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
507                    announce_request_trampoline::<Self, F> as *const (),
508                )),
509                Box_::into_raw(f),
510            )
511        }
512    }
513
514    //#[doc(alias = "check-requirements")]
515    //fn connect_check_requirements<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
516    //    Empty ctype arr: *.CArray TypeId { ns_id: 0, id: 28 }
517    //}
518
519    #[doc(alias = "closed")]
520    fn connect_closed<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
521        unsafe extern "C" fn closed_trampoline<
522            P: IsA<RTSPClient>,
523            F: Fn(&P) + Send + Sync + 'static,
524        >(
525            this: *mut ffi::GstRTSPClient,
526            f: glib::ffi::gpointer,
527        ) {
528            let f: &F = &*(f as *const F);
529            f(RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
530        }
531        unsafe {
532            let f: Box_<F> = Box_::new(f);
533            connect_raw(
534                self.as_ptr() as *mut _,
535                b"closed\0".as_ptr() as *const _,
536                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
537                    closed_trampoline::<Self, F> as *const (),
538                )),
539                Box_::into_raw(f),
540            )
541        }
542    }
543
544    /// ## `ctx`
545    /// a [`RTSPContext`][crate::RTSPContext]
546    #[doc(alias = "describe-request")]
547    fn connect_describe_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
548        &self,
549        f: F,
550    ) -> SignalHandlerId {
551        unsafe extern "C" fn describe_request_trampoline<
552            P: IsA<RTSPClient>,
553            F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
554        >(
555            this: *mut ffi::GstRTSPClient,
556            ctx: *mut ffi::GstRTSPContext,
557            f: glib::ffi::gpointer,
558        ) {
559            let f: &F = &*(f as *const F);
560            f(
561                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
562                &from_glib_borrow(ctx),
563            )
564        }
565        unsafe {
566            let f: Box_<F> = Box_::new(f);
567            connect_raw(
568                self.as_ptr() as *mut _,
569                b"describe-request\0".as_ptr() as *const _,
570                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
571                    describe_request_trampoline::<Self, F> as *const (),
572                )),
573                Box_::into_raw(f),
574            )
575        }
576    }
577
578    /// ## `ctx`
579    /// a [`RTSPContext`][crate::RTSPContext]
580    #[doc(alias = "get-parameter-request")]
581    fn connect_get_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
582        &self,
583        f: F,
584    ) -> SignalHandlerId {
585        unsafe extern "C" fn get_parameter_request_trampoline<
586            P: IsA<RTSPClient>,
587            F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
588        >(
589            this: *mut ffi::GstRTSPClient,
590            ctx: *mut ffi::GstRTSPContext,
591            f: glib::ffi::gpointer,
592        ) {
593            let f: &F = &*(f as *const F);
594            f(
595                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
596                &from_glib_borrow(ctx),
597            )
598        }
599        unsafe {
600            let f: Box_<F> = Box_::new(f);
601            connect_raw(
602                self.as_ptr() as *mut _,
603                b"get-parameter-request\0".as_ptr() as *const _,
604                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
605                    get_parameter_request_trampoline::<Self, F> as *const (),
606                )),
607                Box_::into_raw(f),
608            )
609        }
610    }
611
612    /// ## `ctx`
613    /// a [`RTSPContext`][crate::RTSPContext]
614    #[doc(alias = "handle-response")]
615    fn connect_handle_response<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
616        &self,
617        f: F,
618    ) -> SignalHandlerId {
619        unsafe extern "C" fn handle_response_trampoline<
620            P: IsA<RTSPClient>,
621            F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
622        >(
623            this: *mut ffi::GstRTSPClient,
624            ctx: *mut ffi::GstRTSPContext,
625            f: glib::ffi::gpointer,
626        ) {
627            let f: &F = &*(f as *const F);
628            f(
629                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
630                &from_glib_borrow(ctx),
631            )
632        }
633        unsafe {
634            let f: Box_<F> = Box_::new(f);
635            connect_raw(
636                self.as_ptr() as *mut _,
637                b"handle-response\0".as_ptr() as *const _,
638                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
639                    handle_response_trampoline::<Self, F> as *const (),
640                )),
641                Box_::into_raw(f),
642            )
643        }
644    }
645
646    #[doc(alias = "new-session")]
647    fn connect_new_session<F: Fn(&Self, &RTSPSession) + Send + Sync + 'static>(
648        &self,
649        f: F,
650    ) -> SignalHandlerId {
651        unsafe extern "C" fn new_session_trampoline<
652            P: IsA<RTSPClient>,
653            F: Fn(&P, &RTSPSession) + Send + Sync + 'static,
654        >(
655            this: *mut ffi::GstRTSPClient,
656            object: *mut ffi::GstRTSPSession,
657            f: glib::ffi::gpointer,
658        ) {
659            let f: &F = &*(f as *const F);
660            f(
661                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
662                &from_glib_borrow(object),
663            )
664        }
665        unsafe {
666            let f: Box_<F> = Box_::new(f);
667            connect_raw(
668                self.as_ptr() as *mut _,
669                b"new-session\0".as_ptr() as *const _,
670                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
671                    new_session_trampoline::<Self, F> as *const (),
672                )),
673                Box_::into_raw(f),
674            )
675        }
676    }
677
678    /// ## `ctx`
679    /// a [`RTSPContext`][crate::RTSPContext]
680    #[doc(alias = "options-request")]
681    fn connect_options_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
682        &self,
683        f: F,
684    ) -> SignalHandlerId {
685        unsafe extern "C" fn options_request_trampoline<
686            P: IsA<RTSPClient>,
687            F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
688        >(
689            this: *mut ffi::GstRTSPClient,
690            ctx: *mut ffi::GstRTSPContext,
691            f: glib::ffi::gpointer,
692        ) {
693            let f: &F = &*(f as *const F);
694            f(
695                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
696                &from_glib_borrow(ctx),
697            )
698        }
699        unsafe {
700            let f: Box_<F> = Box_::new(f);
701            connect_raw(
702                self.as_ptr() as *mut _,
703                b"options-request\0".as_ptr() as *const _,
704                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
705                    options_request_trampoline::<Self, F> as *const (),
706                )),
707                Box_::into_raw(f),
708            )
709        }
710    }
711
712    /// ## `ctx`
713    /// a [`RTSPContext`][crate::RTSPContext]
714    #[doc(alias = "pause-request")]
715    fn connect_pause_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
716        &self,
717        f: F,
718    ) -> SignalHandlerId {
719        unsafe extern "C" fn pause_request_trampoline<
720            P: IsA<RTSPClient>,
721            F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
722        >(
723            this: *mut ffi::GstRTSPClient,
724            ctx: *mut ffi::GstRTSPContext,
725            f: glib::ffi::gpointer,
726        ) {
727            let f: &F = &*(f as *const F);
728            f(
729                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
730                &from_glib_borrow(ctx),
731            )
732        }
733        unsafe {
734            let f: Box_<F> = Box_::new(f);
735            connect_raw(
736                self.as_ptr() as *mut _,
737                b"pause-request\0".as_ptr() as *const _,
738                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
739                    pause_request_trampoline::<Self, F> as *const (),
740                )),
741                Box_::into_raw(f),
742            )
743        }
744    }
745
746    /// ## `ctx`
747    /// a [`RTSPContext`][crate::RTSPContext]
748    #[doc(alias = "play-request")]
749    fn connect_play_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
750        &self,
751        f: F,
752    ) -> SignalHandlerId {
753        unsafe extern "C" fn play_request_trampoline<
754            P: IsA<RTSPClient>,
755            F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
756        >(
757            this: *mut ffi::GstRTSPClient,
758            ctx: *mut ffi::GstRTSPContext,
759            f: glib::ffi::gpointer,
760        ) {
761            let f: &F = &*(f as *const F);
762            f(
763                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
764                &from_glib_borrow(ctx),
765            )
766        }
767        unsafe {
768            let f: Box_<F> = Box_::new(f);
769            connect_raw(
770                self.as_ptr() as *mut _,
771                b"play-request\0".as_ptr() as *const _,
772                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
773                    play_request_trampoline::<Self, F> as *const (),
774                )),
775                Box_::into_raw(f),
776            )
777        }
778    }
779
780    /// ## `ctx`
781    /// a [`RTSPContext`][crate::RTSPContext]
782    ///
783    /// # Returns
784    ///
785    /// a [`gst_rtsp::RTSPStatusCode`][crate::gst_rtsp::RTSPStatusCode], GST_RTSP_STS_OK in case of success,
786    ///  otherwise an appropriate return code
787    #[doc(alias = "pre-announce-request")]
788    fn connect_pre_announce_request<
789        F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
790    >(
791        &self,
792        f: F,
793    ) -> SignalHandlerId {
794        unsafe extern "C" fn pre_announce_request_trampoline<
795            P: IsA<RTSPClient>,
796            F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
797        >(
798            this: *mut ffi::GstRTSPClient,
799            ctx: *mut ffi::GstRTSPContext,
800            f: glib::ffi::gpointer,
801        ) -> gst_rtsp::ffi::GstRTSPStatusCode {
802            let f: &F = &*(f as *const F);
803            f(
804                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
805                &from_glib_borrow(ctx),
806            )
807            .into_glib()
808        }
809        unsafe {
810            let f: Box_<F> = Box_::new(f);
811            connect_raw(
812                self.as_ptr() as *mut _,
813                b"pre-announce-request\0".as_ptr() as *const _,
814                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
815                    pre_announce_request_trampoline::<Self, F> as *const (),
816                )),
817                Box_::into_raw(f),
818            )
819        }
820    }
821
822    /// ## `ctx`
823    /// a [`RTSPContext`][crate::RTSPContext]
824    ///
825    /// # Returns
826    ///
827    /// a [`gst_rtsp::RTSPStatusCode`][crate::gst_rtsp::RTSPStatusCode], GST_RTSP_STS_OK in case of success,
828    ///  otherwise an appropriate return code
829    #[doc(alias = "pre-describe-request")]
830    fn connect_pre_describe_request<
831        F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
832    >(
833        &self,
834        f: F,
835    ) -> SignalHandlerId {
836        unsafe extern "C" fn pre_describe_request_trampoline<
837            P: IsA<RTSPClient>,
838            F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
839        >(
840            this: *mut ffi::GstRTSPClient,
841            ctx: *mut ffi::GstRTSPContext,
842            f: glib::ffi::gpointer,
843        ) -> gst_rtsp::ffi::GstRTSPStatusCode {
844            let f: &F = &*(f as *const F);
845            f(
846                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
847                &from_glib_borrow(ctx),
848            )
849            .into_glib()
850        }
851        unsafe {
852            let f: Box_<F> = Box_::new(f);
853            connect_raw(
854                self.as_ptr() as *mut _,
855                b"pre-describe-request\0".as_ptr() as *const _,
856                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
857                    pre_describe_request_trampoline::<Self, F> as *const (),
858                )),
859                Box_::into_raw(f),
860            )
861        }
862    }
863
864    /// ## `ctx`
865    /// a [`RTSPContext`][crate::RTSPContext]
866    ///
867    /// # Returns
868    ///
869    /// a [`gst_rtsp::RTSPStatusCode`][crate::gst_rtsp::RTSPStatusCode], GST_RTSP_STS_OK in case of success,
870    ///  otherwise an appropriate return code
871    #[doc(alias = "pre-get-parameter-request")]
872    fn connect_pre_get_parameter_request<
873        F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
874    >(
875        &self,
876        f: F,
877    ) -> SignalHandlerId {
878        unsafe extern "C" fn pre_get_parameter_request_trampoline<
879            P: IsA<RTSPClient>,
880            F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
881        >(
882            this: *mut ffi::GstRTSPClient,
883            ctx: *mut ffi::GstRTSPContext,
884            f: glib::ffi::gpointer,
885        ) -> gst_rtsp::ffi::GstRTSPStatusCode {
886            let f: &F = &*(f as *const F);
887            f(
888                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
889                &from_glib_borrow(ctx),
890            )
891            .into_glib()
892        }
893        unsafe {
894            let f: Box_<F> = Box_::new(f);
895            connect_raw(
896                self.as_ptr() as *mut _,
897                b"pre-get-parameter-request\0".as_ptr() as *const _,
898                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
899                    pre_get_parameter_request_trampoline::<Self, F> as *const (),
900                )),
901                Box_::into_raw(f),
902            )
903        }
904    }
905
906    /// ## `ctx`
907    /// a [`RTSPContext`][crate::RTSPContext]
908    ///
909    /// # Returns
910    ///
911    /// a [`gst_rtsp::RTSPStatusCode`][crate::gst_rtsp::RTSPStatusCode], GST_RTSP_STS_OK in case of success,
912    ///  otherwise an appropriate return code
913    #[doc(alias = "pre-options-request")]
914    fn connect_pre_options_request<
915        F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
916    >(
917        &self,
918        f: F,
919    ) -> SignalHandlerId {
920        unsafe extern "C" fn pre_options_request_trampoline<
921            P: IsA<RTSPClient>,
922            F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
923        >(
924            this: *mut ffi::GstRTSPClient,
925            ctx: *mut ffi::GstRTSPContext,
926            f: glib::ffi::gpointer,
927        ) -> gst_rtsp::ffi::GstRTSPStatusCode {
928            let f: &F = &*(f as *const F);
929            f(
930                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
931                &from_glib_borrow(ctx),
932            )
933            .into_glib()
934        }
935        unsafe {
936            let f: Box_<F> = Box_::new(f);
937            connect_raw(
938                self.as_ptr() as *mut _,
939                b"pre-options-request\0".as_ptr() as *const _,
940                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
941                    pre_options_request_trampoline::<Self, F> as *const (),
942                )),
943                Box_::into_raw(f),
944            )
945        }
946    }
947
948    /// ## `ctx`
949    /// a [`RTSPContext`][crate::RTSPContext]
950    ///
951    /// # Returns
952    ///
953    /// a [`gst_rtsp::RTSPStatusCode`][crate::gst_rtsp::RTSPStatusCode], GST_RTSP_STS_OK in case of success,
954    ///  otherwise an appropriate return code
955    #[doc(alias = "pre-pause-request")]
956    fn connect_pre_pause_request<
957        F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
958    >(
959        &self,
960        f: F,
961    ) -> SignalHandlerId {
962        unsafe extern "C" fn pre_pause_request_trampoline<
963            P: IsA<RTSPClient>,
964            F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
965        >(
966            this: *mut ffi::GstRTSPClient,
967            ctx: *mut ffi::GstRTSPContext,
968            f: glib::ffi::gpointer,
969        ) -> gst_rtsp::ffi::GstRTSPStatusCode {
970            let f: &F = &*(f as *const F);
971            f(
972                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
973                &from_glib_borrow(ctx),
974            )
975            .into_glib()
976        }
977        unsafe {
978            let f: Box_<F> = Box_::new(f);
979            connect_raw(
980                self.as_ptr() as *mut _,
981                b"pre-pause-request\0".as_ptr() as *const _,
982                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
983                    pre_pause_request_trampoline::<Self, F> as *const (),
984                )),
985                Box_::into_raw(f),
986            )
987        }
988    }
989
990    /// ## `ctx`
991    /// a [`RTSPContext`][crate::RTSPContext]
992    ///
993    /// # Returns
994    ///
995    /// a [`gst_rtsp::RTSPStatusCode`][crate::gst_rtsp::RTSPStatusCode], GST_RTSP_STS_OK in case of success,
996    ///  otherwise an appropriate return code
997    #[doc(alias = "pre-play-request")]
998    fn connect_pre_play_request<
999        F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
1000    >(
1001        &self,
1002        f: F,
1003    ) -> SignalHandlerId {
1004        unsafe extern "C" fn pre_play_request_trampoline<
1005            P: IsA<RTSPClient>,
1006            F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
1007        >(
1008            this: *mut ffi::GstRTSPClient,
1009            ctx: *mut ffi::GstRTSPContext,
1010            f: glib::ffi::gpointer,
1011        ) -> gst_rtsp::ffi::GstRTSPStatusCode {
1012            let f: &F = &*(f as *const F);
1013            f(
1014                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
1015                &from_glib_borrow(ctx),
1016            )
1017            .into_glib()
1018        }
1019        unsafe {
1020            let f: Box_<F> = Box_::new(f);
1021            connect_raw(
1022                self.as_ptr() as *mut _,
1023                b"pre-play-request\0".as_ptr() as *const _,
1024                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1025                    pre_play_request_trampoline::<Self, F> as *const (),
1026                )),
1027                Box_::into_raw(f),
1028            )
1029        }
1030    }
1031
1032    /// ## `ctx`
1033    /// a [`RTSPContext`][crate::RTSPContext]
1034    ///
1035    /// # Returns
1036    ///
1037    /// a [`gst_rtsp::RTSPStatusCode`][crate::gst_rtsp::RTSPStatusCode], GST_RTSP_STS_OK in case of success,
1038    ///  otherwise an appropriate return code
1039    #[doc(alias = "pre-record-request")]
1040    fn connect_pre_record_request<
1041        F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
1042    >(
1043        &self,
1044        f: F,
1045    ) -> SignalHandlerId {
1046        unsafe extern "C" fn pre_record_request_trampoline<
1047            P: IsA<RTSPClient>,
1048            F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
1049        >(
1050            this: *mut ffi::GstRTSPClient,
1051            ctx: *mut ffi::GstRTSPContext,
1052            f: glib::ffi::gpointer,
1053        ) -> gst_rtsp::ffi::GstRTSPStatusCode {
1054            let f: &F = &*(f as *const F);
1055            f(
1056                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
1057                &from_glib_borrow(ctx),
1058            )
1059            .into_glib()
1060        }
1061        unsafe {
1062            let f: Box_<F> = Box_::new(f);
1063            connect_raw(
1064                self.as_ptr() as *mut _,
1065                b"pre-record-request\0".as_ptr() as *const _,
1066                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1067                    pre_record_request_trampoline::<Self, F> as *const (),
1068                )),
1069                Box_::into_raw(f),
1070            )
1071        }
1072    }
1073
1074    /// ## `ctx`
1075    /// a [`RTSPContext`][crate::RTSPContext]
1076    ///
1077    /// # Returns
1078    ///
1079    /// a [`gst_rtsp::RTSPStatusCode`][crate::gst_rtsp::RTSPStatusCode], GST_RTSP_STS_OK in case of success,
1080    ///  otherwise an appropriate return code
1081    #[doc(alias = "pre-set-parameter-request")]
1082    fn connect_pre_set_parameter_request<
1083        F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
1084    >(
1085        &self,
1086        f: F,
1087    ) -> SignalHandlerId {
1088        unsafe extern "C" fn pre_set_parameter_request_trampoline<
1089            P: IsA<RTSPClient>,
1090            F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
1091        >(
1092            this: *mut ffi::GstRTSPClient,
1093            ctx: *mut ffi::GstRTSPContext,
1094            f: glib::ffi::gpointer,
1095        ) -> gst_rtsp::ffi::GstRTSPStatusCode {
1096            let f: &F = &*(f as *const F);
1097            f(
1098                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
1099                &from_glib_borrow(ctx),
1100            )
1101            .into_glib()
1102        }
1103        unsafe {
1104            let f: Box_<F> = Box_::new(f);
1105            connect_raw(
1106                self.as_ptr() as *mut _,
1107                b"pre-set-parameter-request\0".as_ptr() as *const _,
1108                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1109                    pre_set_parameter_request_trampoline::<Self, F> as *const (),
1110                )),
1111                Box_::into_raw(f),
1112            )
1113        }
1114    }
1115
1116    /// ## `ctx`
1117    /// a [`RTSPContext`][crate::RTSPContext]
1118    ///
1119    /// # Returns
1120    ///
1121    /// a [`gst_rtsp::RTSPStatusCode`][crate::gst_rtsp::RTSPStatusCode], GST_RTSP_STS_OK in case of success,
1122    ///  otherwise an appropriate return code
1123    #[doc(alias = "pre-setup-request")]
1124    fn connect_pre_setup_request<
1125        F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
1126    >(
1127        &self,
1128        f: F,
1129    ) -> SignalHandlerId {
1130        unsafe extern "C" fn pre_setup_request_trampoline<
1131            P: IsA<RTSPClient>,
1132            F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
1133        >(
1134            this: *mut ffi::GstRTSPClient,
1135            ctx: *mut ffi::GstRTSPContext,
1136            f: glib::ffi::gpointer,
1137        ) -> gst_rtsp::ffi::GstRTSPStatusCode {
1138            let f: &F = &*(f as *const F);
1139            f(
1140                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
1141                &from_glib_borrow(ctx),
1142            )
1143            .into_glib()
1144        }
1145        unsafe {
1146            let f: Box_<F> = Box_::new(f);
1147            connect_raw(
1148                self.as_ptr() as *mut _,
1149                b"pre-setup-request\0".as_ptr() as *const _,
1150                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1151                    pre_setup_request_trampoline::<Self, F> as *const (),
1152                )),
1153                Box_::into_raw(f),
1154            )
1155        }
1156    }
1157
1158    /// ## `ctx`
1159    /// a [`RTSPContext`][crate::RTSPContext]
1160    ///
1161    /// # Returns
1162    ///
1163    /// a [`gst_rtsp::RTSPStatusCode`][crate::gst_rtsp::RTSPStatusCode], GST_RTSP_STS_OK in case of success,
1164    ///  otherwise an appropriate return code
1165    #[doc(alias = "pre-teardown-request")]
1166    fn connect_pre_teardown_request<
1167        F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
1168    >(
1169        &self,
1170        f: F,
1171    ) -> SignalHandlerId {
1172        unsafe extern "C" fn pre_teardown_request_trampoline<
1173            P: IsA<RTSPClient>,
1174            F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
1175        >(
1176            this: *mut ffi::GstRTSPClient,
1177            ctx: *mut ffi::GstRTSPContext,
1178            f: glib::ffi::gpointer,
1179        ) -> gst_rtsp::ffi::GstRTSPStatusCode {
1180            let f: &F = &*(f as *const F);
1181            f(
1182                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
1183                &from_glib_borrow(ctx),
1184            )
1185            .into_glib()
1186        }
1187        unsafe {
1188            let f: Box_<F> = Box_::new(f);
1189            connect_raw(
1190                self.as_ptr() as *mut _,
1191                b"pre-teardown-request\0".as_ptr() as *const _,
1192                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1193                    pre_teardown_request_trampoline::<Self, F> as *const (),
1194                )),
1195                Box_::into_raw(f),
1196            )
1197        }
1198    }
1199
1200    /// ## `ctx`
1201    /// a [`RTSPContext`][crate::RTSPContext]
1202    #[doc(alias = "record-request")]
1203    fn connect_record_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
1204        &self,
1205        f: F,
1206    ) -> SignalHandlerId {
1207        unsafe extern "C" fn record_request_trampoline<
1208            P: IsA<RTSPClient>,
1209            F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
1210        >(
1211            this: *mut ffi::GstRTSPClient,
1212            ctx: *mut ffi::GstRTSPContext,
1213            f: glib::ffi::gpointer,
1214        ) {
1215            let f: &F = &*(f as *const F);
1216            f(
1217                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
1218                &from_glib_borrow(ctx),
1219            )
1220        }
1221        unsafe {
1222            let f: Box_<F> = Box_::new(f);
1223            connect_raw(
1224                self.as_ptr() as *mut _,
1225                b"record-request\0".as_ptr() as *const _,
1226                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1227                    record_request_trampoline::<Self, F> as *const (),
1228                )),
1229                Box_::into_raw(f),
1230            )
1231        }
1232    }
1233
1234    //#[doc(alias = "send-message")]
1235    //fn connect_send_message<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
1236    //    Ignored message: GstRtsp.RTSPMessage
1237    //}
1238
1239    /// ## `ctx`
1240    /// a [`RTSPContext`][crate::RTSPContext]
1241    #[doc(alias = "set-parameter-request")]
1242    fn connect_set_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
1243        &self,
1244        f: F,
1245    ) -> SignalHandlerId {
1246        unsafe extern "C" fn set_parameter_request_trampoline<
1247            P: IsA<RTSPClient>,
1248            F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
1249        >(
1250            this: *mut ffi::GstRTSPClient,
1251            ctx: *mut ffi::GstRTSPContext,
1252            f: glib::ffi::gpointer,
1253        ) {
1254            let f: &F = &*(f as *const F);
1255            f(
1256                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
1257                &from_glib_borrow(ctx),
1258            )
1259        }
1260        unsafe {
1261            let f: Box_<F> = Box_::new(f);
1262            connect_raw(
1263                self.as_ptr() as *mut _,
1264                b"set-parameter-request\0".as_ptr() as *const _,
1265                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1266                    set_parameter_request_trampoline::<Self, F> as *const (),
1267                )),
1268                Box_::into_raw(f),
1269            )
1270        }
1271    }
1272
1273    /// ## `ctx`
1274    /// a [`RTSPContext`][crate::RTSPContext]
1275    #[doc(alias = "setup-request")]
1276    fn connect_setup_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
1277        &self,
1278        f: F,
1279    ) -> SignalHandlerId {
1280        unsafe extern "C" fn setup_request_trampoline<
1281            P: IsA<RTSPClient>,
1282            F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
1283        >(
1284            this: *mut ffi::GstRTSPClient,
1285            ctx: *mut ffi::GstRTSPContext,
1286            f: glib::ffi::gpointer,
1287        ) {
1288            let f: &F = &*(f as *const F);
1289            f(
1290                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
1291                &from_glib_borrow(ctx),
1292            )
1293        }
1294        unsafe {
1295            let f: Box_<F> = Box_::new(f);
1296            connect_raw(
1297                self.as_ptr() as *mut _,
1298                b"setup-request\0".as_ptr() as *const _,
1299                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1300                    setup_request_trampoline::<Self, F> as *const (),
1301                )),
1302                Box_::into_raw(f),
1303            )
1304        }
1305    }
1306
1307    /// ## `ctx`
1308    /// a [`RTSPContext`][crate::RTSPContext]
1309    #[doc(alias = "teardown-request")]
1310    fn connect_teardown_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
1311        &self,
1312        f: F,
1313    ) -> SignalHandlerId {
1314        unsafe extern "C" fn teardown_request_trampoline<
1315            P: IsA<RTSPClient>,
1316            F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
1317        >(
1318            this: *mut ffi::GstRTSPClient,
1319            ctx: *mut ffi::GstRTSPContext,
1320            f: glib::ffi::gpointer,
1321        ) {
1322            let f: &F = &*(f as *const F);
1323            f(
1324                RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
1325                &from_glib_borrow(ctx),
1326            )
1327        }
1328        unsafe {
1329            let f: Box_<F> = Box_::new(f);
1330            connect_raw(
1331                self.as_ptr() as *mut _,
1332                b"teardown-request\0".as_ptr() as *const _,
1333                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1334                    teardown_request_trampoline::<Self, F> as *const (),
1335                )),
1336                Box_::into_raw(f),
1337            )
1338        }
1339    }
1340
1341    #[doc(alias = "drop-backlog")]
1342    fn connect_drop_backlog_notify<F: Fn(&Self) + Send + Sync + 'static>(
1343        &self,
1344        f: F,
1345    ) -> SignalHandlerId {
1346        unsafe extern "C" fn notify_drop_backlog_trampoline<
1347            P: IsA<RTSPClient>,
1348            F: Fn(&P) + Send + Sync + 'static,
1349        >(
1350            this: *mut ffi::GstRTSPClient,
1351            _param_spec: glib::ffi::gpointer,
1352            f: glib::ffi::gpointer,
1353        ) {
1354            let f: &F = &*(f as *const F);
1355            f(RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
1356        }
1357        unsafe {
1358            let f: Box_<F> = Box_::new(f);
1359            connect_raw(
1360                self.as_ptr() as *mut _,
1361                b"notify::drop-backlog\0".as_ptr() as *const _,
1362                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1363                    notify_drop_backlog_trampoline::<Self, F> as *const (),
1364                )),
1365                Box_::into_raw(f),
1366            )
1367        }
1368    }
1369
1370    #[doc(alias = "mount-points")]
1371    fn connect_mount_points_notify<F: Fn(&Self) + Send + Sync + 'static>(
1372        &self,
1373        f: F,
1374    ) -> SignalHandlerId {
1375        unsafe extern "C" fn notify_mount_points_trampoline<
1376            P: IsA<RTSPClient>,
1377            F: Fn(&P) + Send + Sync + 'static,
1378        >(
1379            this: *mut ffi::GstRTSPClient,
1380            _param_spec: glib::ffi::gpointer,
1381            f: glib::ffi::gpointer,
1382        ) {
1383            let f: &F = &*(f as *const F);
1384            f(RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
1385        }
1386        unsafe {
1387            let f: Box_<F> = Box_::new(f);
1388            connect_raw(
1389                self.as_ptr() as *mut _,
1390                b"notify::mount-points\0".as_ptr() as *const _,
1391                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1392                    notify_mount_points_trampoline::<Self, F> as *const (),
1393                )),
1394                Box_::into_raw(f),
1395            )
1396        }
1397    }
1398
1399    #[doc(alias = "post-session-timeout")]
1400    fn connect_post_session_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
1401        &self,
1402        f: F,
1403    ) -> SignalHandlerId {
1404        unsafe extern "C" fn notify_post_session_timeout_trampoline<
1405            P: IsA<RTSPClient>,
1406            F: Fn(&P) + Send + Sync + 'static,
1407        >(
1408            this: *mut ffi::GstRTSPClient,
1409            _param_spec: glib::ffi::gpointer,
1410            f: glib::ffi::gpointer,
1411        ) {
1412            let f: &F = &*(f as *const F);
1413            f(RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
1414        }
1415        unsafe {
1416            let f: Box_<F> = Box_::new(f);
1417            connect_raw(
1418                self.as_ptr() as *mut _,
1419                b"notify::post-session-timeout\0".as_ptr() as *const _,
1420                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1421                    notify_post_session_timeout_trampoline::<Self, F> as *const (),
1422                )),
1423                Box_::into_raw(f),
1424            )
1425        }
1426    }
1427
1428    #[doc(alias = "session-pool")]
1429    fn connect_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(
1430        &self,
1431        f: F,
1432    ) -> SignalHandlerId {
1433        unsafe extern "C" fn notify_session_pool_trampoline<
1434            P: IsA<RTSPClient>,
1435            F: Fn(&P) + Send + Sync + 'static,
1436        >(
1437            this: *mut ffi::GstRTSPClient,
1438            _param_spec: glib::ffi::gpointer,
1439            f: glib::ffi::gpointer,
1440        ) {
1441            let f: &F = &*(f as *const F);
1442            f(RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
1443        }
1444        unsafe {
1445            let f: Box_<F> = Box_::new(f);
1446            connect_raw(
1447                self.as_ptr() as *mut _,
1448                b"notify::session-pool\0".as_ptr() as *const _,
1449                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1450                    notify_session_pool_trampoline::<Self, F> as *const (),
1451                )),
1452                Box_::into_raw(f),
1453            )
1454        }
1455    }
1456}
1457
1458impl<O: IsA<RTSPClient>> RTSPClientExt for O {}