2018-04-23 17:34:22 +00:00
|
|
|
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
|
|
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
2021-04-01 13:58:41 +00:00
|
|
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
2018-02-09 02:30:08 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
2020-11-22 10:40:56 +00:00
|
|
|
use crate::RTSPStreamTransport;
|
2023-01-03 18:56:00 +00:00
|
|
|
use crate::{
|
|
|
|
RTSPAuth, RTSPContext, RTSPFilterResult, RTSPMountPoints, RTSPSession, RTSPSessionPool,
|
|
|
|
RTSPThreadPool,
|
|
|
|
};
|
|
|
|
use glib::{
|
|
|
|
prelude::*,
|
|
|
|
signal::{connect_raw, SignalHandlerId},
|
|
|
|
translate::*,
|
|
|
|
};
|
|
|
|
use std::{boxed::Box as Box_, mem::transmute};
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::wrapper! {
|
2021-06-02 07:47:51 +00:00
|
|
|
#[doc(alias = "GstRTSPClient")]
|
2020-11-22 10:40:56 +00:00
|
|
|
pub struct RTSPClient(Object<ffi::GstRTSPClient, ffi::GstRTSPClientClass>);
|
2018-02-09 02:30:08 +00:00
|
|
|
|
|
|
|
match fn {
|
2021-04-19 19:55:01 +00:00
|
|
|
type_ => || ffi::gst_rtsp_client_get_type(),
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl RTSPClient {
|
2021-11-16 14:02:58 +00:00
|
|
|
pub const NONE: Option<&'static RTSPClient> = None;
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_new")]
|
2018-02-09 02:30:08 +00:00
|
|
|
pub fn new() -> RTSPClient {
|
|
|
|
assert_initialized_main_thread!();
|
2020-11-22 10:40:56 +00:00
|
|
|
unsafe { from_glib_full(ffi::gst_rtsp_client_new()) }
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Default for RTSPClient {
|
|
|
|
fn default() -> Self {
|
|
|
|
Self::new()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
unsafe impl Send for RTSPClient {}
|
|
|
|
unsafe impl Sync for RTSPClient {}
|
|
|
|
|
2018-12-08 09:05:20 +00:00
|
|
|
pub trait RTSPClientExt: 'static {
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_close")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn close(&self);
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_get_auth")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_auth")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn auth(&self) -> Option<RTSPAuth>;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_client_get_connection")]
|
2021-05-03 18:35:37 +00:00
|
|
|
//#[doc(alias = "get_connection")]
|
2021-04-11 19:38:18 +00:00
|
|
|
//fn connection(&self) -> /*Ignored*/Option<gst_rtsp::RTSPConnection>;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_get_content_length_limit")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_content_length_limit")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn content_length_limit(&self) -> u32;
|
2020-04-30 16:51:41 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_get_mount_points")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_mount_points")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn mount_points(&self) -> Option<RTSPMountPoints>;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_get_session_pool")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_session_pool")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn session_pool(&self) -> Option<RTSPSessionPool>;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_get_stream_transport")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_stream_transport")]
|
2021-04-19 20:13:58 +00:00
|
|
|
fn stream_transport(&self, channel: u8) -> Option<RTSPStreamTransport>;
|
2020-04-30 16:51:41 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_get_thread_pool")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_thread_pool")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn thread_pool(&self) -> Option<RTSPThreadPool>;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_client_handle_message")]
|
2018-02-09 02:30:08 +00:00
|
|
|
//fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult;
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_client_send_message")]
|
2021-05-23 19:22:45 +00:00
|
|
|
//fn send_message(&self, session: Option<&impl IsA<RTSPSession>>, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_session_filter")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn session_filter(
|
|
|
|
&self,
|
|
|
|
func: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>,
|
|
|
|
) -> Vec<RTSPSession>;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_set_auth")]
|
2021-05-23 19:22:45 +00:00
|
|
|
fn set_auth(&self, auth: Option<&impl IsA<RTSPAuth>>);
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_client_set_connection")]
|
2023-01-03 18:56:00 +00:00
|
|
|
//fn set_connection(&self, conn: /*Ignored*/gst_rtsp::RTSPConnection) -> bool;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_set_content_length_limit")]
|
2020-04-30 16:51:41 +00:00
|
|
|
fn set_content_length_limit(&self, limit: u32);
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_set_mount_points")]
|
2021-05-23 19:22:45 +00:00
|
|
|
fn set_mount_points(&self, mounts: Option<&impl IsA<RTSPMountPoints>>);
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
//#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2020-12-08 13:00:17 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_client_set_send_messages_func")]
|
2022-06-30 05:22:05 +00:00
|
|
|
//fn set_send_messages_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, u32, bool) -> bool, user_data: /*Unimplemented*/Option<Basic: Pointer>);
|
2019-04-23 14:32:09 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_set_session_pool")]
|
2021-05-23 19:22:45 +00:00
|
|
|
fn set_session_pool(&self, pool: Option<&impl IsA<RTSPSessionPool>>);
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_set_thread_pool")]
|
2021-05-23 19:22:45 +00:00
|
|
|
fn set_thread_pool(&self, pool: Option<&impl IsA<RTSPThreadPool>>);
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "drop-backlog")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn is_drop_backlog(&self) -> bool;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "drop-backlog")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn set_drop_backlog(&self, drop_backlog: bool);
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "post-session-timeout")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn post_session_timeout(&self) -> i32;
|
2020-04-30 16:51:41 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "post-session-timeout")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn set_post_session_timeout(&self, post_session_timeout: i32);
|
2020-04-30 16:51:41 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "announce-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_announce_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
//#[doc(alias = "check-requirements")]
|
2018-02-09 02:30:08 +00:00
|
|
|
//fn connect_check_requirements<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "closed")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn connect_closed<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "describe-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_describe_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get-parameter-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_get_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "handle-response")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_handle_response<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "new-session")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_new_session<F: Fn(&Self, &RTSPSession) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "options-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_options_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "pause-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pause_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "play-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_play_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "pre-announce-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_announce_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "pre-describe-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_describe_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "pre-get-parameter-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_get_parameter_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "pre-options-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_options_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "pre-pause-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_pause_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "pre-play-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_play_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "pre-record-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_record_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "pre-set-parameter-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_set_parameter_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "pre-setup-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_setup_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "pre-teardown-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_teardown_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "record-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_record_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
//#[doc(alias = "send-message")]
|
2018-02-09 02:30:08 +00:00
|
|
|
//fn connect_send_message<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "set-parameter-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_set_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "setup-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_setup_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "teardown-request")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_teardown_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "drop-backlog")]
|
|
|
|
fn connect_drop_backlog_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
2019-06-18 10:12:00 +00:00
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "mount-points")]
|
|
|
|
fn connect_mount_points_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
2019-06-18 10:12:00 +00:00
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "post-session-timeout")]
|
|
|
|
fn connect_post_session_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
2020-04-30 16:51:41 +00:00
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "session-pool")]
|
|
|
|
fn connect_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
2019-06-18 10:12:00 +00:00
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId;
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
|
2018-12-08 09:05:20 +00:00
|
|
|
impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
2018-02-09 02:30:08 +00:00
|
|
|
fn close(&self) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_client_close(self.as_ref().to_glib_none().0);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-11 19:38:18 +00:00
|
|
|
fn auth(&self) -> Option<RTSPAuth> {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_full(ffi::gst_rtsp_client_get_auth(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-11 19:38:18 +00:00
|
|
|
//fn connection(&self) -> /*Ignored*/Option<gst_rtsp::RTSPConnection> {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_client_get_connection() }
|
2018-02-09 02:30:08 +00:00
|
|
|
//}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn content_length_limit(&self) -> u32 {
|
2020-11-22 10:40:56 +00:00
|
|
|
unsafe { ffi::gst_rtsp_client_get_content_length_limit(self.as_ref().to_glib_none().0) }
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
|
2021-04-11 19:38:18 +00:00
|
|
|
fn mount_points(&self) -> Option<RTSPMountPoints> {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_full(ffi::gst_rtsp_client_get_mount_points(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-11 19:38:18 +00:00
|
|
|
fn session_pool(&self) -> Option<RTSPSessionPool> {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_full(ffi::gst_rtsp_client_get_session_pool(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
2021-04-19 20:13:58 +00:00
|
|
|
fn stream_transport(&self, channel: u8) -> Option<RTSPStreamTransport> {
|
2020-04-30 16:51:41 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_none(ffi::gst_rtsp_client_get_stream_transport(
|
2020-04-30 16:51:41 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
channel,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-11 19:38:18 +00:00
|
|
|
fn thread_pool(&self) -> Option<RTSPThreadPool> {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_full(ffi::gst_rtsp_client_get_thread_pool(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_client_handle_message() }
|
2018-02-09 02:30:08 +00:00
|
|
|
//}
|
|
|
|
|
2021-05-23 19:22:45 +00:00
|
|
|
//fn send_message(&self, session: Option<&impl IsA<RTSPSession>>, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_client_send_message() }
|
2018-02-09 02:30:08 +00:00
|
|
|
//}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn session_filter(
|
|
|
|
&self,
|
|
|
|
func: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>,
|
|
|
|
) -> Vec<RTSPSession> {
|
|
|
|
let func_data: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)> =
|
|
|
|
func;
|
|
|
|
unsafe extern "C" fn func_func(
|
2020-11-22 10:40:56 +00:00
|
|
|
client: *mut ffi::GstRTSPClient,
|
|
|
|
sess: *mut ffi::GstRTSPSession,
|
|
|
|
user_data: glib::ffi::gpointer,
|
|
|
|
) -> ffi::GstRTSPFilterResult {
|
2019-02-22 09:54:27 +00:00
|
|
|
let client = from_glib_borrow(client);
|
|
|
|
let sess = from_glib_borrow(sess);
|
2019-06-18 10:12:00 +00:00
|
|
|
let callback: *mut Option<
|
|
|
|
&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult),
|
|
|
|
> = user_data as *const _ as usize
|
|
|
|
as *mut Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>;
|
2023-02-07 19:00:46 +00:00
|
|
|
if let Some(ref mut callback) = *callback {
|
2019-02-22 09:54:27 +00:00
|
|
|
callback(&client, &sess)
|
|
|
|
} else {
|
|
|
|
panic!("cannot get closure...")
|
2023-02-07 19:00:46 +00:00
|
|
|
}
|
|
|
|
.into_glib()
|
2019-02-22 09:54:27 +00:00
|
|
|
}
|
2019-06-18 10:12:00 +00:00
|
|
|
let func = if func_data.is_some() {
|
|
|
|
Some(func_func as _)
|
|
|
|
} else {
|
|
|
|
None
|
|
|
|
};
|
|
|
|
let super_callback0: &Option<
|
|
|
|
&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult),
|
|
|
|
> = &func_data;
|
2019-02-22 09:54:27 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_client_session_filter(
|
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
func,
|
|
|
|
super_callback0 as *const _ as usize as *mut _,
|
|
|
|
))
|
2019-02-22 09:54:27 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-23 19:22:45 +00:00
|
|
|
fn set_auth(&self, auth: Option<&impl IsA<RTSPAuth>>) {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_client_set_auth(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
auth.map(|p| p.as_ref()).to_glib_none().0,
|
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
//fn set_connection(&self, conn: /*Ignored*/gst_rtsp::RTSPConnection) -> bool {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_client_set_connection() }
|
2018-02-09 02:30:08 +00:00
|
|
|
//}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
2020-04-30 16:51:41 +00:00
|
|
|
fn set_content_length_limit(&self, limit: u32) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_client_set_content_length_limit(self.as_ref().to_glib_none().0, limit);
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-23 19:22:45 +00:00
|
|
|
fn set_mount_points(&self, mounts: Option<&impl IsA<RTSPMountPoints>>) {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_client_set_mount_points(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
mounts.map(|p| p.as_ref()).to_glib_none().0,
|
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
//#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2022-06-30 05:22:05 +00:00
|
|
|
//fn set_send_messages_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, u32, bool) -> bool, user_data: /*Unimplemented*/Option<Basic: Pointer>) {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_client_set_send_messages_func() }
|
2019-04-23 14:32:09 +00:00
|
|
|
//}
|
|
|
|
|
2021-05-23 19:22:45 +00:00
|
|
|
fn set_session_pool(&self, pool: Option<&impl IsA<RTSPSessionPool>>) {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_client_set_session_pool(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
pool.map(|p| p.as_ref()).to_glib_none().0,
|
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-23 19:22:45 +00:00
|
|
|
fn set_thread_pool(&self, pool: Option<&impl IsA<RTSPThreadPool>>) {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_client_set_thread_pool(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
pool.map(|p| p.as_ref()).to_glib_none().0,
|
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-11 19:38:18 +00:00
|
|
|
fn is_drop_backlog(&self) -> bool {
|
2021-11-06 17:31:52 +00:00
|
|
|
glib::ObjectExt::property(self.as_ref(), "drop-backlog")
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
|
2021-04-11 19:38:18 +00:00
|
|
|
fn set_drop_backlog(&self, drop_backlog: bool) {
|
2021-11-06 17:31:52 +00:00
|
|
|
glib::ObjectExt::set_property(self.as_ref(), "drop-backlog", &drop_backlog)
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
|
2021-04-11 19:38:18 +00:00
|
|
|
fn post_session_timeout(&self) -> i32 {
|
2021-11-06 17:31:52 +00:00
|
|
|
glib::ObjectExt::property(self.as_ref(), "post-session-timeout")
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
|
2021-04-11 19:38:18 +00:00
|
|
|
fn set_post_session_timeout(&self, post_session_timeout: i32) {
|
2021-11-06 17:31:52 +00:00
|
|
|
glib::ObjectExt::set_property(self.as_ref(), "post-session-timeout", &post_session_timeout)
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_announce_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn announce_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"announce-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
announce_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
|
|
|
//fn connect_check_requirements<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
|
|
|
|
// Empty ctype arr: *.CArray TypeId { ns_id: 0, id: 28 }
|
|
|
|
//}
|
|
|
|
|
|
|
|
fn connect_closed<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
2021-05-26 22:02:42 +00:00
|
|
|
unsafe extern "C" fn closed_trampoline<
|
|
|
|
P: IsA<RTSPClient>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2021-06-21 21:07:45 +00:00
|
|
|
f(RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"closed\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
closed_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_describe_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn describe_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"describe-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
describe_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_get_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn get_parameter_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"get-parameter-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
get_parameter_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_handle_response<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn handle_response_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"handle-response\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
handle_response_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_new_session<F: Fn(&Self, &RTSPSession) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn new_session_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPSession) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
object: *mut ffi::GstRTSPSession,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(object),
|
|
|
|
)
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"new-session\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
new_session_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_options_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn options_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"options-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
options_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pause_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn pause_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"pause-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
pause_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_play_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn play_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"play-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
play_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_announce_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn pre_announce_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2021-04-27 15:10:39 +00:00
|
|
|
.into_glib()
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"pre-announce-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
pre_announce_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_describe_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn pre_describe_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2021-04-27 15:10:39 +00:00
|
|
|
.into_glib()
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"pre-describe-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
pre_describe_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_get_parameter_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn pre_get_parameter_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2021-04-27 15:10:39 +00:00
|
|
|
.into_glib()
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"pre-get-parameter-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
pre_get_parameter_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_options_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn pre_options_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2021-04-27 15:10:39 +00:00
|
|
|
.into_glib()
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"pre-options-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
pre_options_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_pause_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn pre_pause_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2021-04-27 15:10:39 +00:00
|
|
|
.into_glib()
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"pre-pause-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
pre_pause_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_play_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn pre_play_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2021-04-27 15:10:39 +00:00
|
|
|
.into_glib()
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"pre-play-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
pre_play_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_record_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn pre_record_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2021-04-27 15:10:39 +00:00
|
|
|
.into_glib()
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"pre-record-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
pre_record_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_set_parameter_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn pre_set_parameter_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2021-04-27 15:10:39 +00:00
|
|
|
.into_glib()
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"pre-set-parameter-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
pre_set_parameter_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_setup_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn pre_setup_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2021-04-27 15:10:39 +00:00
|
|
|
.into_glib()
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"pre-setup-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
pre_setup_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_pre_teardown_request<
|
|
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn pre_teardown_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2021-04-27 15:10:39 +00:00
|
|
|
.into_glib()
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"pre-teardown-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
pre_teardown_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_record_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn record_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"record-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
record_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
|
|
|
//fn connect_send_message<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
|
|
|
|
// Ignored message: GstRtsp.RTSPMessage
|
|
|
|
//}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_set_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn set_parameter_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"set-parameter-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
set_parameter_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_setup_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn setup_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"setup-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
setup_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_teardown_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn teardown_request_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2019-06-18 10:12:00 +00:00
|
|
|
f(
|
2021-06-21 21:07:45 +00:00
|
|
|
RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
2019-06-18 10:12:00 +00:00
|
|
|
&from_glib_borrow(ctx),
|
|
|
|
)
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-15 15:03:31 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"teardown-request\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
teardown_request_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-15 15:03:31 +00:00
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_drop_backlog_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
2019-06-18 10:12:00 +00:00
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
2021-05-26 22:02:42 +00:00
|
|
|
unsafe extern "C" fn notify_drop_backlog_trampoline<
|
|
|
|
P: IsA<RTSPClient>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
_param_spec: glib::ffi::gpointer,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2021-06-21 21:07:45 +00:00
|
|
|
f(RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::drop-backlog\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_drop_backlog_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_mount_points_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
2019-06-18 10:12:00 +00:00
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
2021-05-26 22:02:42 +00:00
|
|
|
unsafe extern "C" fn notify_mount_points_trampoline<
|
|
|
|
P: IsA<RTSPClient>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
_param_spec: glib::ffi::gpointer,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2021-06-21 21:07:45 +00:00
|
|
|
f(RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::mount-points\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_mount_points_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
2020-04-30 16:51:41 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_post_session_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
2020-04-30 16:51:41 +00:00
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn notify_post_session_timeout_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPClient>,
|
2020-04-30 16:51:41 +00:00
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
_param_spec: glib::ffi::gpointer,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2020-04-30 16:51:41 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2021-06-21 21:07:45 +00:00
|
|
|
f(RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
unsafe {
|
|
|
|
let f: Box_<F> = Box_::new(f);
|
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::post-session-timeout\0".as_ptr() as *const _,
|
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_post_session_timeout_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
|
|
|
Box_::into_raw(f),
|
2019-06-18 10:12:00 +00:00
|
|
|
)
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
2019-06-18 10:12:00 +00:00
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
2021-05-26 22:02:42 +00:00
|
|
|
unsafe extern "C" fn notify_session_pool_trampoline<
|
|
|
|
P: IsA<RTSPClient>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPClient,
|
|
|
|
_param_spec: glib::ffi::gpointer,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2019-06-18 10:10:46 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2021-06-21 21:07:45 +00:00
|
|
|
f(RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2019-01-29 13:53:44 +00:00
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::session-pool\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_session_pool_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|