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
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
use crate::{
|
|
|
|
RTSPAddressPool, RTSPMediaStatus, RTSPPublishClockMode, RTSPStream, RTSPStreamTransport,
|
|
|
|
RTSPSuspendMode, RTSPThread, RTSPTransportMode,
|
|
|
|
};
|
|
|
|
use glib::{
|
|
|
|
prelude::*,
|
|
|
|
signal::{connect_raw, SignalHandlerId},
|
|
|
|
translate::*,
|
|
|
|
};
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-04-30 16:51:41 +00:00
|
|
|
use std::mem;
|
2023-01-03 18:56:00 +00:00
|
|
|
use std::{boxed::Box as Box_, mem::transmute};
|
2020-11-22 10:40:56 +00:00
|
|
|
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::wrapper! {
|
2021-06-02 07:47:51 +00:00
|
|
|
#[doc(alias = "GstRTSPMedia")]
|
2020-11-22 10:40:56 +00:00
|
|
|
pub struct RTSPMedia(Object<ffi::GstRTSPMedia, ffi::GstRTSPMediaClass>);
|
2018-02-09 02:30:08 +00:00
|
|
|
|
|
|
|
match fn {
|
2021-04-19 19:55:01 +00:00
|
|
|
type_ => || ffi::gst_rtsp_media_get_type(),
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl RTSPMedia {
|
2021-11-16 14:02:58 +00:00
|
|
|
pub const NONE: Option<&'static RTSPMedia> = None;
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_new")]
|
2023-01-03 18:56:00 +00:00
|
|
|
pub fn new(element: impl IsA<gst::Element>) -> RTSPMedia {
|
2018-02-09 02:30:08 +00:00
|
|
|
assert_initialized_main_thread!();
|
2023-01-03 18:56:00 +00:00
|
|
|
unsafe { from_glib_full(ffi::gst_rtsp_media_new(element.upcast().into_glib_ptr())) }
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
unsafe impl Send for RTSPMedia {}
|
|
|
|
unsafe impl Sync for RTSPMedia {}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
mod sealed {
|
|
|
|
pub trait Sealed {}
|
|
|
|
impl<T: super::IsA<super::RTSPMedia>> Sealed for T {}
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
pub trait RTSPMediaExt: IsA<RTSPMedia> + sealed::Sealed + 'static {
|
2023-05-22 09:15:07 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_can_be_shared")]
|
2023-05-22 09:15:07 +00:00
|
|
|
fn can_be_shared(&self) -> bool {
|
|
|
|
unsafe {
|
|
|
|
from_glib(ffi::gst_rtsp_media_can_be_shared(
|
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_collect_streams")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn collect_streams(&self) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_collect_streams(self.as_ref().to_glib_none().0);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_media_complete_pipeline")]
|
2022-01-04 18:02:58 +00:00
|
|
|
//fn complete_pipeline(&self, transports: /*Ignored*/&[gst_rtsp::RTSPTransport]) -> bool {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_media_complete_pipeline() }
|
2018-03-15 08:21:53 +00:00
|
|
|
//}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_create_stream")]
|
2021-05-23 19:22:45 +00:00
|
|
|
fn create_stream(
|
2019-06-18 10:12:00 +00:00
|
|
|
&self,
|
2021-05-23 19:22:45 +00:00
|
|
|
payloader: &impl IsA<gst::Element>,
|
|
|
|
pad: &impl IsA<gst::Pad>,
|
2022-10-18 15:16:11 +00:00
|
|
|
) -> RTSPStream {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_none(ffi::gst_rtsp_media_create_stream(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
payloader.as_ref().to_glib_none().0,
|
|
|
|
pad.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_find_stream")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn find_stream(&self, control: &str) -> Option<RTSPStream> {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_none(ffi::gst_rtsp_media_find_stream(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
control.to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_address_pool")]
|
|
|
|
#[doc(alias = "get_address_pool")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn address_pool(&self) -> Option<RTSPAddressPool> {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_full(ffi::gst_rtsp_media_get_address_pool(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_base_time")]
|
|
|
|
#[doc(alias = "get_base_time")]
|
2021-04-05 10:48:30 +00:00
|
|
|
fn base_time(&self) -> Option<gst::ClockTime> {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_get_base_time(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_buffer_size")]
|
|
|
|
#[doc(alias = "get_buffer_size")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn buffer_size(&self) -> u32 {
|
2020-11-22 10:40:56 +00:00
|
|
|
unsafe { ffi::gst_rtsp_media_get_buffer_size(self.as_ref().to_glib_none().0) }
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_clock")]
|
|
|
|
#[doc(alias = "get_clock")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn clock(&self) -> Option<gst::Clock> {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_full(ffi::gst_rtsp_media_get_clock(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_do_retransmission")]
|
|
|
|
#[doc(alias = "get_do_retransmission")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn does_retransmission(&self) -> bool {
|
2019-04-23 14:32:09 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_get_do_retransmission(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2019-04-23 14:32:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_dscp_qos")]
|
|
|
|
#[doc(alias = "get_dscp_qos")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn dscp_qos(&self) -> i32 {
|
2020-11-22 10:40:56 +00:00
|
|
|
unsafe { ffi::gst_rtsp_media_get_dscp_qos(self.as_ref().to_glib_none().0) }
|
2020-06-03 12:26:16 +00:00
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_element")]
|
|
|
|
#[doc(alias = "get_element")]
|
2022-10-18 15:16:11 +00:00
|
|
|
fn element(&self) -> gst::Element {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_full(ffi::gst_rtsp_media_get_element(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_latency")]
|
|
|
|
#[doc(alias = "get_latency")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn latency(&self) -> u32 {
|
2020-11-22 10:40:56 +00:00
|
|
|
unsafe { ffi::gst_rtsp_media_get_latency(self.as_ref().to_glib_none().0) }
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_max_mcast_ttl")]
|
|
|
|
#[doc(alias = "get_max_mcast_ttl")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn max_mcast_ttl(&self) -> u32 {
|
2020-11-22 10:40:56 +00:00
|
|
|
unsafe { ffi::gst_rtsp_media_get_max_mcast_ttl(self.as_ref().to_glib_none().0) }
|
2019-04-23 14:32:09 +00:00
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_multicast_iface")]
|
|
|
|
#[doc(alias = "get_multicast_iface")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn multicast_iface(&self) -> Option<glib::GString> {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_full(ffi::gst_rtsp_media_get_multicast_iface(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_media_get_permissions")]
|
|
|
|
//#[doc(alias = "get_permissions")]
|
2021-04-11 19:38:18 +00:00
|
|
|
//fn permissions(&self) -> /*Ignored*/Option<RTSPPermissions> {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_media_get_permissions() }
|
2018-02-09 02:30:08 +00:00
|
|
|
//}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_profiles")]
|
|
|
|
#[doc(alias = "get_profiles")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn profiles(&self) -> gst_rtsp::RTSPProfile {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_get_profiles(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_protocols")]
|
|
|
|
#[doc(alias = "get_protocols")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn protocols(&self) -> gst_rtsp::RTSPLowerTrans {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_get_protocols(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_publish_clock_mode")]
|
|
|
|
#[doc(alias = "get_publish_clock_mode")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn publish_clock_mode(&self) -> RTSPPublishClockMode {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_get_publish_clock_mode(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_range_string")]
|
|
|
|
#[doc(alias = "get_range_string")]
|
2021-04-19 20:13:58 +00:00
|
|
|
fn range_string(&self, play: bool, unit: gst_rtsp::RTSPRangeUnit) -> Option<glib::GString> {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_full(ffi::gst_rtsp_media_get_range_string(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
2021-04-27 15:10:39 +00:00
|
|
|
play.into_glib(),
|
|
|
|
unit.into_glib(),
|
2019-06-18 10:12:00 +00:00
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_rate_control")]
|
|
|
|
#[doc(alias = "get_rate_control")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn is_rate_control(&self) -> bool {
|
2020-04-30 16:51:41 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_get_rate_control(
|
2020-04-30 16:51:41 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_rates")]
|
|
|
|
#[doc(alias = "get_rates")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn rates(&self) -> Option<(f64, f64)> {
|
2020-04-30 16:51:41 +00:00
|
|
|
unsafe {
|
|
|
|
let mut rate = mem::MaybeUninit::uninit();
|
|
|
|
let mut applied_rate = mem::MaybeUninit::uninit();
|
2020-11-22 10:40:56 +00:00
|
|
|
let ret = from_glib(ffi::gst_rtsp_media_get_rates(
|
2020-04-30 16:51:41 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
rate.as_mut_ptr(),
|
|
|
|
applied_rate.as_mut_ptr(),
|
|
|
|
));
|
|
|
|
if ret {
|
2022-05-18 20:27:53 +00:00
|
|
|
Some((rate.assume_init(), applied_rate.assume_init()))
|
2020-04-30 16:51:41 +00:00
|
|
|
} else {
|
|
|
|
None
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_retransmission_time")]
|
|
|
|
#[doc(alias = "get_retransmission_time")]
|
2021-04-05 10:48:30 +00:00
|
|
|
fn retransmission_time(&self) -> Option<gst::ClockTime> {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_get_retransmission_time(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_status")]
|
|
|
|
#[doc(alias = "get_status")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn status(&self) -> RTSPMediaStatus {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_get_status(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_stream")]
|
|
|
|
#[doc(alias = "get_stream")]
|
2021-04-19 20:13:58 +00:00
|
|
|
fn stream(&self, idx: u32) -> Option<RTSPStream> {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib_none(ffi::gst_rtsp_media_get_stream(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
idx,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_suspend_mode")]
|
|
|
|
#[doc(alias = "get_suspend_mode")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn suspend_mode(&self) -> RTSPSuspendMode {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_get_suspend_mode(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_time_provider")]
|
|
|
|
#[doc(alias = "get_time_provider")]
|
2021-05-25 23:19:25 +00:00
|
|
|
fn time_provider(&self, address: Option<&str>, port: u16) -> Option<gst_net::NetTimeProvider> {
|
|
|
|
unsafe {
|
|
|
|
from_glib_full(ffi::gst_rtsp_media_get_time_provider(
|
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
address.to_glib_none().0,
|
|
|
|
port,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_get_transport_mode")]
|
|
|
|
#[doc(alias = "get_transport_mode")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn transport_mode(&self) -> RTSPTransportMode {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_get_transport_mode(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_media_handle_sdp")]
|
2018-02-09 02:30:08 +00:00
|
|
|
//fn handle_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage) -> bool {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_media_handle_sdp() }
|
2018-02-09 02:30:08 +00:00
|
|
|
//}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_has_completed_sender")]
|
2020-04-30 16:51:41 +00:00
|
|
|
fn has_completed_sender(&self) -> bool {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_has_completed_sender(
|
2020-04-30 16:51:41 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_is_bind_mcast_address")]
|
2019-04-23 14:32:09 +00:00
|
|
|
fn is_bind_mcast_address(&self) -> bool {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_is_bind_mcast_address(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2019-04-23 14:32:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_is_eos_shutdown")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn is_eos_shutdown(&self) -> bool {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_is_eos_shutdown(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_is_receive_only")]
|
2020-04-30 16:51:41 +00:00
|
|
|
fn is_receive_only(&self) -> bool {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_is_receive_only(
|
2020-04-30 16:51:41 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_is_reusable")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn is_reusable(&self) -> bool {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_is_reusable(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_is_shared")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn is_shared(&self) -> bool {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_is_shared(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_is_stop_on_disconnect")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn is_stop_on_disconnect(&self) -> bool {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_is_stop_on_disconnect(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_is_time_provider")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn is_time_provider(&self) -> bool {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_is_time_provider(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_lock")]
|
2020-04-30 16:51:41 +00:00
|
|
|
fn lock(&self) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_lock(self.as_ref().to_glib_none().0);
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_n_streams")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn n_streams(&self) -> u32 {
|
2020-11-22 10:40:56 +00:00
|
|
|
unsafe { ffi::gst_rtsp_media_n_streams(self.as_ref().to_glib_none().0) }
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_prepare")]
|
2023-01-03 18:56:00 +00:00
|
|
|
fn prepare(&self, thread: Option<RTSPThread>) -> Result<(), glib::error::BoolError> {
|
2020-02-23 07:58:54 +00:00
|
|
|
unsafe {
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::result_from_gboolean!(
|
2023-01-03 18:56:00 +00:00
|
|
|
ffi::gst_rtsp_media_prepare(self.as_ref().to_glib_none().0, thread.into_glib_ptr()),
|
2020-02-23 07:58:54 +00:00
|
|
|
"Failed to prepare media"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_media_seek")]
|
2018-02-09 02:30:08 +00:00
|
|
|
//fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_media_seek() }
|
2018-02-09 02:30:08 +00:00
|
|
|
//}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
//#[cfg(feature = "v1_18")]
|
|
|
|
//#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_media_seek_full")]
|
2018-03-15 08:21:53 +00:00
|
|
|
//fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_media_seek_full() }
|
2018-03-15 08:21:53 +00:00
|
|
|
//}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
//#[cfg(feature = "v1_18")]
|
|
|
|
//#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_media_seek_trickmode")]
|
2021-04-05 10:48:30 +00:00
|
|
|
//fn seek_trickmode(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags, rate: f64, trickmode_interval: impl Into<Option<gst::ClockTime>>) -> bool {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_media_seek_trickmode() }
|
2020-04-30 16:51:41 +00:00
|
|
|
//}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_media_seekable")]
|
2018-03-15 08:21:53 +00:00
|
|
|
//fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_media_seekable() }
|
2018-03-15 08:21:53 +00:00
|
|
|
//}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_address_pool")]
|
2021-05-23 19:22:45 +00:00
|
|
|
fn set_address_pool(&self, pool: Option<&impl IsA<RTSPAddressPool>>) {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_set_address_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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_bind_mcast_address")]
|
2019-04-23 14:32:09 +00:00
|
|
|
fn set_bind_mcast_address(&self, bind_mcast_addr: bool) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_set_bind_mcast_address(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
2021-04-27 15:10:39 +00:00
|
|
|
bind_mcast_addr.into_glib(),
|
2019-06-18 10:12:00 +00:00
|
|
|
);
|
2019-04-23 14:32:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_buffer_size")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn set_buffer_size(&self, size: u32) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_set_buffer_size(self.as_ref().to_glib_none().0, size);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_clock")]
|
2021-05-23 19:22:45 +00:00
|
|
|
fn set_clock(&self, clock: Option<&impl IsA<gst::Clock>>) {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_set_clock(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
clock.map(|p| p.as_ref()).to_glib_none().0,
|
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_do_retransmission")]
|
2019-04-23 14:32:09 +00:00
|
|
|
fn set_do_retransmission(&self, do_retransmission: bool) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_set_do_retransmission(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
2021-04-27 15:10:39 +00:00
|
|
|
do_retransmission.into_glib(),
|
2019-06-18 10:12:00 +00:00
|
|
|
);
|
2019-04-23 14:32:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_dscp_qos")]
|
2020-06-03 12:26:16 +00:00
|
|
|
fn set_dscp_qos(&self, dscp_qos: i32) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_set_dscp_qos(self.as_ref().to_glib_none().0, dscp_qos);
|
2020-06-03 12:26:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_eos_shutdown")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn set_eos_shutdown(&self, eos_shutdown: bool) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_set_eos_shutdown(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
2021-04-27 15:10:39 +00:00
|
|
|
eos_shutdown.into_glib(),
|
2019-06-18 10:12:00 +00:00
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_latency")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn set_latency(&self, latency: u32) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_set_latency(self.as_ref().to_glib_none().0, latency);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_max_mcast_ttl")]
|
2019-04-23 14:32:09 +00:00
|
|
|
fn set_max_mcast_ttl(&self, ttl: u32) -> bool {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_set_max_mcast_ttl(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
ttl,
|
|
|
|
))
|
2019-04-23 14:32:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_multicast_iface")]
|
2019-03-19 07:40:05 +00:00
|
|
|
fn set_multicast_iface(&self, multicast_iface: Option<&str>) {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_set_multicast_iface(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
multicast_iface.to_glib_none().0,
|
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_media_set_permissions")]
|
2019-01-29 13:53:44 +00:00
|
|
|
//fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_media_set_permissions() }
|
2018-02-09 02:30:08 +00:00
|
|
|
//}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_pipeline_state")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn set_pipeline_state(&self, state: gst::State) {
|
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
ffi::gst_rtsp_media_set_pipeline_state(
|
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
state.into_glib(),
|
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_profiles")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) {
|
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
ffi::gst_rtsp_media_set_profiles(self.as_ref().to_glib_none().0, profiles.into_glib());
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_protocols")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) {
|
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
ffi::gst_rtsp_media_set_protocols(
|
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
protocols.into_glib(),
|
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_publish_clock_mode")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_set_publish_clock_mode(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
2021-04-27 15:10:39 +00:00
|
|
|
mode.into_glib(),
|
2019-06-18 10:12:00 +00:00
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_rate_control")]
|
2020-04-30 16:51:41 +00:00
|
|
|
fn set_rate_control(&self, enabled: bool) {
|
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
ffi::gst_rtsp_media_set_rate_control(
|
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
enabled.into_glib(),
|
|
|
|
);
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_retransmission_time")]
|
2021-04-05 10:48:30 +00:00
|
|
|
fn set_retransmission_time(&self, time: impl Into<Option<gst::ClockTime>>) {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_set_retransmission_time(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
2021-04-05 10:48:30 +00:00
|
|
|
time.into().into_glib(),
|
2019-06-18 10:12:00 +00:00
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_reusable")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn set_reusable(&self, reusable: bool) {
|
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
ffi::gst_rtsp_media_set_reusable(self.as_ref().to_glib_none().0, reusable.into_glib());
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_shared")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn set_shared(&self, shared: bool) {
|
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
ffi::gst_rtsp_media_set_shared(self.as_ref().to_glib_none().0, shared.into_glib());
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_state")]
|
2020-04-05 14:52:56 +00:00
|
|
|
fn set_state(&self, state: gst::State, transports: &[RTSPStreamTransport]) -> bool {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(ffi::gst_rtsp_media_set_state(
|
2020-04-05 14:52:56 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
2021-04-27 15:10:39 +00:00
|
|
|
state.into_glib(),
|
2020-04-05 14:52:56 +00:00
|
|
|
transports.to_glib_none().0,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_stop_on_disconnect")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn set_stop_on_disconnect(&self, stop_on_disconnect: bool) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_set_stop_on_disconnect(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
2021-04-27 15:10:39 +00:00
|
|
|
stop_on_disconnect.into_glib(),
|
2019-06-18 10:12:00 +00:00
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_suspend_mode")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn set_suspend_mode(&self, mode: RTSPSuspendMode) {
|
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
ffi::gst_rtsp_media_set_suspend_mode(self.as_ref().to_glib_none().0, mode.into_glib());
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_set_transport_mode")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn set_transport_mode(&self, mode: RTSPTransportMode) {
|
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
ffi::gst_rtsp_media_set_transport_mode(
|
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
mode.into_glib(),
|
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
//#[doc(alias = "gst_rtsp_media_setup_sdp")]
|
2018-02-09 02:30:08 +00:00
|
|
|
//fn setup_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage, info: /*Ignored*/&mut SDPInfo) -> bool {
|
2020-11-22 10:40:56 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_rtsp_media_setup_sdp() }
|
2018-02-09 02:30:08 +00:00
|
|
|
//}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_suspend")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn suspend(&self) -> Result<(), glib::error::BoolError> {
|
|
|
|
unsafe {
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::result_from_gboolean!(
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_suspend(self.as_ref().to_glib_none().0),
|
2019-06-18 10:12:00 +00:00
|
|
|
"Failed to suspend media"
|
|
|
|
)
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_unlock")]
|
2020-04-30 16:51:41 +00:00
|
|
|
fn unlock(&self) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_unlock(self.as_ref().to_glib_none().0);
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_unprepare")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn unprepare(&self) -> Result<(), glib::error::BoolError> {
|
|
|
|
unsafe {
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::result_from_gboolean!(
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_unprepare(self.as_ref().to_glib_none().0),
|
2019-06-18 10:12:00 +00:00
|
|
|
"Failed to unprepare media"
|
|
|
|
)
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_unsuspend")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn unsuspend(&self) -> Result<(), glib::error::BoolError> {
|
|
|
|
unsafe {
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::result_from_gboolean!(
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_unsuspend(self.as_ref().to_glib_none().0),
|
2019-06-18 10:12:00 +00:00
|
|
|
"Failed to unsuspend media"
|
|
|
|
)
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "gst_rtsp_media_use_time_provider")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn use_time_provider(&self, time_provider: bool) {
|
|
|
|
unsafe {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::gst_rtsp_media_use_time_provider(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
2021-04-27 15:10:39 +00:00
|
|
|
time_provider.into_glib(),
|
2019-06-18 10:12:00 +00:00
|
|
|
);
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "bind-mcast-address")]
|
2019-04-23 14:32:09 +00:00
|
|
|
fn get_property_bind_mcast_address(&self) -> bool {
|
2023-07-06 13:05:38 +00:00
|
|
|
ObjectExt::property(self.as_ref(), "bind-mcast-address")
|
2019-04-23 14:32:09 +00:00
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "bind-mcast-address")]
|
2019-04-23 14:32:09 +00:00
|
|
|
fn set_property_bind_mcast_address(&self, bind_mcast_address: bool) {
|
2023-07-06 13:05:38 +00:00
|
|
|
ObjectExt::set_property(self.as_ref(), "bind-mcast-address", bind_mcast_address)
|
2019-04-23 14:32:09 +00:00
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "dscp-qos")]
|
2020-06-03 12:26:16 +00:00
|
|
|
fn get_property_dscp_qos(&self) -> i32 {
|
2023-07-06 13:05:38 +00:00
|
|
|
ObjectExt::property(self.as_ref(), "dscp-qos")
|
2020-06-03 12:26:16 +00:00
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "dscp-qos")]
|
2020-06-03 12:26:16 +00:00
|
|
|
fn set_property_dscp_qos(&self, dscp_qos: i32) {
|
2023-07-06 13:05:38 +00:00
|
|
|
ObjectExt::set_property(self.as_ref(), "dscp-qos", dscp_qos)
|
2020-06-03 12:26:16 +00:00
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "max-mcast-ttl")]
|
2019-04-23 14:32:09 +00:00
|
|
|
fn get_property_max_mcast_ttl(&self) -> u32 {
|
2023-07-06 13:05:38 +00:00
|
|
|
ObjectExt::property(self.as_ref(), "max-mcast-ttl")
|
2019-04-23 14:32:09 +00:00
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "max-mcast-ttl")]
|
2019-04-23 14:32:09 +00:00
|
|
|
fn set_property_max_mcast_ttl(&self, max_mcast_ttl: u32) {
|
2023-07-06 13:05:38 +00:00
|
|
|
ObjectExt::set_property(self.as_ref(), "max-mcast-ttl", max_mcast_ttl)
|
2019-04-23 14:32:09 +00:00
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "time-provider")]
|
2021-04-11 19:38:18 +00:00
|
|
|
fn set_time_provider(&self, time_provider: bool) {
|
2023-07-06 13:05:38 +00:00
|
|
|
ObjectExt::set_property(self.as_ref(), "time-provider", time_provider)
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "handle-message")]
|
2022-10-12 12:05:07 +00:00
|
|
|
fn connect_handle_message<F: Fn(&Self, &gst::Message) -> bool + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
detail: Option<&str>,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn handle_message_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P, &gst::Message) -> bool + Send + Sync + 'static,
|
|
|
|
>(
|
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
message: *mut gst::ffi::GstMessage,
|
|
|
|
f: glib::ffi::gpointer,
|
|
|
|
) -> glib::ffi::gboolean {
|
|
|
|
let f: &F = &*(f as *const F);
|
|
|
|
f(
|
|
|
|
RTSPMedia::from_glib_borrow(this).unsafe_cast_ref(),
|
|
|
|
&from_glib_borrow(message),
|
|
|
|
)
|
|
|
|
.into_glib()
|
|
|
|
}
|
|
|
|
unsafe {
|
|
|
|
let f: Box_<F> = Box_::new(f);
|
2022-11-12 15:40:16 +00:00
|
|
|
let detailed_signal_name = detail.map(|name| format!("handle-message::{name}\0"));
|
2022-10-12 12:05:07 +00:00
|
|
|
let signal_name: &[u8] = detailed_signal_name
|
|
|
|
.as_ref()
|
|
|
|
.map_or(&b"handle-message\0"[..], |n| n.as_bytes());
|
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
signal_name.as_ptr() as *const _,
|
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
handle_message_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "new-state")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_new_state<F: Fn(&Self, i32) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
2021-05-26 22:02:42 +00:00
|
|
|
unsafe extern "C" fn new_state_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P, i32) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
2019-06-18 10:12:00 +00:00
|
|
|
object: libc::c_int,
|
2020-11-22 10:40:56 +00:00
|
|
|
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(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref(), 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-state\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
new_state_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "new-stream")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_new_stream<F: Fn(&Self, &RTSPStream) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn new_stream_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPMedia>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPStream) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
object: *mut ffi::GstRTSPStream,
|
|
|
|
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
|
|
|
RTSPMedia::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-stream\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
new_stream_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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "prepared")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn connect_prepared<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
2021-05-26 22:02:42 +00:00
|
|
|
unsafe extern "C" fn prepared_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
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(RTSPMedia::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"prepared\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
prepared_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "removed-stream")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_removed_stream<F: Fn(&Self, &RTSPStream) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn removed_stream_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPMedia>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P, &RTSPStream) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
object: *mut ffi::GstRTSPStream,
|
|
|
|
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
|
|
|
RTSPMedia::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"removed-stream\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
removed_stream_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "target-state")]
|
2019-06-18 10:12:00 +00:00
|
|
|
fn connect_target_state<F: Fn(&Self, i32) + Send + Sync + 'static>(
|
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
2021-05-26 22:02:42 +00:00
|
|
|
unsafe extern "C" fn target_state_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P, i32) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
2019-06-18 10:12:00 +00:00
|
|
|
object: libc::c_int,
|
2020-11-22 10:40:56 +00:00
|
|
|
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(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref(), 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"target-state\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
target_state_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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "unprepared")]
|
2018-02-09 02:30:08 +00:00
|
|
|
fn connect_unprepared<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
2021-05-26 22:02:42 +00:00
|
|
|
unsafe extern "C" fn unprepared_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
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(RTSPMedia::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"unprepared\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
unprepared_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "bind-mcast-address")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_bind_mcast_address_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
2019-06-18 10:12:00 +00:00
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn notify_bind_mcast_address_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPMedia>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2019-04-23 14:32:09 +00:00
|
|
|
unsafe {
|
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::bind-mcast-address\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_bind_mcast_address_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "buffer-size")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_buffer_size_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_buffer_size_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::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::buffer-size\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_buffer_size_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "clock")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
2021-05-26 22:02:42 +00:00
|
|
|
unsafe extern "C" fn notify_clock_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::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::clock\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_clock_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "dscp-qos")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_dscp_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
2020-06-03 12:26:16 +00:00
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
2021-05-26 22:02:42 +00:00
|
|
|
unsafe extern "C" fn notify_dscp_qos_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_param_spec: glib::ffi::gpointer,
|
|
|
|
f: glib::ffi::gpointer,
|
2021-05-26 22:02:42 +00:00
|
|
|
) {
|
2020-06-03 12:26:16 +00:00
|
|
|
let f: &F = &*(f as *const F);
|
2021-06-21 21:07:45 +00:00
|
|
|
f(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
|
2020-06-03 12:26:16 +00:00
|
|
|
}
|
|
|
|
unsafe {
|
|
|
|
let f: Box_<F> = Box_::new(f);
|
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::dscp-qos\0".as_ptr() as *const _,
|
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_dscp_qos_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "eos-shutdown")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_eos_shutdown_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_eos_shutdown_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::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::eos-shutdown\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_eos_shutdown_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "latency")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_latency_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_latency_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::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::latency\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_latency_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "max-mcast-ttl")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_max_mcast_ttl_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_max_mcast_ttl_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::from_glib_borrow(this).unsafe_cast_ref())
|
2019-06-18 10:10:46 +00:00
|
|
|
}
|
2019-04-23 14:32:09 +00:00
|
|
|
unsafe {
|
|
|
|
let f: Box_<F> = Box_::new(f);
|
2019-06-18 10:12:00 +00:00
|
|
|
connect_raw(
|
|
|
|
self.as_ptr() as *mut _,
|
|
|
|
b"notify::max-mcast-ttl\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_max_mcast_ttl_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "profiles")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_profiles_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_profiles_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::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::profiles\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_profiles_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "protocols")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_protocols_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_protocols_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::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::protocols\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_protocols_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "reusable")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_reusable_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_reusable_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::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::reusable\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_reusable_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "shared")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_shared_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
2021-05-26 22:02:42 +00:00
|
|
|
unsafe extern "C" fn notify_shared_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::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::shared\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_shared_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "stop-on-disconnect")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_stop_on_disconnect_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
2019-06-18 10:12:00 +00:00
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn notify_stop_on_disconnect_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPMedia>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::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::stop-on-disconnect\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_stop_on_disconnect_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "suspend-mode")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_suspend_mode_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_suspend_mode_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::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::suspend-mode\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_suspend_mode_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "time-provider")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_time_provider_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_time_provider_trampoline<
|
|
|
|
P: IsA<RTSPMedia>,
|
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::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::time-provider\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_time_provider_trampoline::<Self, F> as *const (),
|
|
|
|
)),
|
2019-06-18 10:12:00 +00:00
|
|
|
Box_::into_raw(f),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-05 18:20:29 +00:00
|
|
|
#[doc(alias = "transport-mode")]
|
2021-05-03 18:35:37 +00:00
|
|
|
fn connect_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
2019-06-18 10:12:00 +00:00
|
|
|
&self,
|
|
|
|
f: F,
|
|
|
|
) -> SignalHandlerId {
|
|
|
|
unsafe extern "C" fn notify_transport_mode_trampoline<
|
2021-05-26 22:02:42 +00:00
|
|
|
P: IsA<RTSPMedia>,
|
2019-06-18 10:12:00 +00:00
|
|
|
F: Fn(&P) + Send + Sync + 'static,
|
|
|
|
>(
|
2020-11-22 10:40:56 +00:00
|
|
|
this: *mut ffi::GstRTSPMedia,
|
|
|
|
_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(RTSPMedia::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::transport-mode\0".as_ptr() as *const _,
|
2020-04-13 16:11:33 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn()>(
|
|
|
|
notify_transport_mode_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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-05 18:20:29 +00:00
|
|
|
|
|
|
|
impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {}
|