mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-29 13:01:05 +00:00
1449 lines
48 KiB
Rust
1449 lines
48 KiB
Rust
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
|
// DO NOT EDIT
|
|
|
|
use crate::RTSPAuth;
|
|
use crate::RTSPContext;
|
|
use crate::RTSPFilterResult;
|
|
use crate::RTSPMountPoints;
|
|
use crate::RTSPSession;
|
|
use crate::RTSPSessionPool;
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
|
use crate::RTSPStreamTransport;
|
|
use crate::RTSPThreadPool;
|
|
use glib::object::Cast;
|
|
use glib::object::IsA;
|
|
use glib::signal::connect_raw;
|
|
use glib::signal::SignalHandlerId;
|
|
use glib::translate::*;
|
|
use glib::StaticType;
|
|
use std::boxed::Box as Box_;
|
|
use std::mem::transmute;
|
|
|
|
glib::wrapper! {
|
|
pub struct RTSPClient(Object<ffi::GstRTSPClient, ffi::GstRTSPClientClass>);
|
|
|
|
match fn {
|
|
get_type => || ffi::gst_rtsp_client_get_type(),
|
|
}
|
|
}
|
|
|
|
impl RTSPClient {
|
|
#[doc(alias = "gst_rtsp_client_new")]
|
|
pub fn new() -> RTSPClient {
|
|
assert_initialized_main_thread!();
|
|
unsafe { from_glib_full(ffi::gst_rtsp_client_new()) }
|
|
}
|
|
}
|
|
|
|
impl Default for RTSPClient {
|
|
fn default() -> Self {
|
|
Self::new()
|
|
}
|
|
}
|
|
|
|
unsafe impl Send for RTSPClient {}
|
|
unsafe impl Sync for RTSPClient {}
|
|
|
|
pub const NONE_RTSP_CLIENT: Option<&RTSPClient> = None;
|
|
|
|
pub trait RTSPClientExt: 'static {
|
|
#[doc(alias = "gst_rtsp_client_close")]
|
|
fn close(&self);
|
|
|
|
#[doc(alias = "gst_rtsp_client_get_auth")]
|
|
fn get_auth(&self) -> Option<RTSPAuth>;
|
|
|
|
//#[doc(alias = "gst_rtsp_client_get_connection")]
|
|
//fn get_connection(&self) -> /*Ignored*/Option<gst_rtsp::RTSPConnection>;
|
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
|
#[doc(alias = "gst_rtsp_client_get_content_length_limit")]
|
|
fn get_content_length_limit(&self) -> u32;
|
|
|
|
#[doc(alias = "gst_rtsp_client_get_mount_points")]
|
|
fn get_mount_points(&self) -> Option<RTSPMountPoints>;
|
|
|
|
#[doc(alias = "gst_rtsp_client_get_session_pool")]
|
|
fn get_session_pool(&self) -> Option<RTSPSessionPool>;
|
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
|
#[doc(alias = "gst_rtsp_client_get_stream_transport")]
|
|
fn get_stream_transport(&self, channel: u8) -> Option<RTSPStreamTransport>;
|
|
|
|
#[doc(alias = "gst_rtsp_client_get_thread_pool")]
|
|
fn get_thread_pool(&self) -> Option<RTSPThreadPool>;
|
|
|
|
//#[doc(alias = "gst_rtsp_client_handle_message")]
|
|
//fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult;
|
|
|
|
//#[doc(alias = "gst_rtsp_client_send_message")]
|
|
//fn send_message<P: IsA<RTSPSession>>(&self, session: Option<&P>, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult;
|
|
|
|
#[doc(alias = "gst_rtsp_client_session_filter")]
|
|
fn session_filter(
|
|
&self,
|
|
func: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>,
|
|
) -> Vec<RTSPSession>;
|
|
|
|
#[doc(alias = "gst_rtsp_client_set_auth")]
|
|
fn set_auth<P: IsA<RTSPAuth>>(&self, auth: Option<&P>);
|
|
|
|
//#[doc(alias = "gst_rtsp_client_set_connection")]
|
|
//fn set_connection(&self, conn: /*Ignored*/&mut gst_rtsp::RTSPConnection) -> bool;
|
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
|
#[doc(alias = "gst_rtsp_client_set_content_length_limit")]
|
|
fn set_content_length_limit(&self, limit: u32);
|
|
|
|
#[doc(alias = "gst_rtsp_client_set_mount_points")]
|
|
fn set_mount_points<P: IsA<RTSPMountPoints>>(&self, mounts: Option<&P>);
|
|
|
|
//#[doc(alias = "gst_rtsp_client_set_send_func")]
|
|
//fn set_send_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, bool) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>);
|
|
|
|
//#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
|
//#[doc(alias = "gst_rtsp_client_set_send_messages_func")]
|
|
//fn set_send_messages_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, u32, bool) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>);
|
|
|
|
#[doc(alias = "gst_rtsp_client_set_session_pool")]
|
|
fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>);
|
|
|
|
#[doc(alias = "gst_rtsp_client_set_thread_pool")]
|
|
fn set_thread_pool<P: IsA<RTSPThreadPool>>(&self, pool: Option<&P>);
|
|
|
|
fn get_property_drop_backlog(&self) -> bool;
|
|
|
|
fn set_property_drop_backlog(&self, drop_backlog: bool);
|
|
|
|
fn get_property_post_session_timeout(&self) -> i32;
|
|
|
|
fn set_property_post_session_timeout(&self, post_session_timeout: i32);
|
|
|
|
fn connect_announce_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
//fn connect_check_requirements<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
|
|
|
|
fn connect_closed<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
|
|
|
fn connect_describe_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_get_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_handle_response<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_new_session<F: Fn(&Self, &RTSPSession) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_options_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_pause_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_play_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
fn connect_pre_announce_request<
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
fn connect_pre_describe_request<
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
fn connect_pre_get_parameter_request<
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
fn connect_pre_options_request<
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
fn connect_pre_pause_request<
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
fn connect_pre_play_request<
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
fn connect_pre_record_request<
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
fn connect_pre_set_parameter_request<
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
fn connect_pre_setup_request<
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
fn connect_pre_teardown_request<
|
|
F: Fn(&Self, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_record_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
//fn connect_send_message<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
|
|
|
|
fn connect_set_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_setup_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_teardown_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_property_drop_backlog_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_property_mount_points_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_property_post_session_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
|
|
fn connect_property_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId;
|
|
}
|
|
|
|
impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|
fn close(&self) {
|
|
unsafe {
|
|
ffi::gst_rtsp_client_close(self.as_ref().to_glib_none().0);
|
|
}
|
|
}
|
|
|
|
fn get_auth(&self) -> Option<RTSPAuth> {
|
|
unsafe {
|
|
from_glib_full(ffi::gst_rtsp_client_get_auth(
|
|
self.as_ref().to_glib_none().0,
|
|
))
|
|
}
|
|
}
|
|
|
|
//fn get_connection(&self) -> /*Ignored*/Option<gst_rtsp::RTSPConnection> {
|
|
// unsafe { TODO: call ffi:gst_rtsp_client_get_connection() }
|
|
//}
|
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
|
fn get_content_length_limit(&self) -> u32 {
|
|
unsafe { ffi::gst_rtsp_client_get_content_length_limit(self.as_ref().to_glib_none().0) }
|
|
}
|
|
|
|
fn get_mount_points(&self) -> Option<RTSPMountPoints> {
|
|
unsafe {
|
|
from_glib_full(ffi::gst_rtsp_client_get_mount_points(
|
|
self.as_ref().to_glib_none().0,
|
|
))
|
|
}
|
|
}
|
|
|
|
fn get_session_pool(&self) -> Option<RTSPSessionPool> {
|
|
unsafe {
|
|
from_glib_full(ffi::gst_rtsp_client_get_session_pool(
|
|
self.as_ref().to_glib_none().0,
|
|
))
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
|
fn get_stream_transport(&self, channel: u8) -> Option<RTSPStreamTransport> {
|
|
unsafe {
|
|
from_glib_none(ffi::gst_rtsp_client_get_stream_transport(
|
|
self.as_ref().to_glib_none().0,
|
|
channel,
|
|
))
|
|
}
|
|
}
|
|
|
|
fn get_thread_pool(&self) -> Option<RTSPThreadPool> {
|
|
unsafe {
|
|
from_glib_full(ffi::gst_rtsp_client_get_thread_pool(
|
|
self.as_ref().to_glib_none().0,
|
|
))
|
|
}
|
|
}
|
|
|
|
//fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult {
|
|
// unsafe { TODO: call ffi:gst_rtsp_client_handle_message() }
|
|
//}
|
|
|
|
//fn send_message<P: IsA<RTSPSession>>(&self, session: Option<&P>, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult {
|
|
// unsafe { TODO: call ffi:gst_rtsp_client_send_message() }
|
|
//}
|
|
|
|
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(
|
|
client: *mut ffi::GstRTSPClient,
|
|
sess: *mut ffi::GstRTSPSession,
|
|
user_data: glib::ffi::gpointer,
|
|
) -> ffi::GstRTSPFilterResult {
|
|
let client = from_glib_borrow(client);
|
|
let sess = from_glib_borrow(sess);
|
|
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)>;
|
|
let res = if let Some(ref mut callback) = *callback {
|
|
callback(&client, &sess)
|
|
} else {
|
|
panic!("cannot get closure...")
|
|
};
|
|
res.to_glib()
|
|
}
|
|
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;
|
|
unsafe {
|
|
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 _,
|
|
))
|
|
}
|
|
}
|
|
|
|
fn set_auth<P: IsA<RTSPAuth>>(&self, auth: Option<&P>) {
|
|
unsafe {
|
|
ffi::gst_rtsp_client_set_auth(
|
|
self.as_ref().to_glib_none().0,
|
|
auth.map(|p| p.as_ref()).to_glib_none().0,
|
|
);
|
|
}
|
|
}
|
|
|
|
//fn set_connection(&self, conn: /*Ignored*/&mut gst_rtsp::RTSPConnection) -> bool {
|
|
// unsafe { TODO: call ffi:gst_rtsp_client_set_connection() }
|
|
//}
|
|
|
|
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
|
fn set_content_length_limit(&self, limit: u32) {
|
|
unsafe {
|
|
ffi::gst_rtsp_client_set_content_length_limit(self.as_ref().to_glib_none().0, limit);
|
|
}
|
|
}
|
|
|
|
fn set_mount_points<P: IsA<RTSPMountPoints>>(&self, mounts: Option<&P>) {
|
|
unsafe {
|
|
ffi::gst_rtsp_client_set_mount_points(
|
|
self.as_ref().to_glib_none().0,
|
|
mounts.map(|p| p.as_ref()).to_glib_none().0,
|
|
);
|
|
}
|
|
}
|
|
|
|
//fn set_send_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, bool) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
|
|
// unsafe { TODO: call ffi:gst_rtsp_client_set_send_func() }
|
|
//}
|
|
|
|
//#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
|
//fn set_send_messages_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, u32, bool) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
|
|
// unsafe { TODO: call ffi:gst_rtsp_client_set_send_messages_func() }
|
|
//}
|
|
|
|
fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>) {
|
|
unsafe {
|
|
ffi::gst_rtsp_client_set_session_pool(
|
|
self.as_ref().to_glib_none().0,
|
|
pool.map(|p| p.as_ref()).to_glib_none().0,
|
|
);
|
|
}
|
|
}
|
|
|
|
fn set_thread_pool<P: IsA<RTSPThreadPool>>(&self, pool: Option<&P>) {
|
|
unsafe {
|
|
ffi::gst_rtsp_client_set_thread_pool(
|
|
self.as_ref().to_glib_none().0,
|
|
pool.map(|p| p.as_ref()).to_glib_none().0,
|
|
);
|
|
}
|
|
}
|
|
|
|
fn get_property_drop_backlog(&self) -> bool {
|
|
unsafe {
|
|
let mut value = glib::Value::from_type(<bool as StaticType>::static_type());
|
|
glib::gobject_ffi::g_object_get_property(
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
|
b"drop-backlog\0".as_ptr() as *const _,
|
|
value.to_glib_none_mut().0,
|
|
);
|
|
value
|
|
.get()
|
|
.expect("Return Value for property `drop-backlog` getter")
|
|
.unwrap()
|
|
}
|
|
}
|
|
|
|
fn set_property_drop_backlog(&self, drop_backlog: bool) {
|
|
unsafe {
|
|
glib::gobject_ffi::g_object_set_property(
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
|
b"drop-backlog\0".as_ptr() as *const _,
|
|
glib::Value::from(&drop_backlog).to_glib_none().0,
|
|
);
|
|
}
|
|
}
|
|
|
|
fn get_property_post_session_timeout(&self) -> i32 {
|
|
unsafe {
|
|
let mut value = glib::Value::from_type(<i32 as StaticType>::static_type());
|
|
glib::gobject_ffi::g_object_get_property(
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
|
b"post-session-timeout\0".as_ptr() as *const _,
|
|
value.to_glib_none_mut().0,
|
|
);
|
|
value
|
|
.get()
|
|
.expect("Return Value for property `post-session-timeout` getter")
|
|
.unwrap()
|
|
}
|
|
}
|
|
|
|
fn set_property_post_session_timeout(&self, post_session_timeout: i32) {
|
|
unsafe {
|
|
glib::gobject_ffi::g_object_set_property(
|
|
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
|
b"post-session-timeout\0".as_ptr() as *const _,
|
|
glib::Value::from(&post_session_timeout).to_glib_none().0,
|
|
);
|
|
}
|
|
}
|
|
|
|
fn connect_announce_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn announce_request_trampoline<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"announce-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
announce_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
//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 {
|
|
unsafe extern "C" fn closed_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(&RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"closed\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
closed_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_describe_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn describe_request_trampoline<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"describe-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
describe_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_get_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn get_parameter_request_trampoline<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"get-parameter-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
get_parameter_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_handle_response<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn handle_response_trampoline<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"handle-response\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
handle_response_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_new_session<F: Fn(&Self, &RTSPSession) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn new_session_trampoline<
|
|
P,
|
|
F: Fn(&P, &RTSPSession) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
object: *mut ffi::GstRTSPSession,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(object),
|
|
)
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"new-session\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
new_session_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_options_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn options_request_trampoline<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"options-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
options_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_pause_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn pause_request_trampoline<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"pause-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
pause_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_play_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn play_request_trampoline<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"play-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
play_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
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<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
|
where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
.to_glib()
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"pre-announce-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
pre_announce_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
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<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
|
where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
.to_glib()
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"pre-describe-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
pre_describe_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
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<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
|
where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
.to_glib()
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"pre-get-parameter-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
pre_get_parameter_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
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<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
|
where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
.to_glib()
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"pre-options-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
pre_options_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
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<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
|
where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
.to_glib()
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"pre-pause-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
pre_pause_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
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<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
|
where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
.to_glib()
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"pre-play-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
pre_play_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
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<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
|
where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
.to_glib()
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"pre-record-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
pre_record_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
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<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
|
where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
.to_glib()
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"pre-set-parameter-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
pre_set_parameter_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
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<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
|
where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
.to_glib()
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"pre-setup-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
pre_setup_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
|
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<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
|
where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
.to_glib()
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"pre-teardown-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
pre_teardown_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_record_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn record_request_trampoline<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"record-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
record_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
//fn connect_send_message<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
|
|
// Ignored message: GstRtsp.RTSPMessage
|
|
//}
|
|
|
|
fn connect_set_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn set_parameter_request_trampoline<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"set-parameter-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
set_parameter_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_setup_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn setup_request_trampoline<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"setup-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
setup_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_teardown_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn teardown_request_trampoline<
|
|
P,
|
|
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
ctx: *mut ffi::GstRTSPContext,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(
|
|
&RTSPClient::from_glib_borrow(this).unsafe_cast_ref(),
|
|
&from_glib_borrow(ctx),
|
|
)
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"teardown-request\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
teardown_request_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_property_drop_backlog_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn notify_drop_backlog_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
_param_spec: glib::ffi::gpointer,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(&RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"notify::drop-backlog\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
notify_drop_backlog_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_property_mount_points_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn notify_mount_points_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
_param_spec: glib::ffi::gpointer,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(&RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"notify::mount-points\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
notify_mount_points_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_property_post_session_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn notify_post_session_timeout_trampoline<
|
|
P,
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
_param_spec: glib::ffi::gpointer,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(&RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
|
|
}
|
|
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),
|
|
)
|
|
}
|
|
}
|
|
|
|
fn connect_property_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
|
&self,
|
|
f: F,
|
|
) -> SignalHandlerId {
|
|
unsafe extern "C" fn notify_session_pool_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
|
this: *mut ffi::GstRTSPClient,
|
|
_param_spec: glib::ffi::gpointer,
|
|
f: glib::ffi::gpointer,
|
|
) where
|
|
P: IsA<RTSPClient>,
|
|
{
|
|
let f: &F = &*(f as *const F);
|
|
f(&RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
|
|
}
|
|
unsafe {
|
|
let f: Box_<F> = Box_::new(f);
|
|
connect_raw(
|
|
self.as_ptr() as *mut _,
|
|
b"notify::session-pool\0".as_ptr() as *const _,
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
notify_session_pool_trampoline::<Self, F> as *const (),
|
|
)),
|
|
Box_::into_raw(f),
|
|
)
|
|
}
|
|
}
|
|
}
|