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