mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 11:01:10 +00:00
gstreamer-rtsp-server: Regenerate
This commit is contained in:
parent
0327e98b5f
commit
1e9d3e717c
18 changed files with 977 additions and 1280 deletions
|
@ -9,8 +9,6 @@ use glib::value::SetValue;
|
|||
use glib::value::Value;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use gobject_sys;
|
||||
use gst_rtsp_server_sys;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
||||
#[non_exhaustive]
|
||||
|
@ -26,25 +24,23 @@ pub enum RTSPAddressPoolResult {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPAddressPoolResult {
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPAddressPoolResult;
|
||||
type GlibType = ffi::GstRTSPAddressPoolResult;
|
||||
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPAddressPoolResult {
|
||||
fn to_glib(&self) -> ffi::GstRTSPAddressPoolResult {
|
||||
match *self {
|
||||
RTSPAddressPoolResult::Ok => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_OK,
|
||||
RTSPAddressPoolResult::Einval => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_EINVAL,
|
||||
RTSPAddressPoolResult::Ereserved => {
|
||||
gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_ERESERVED
|
||||
}
|
||||
RTSPAddressPoolResult::Erange => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_ERANGE,
|
||||
RTSPAddressPoolResult::Elast => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_ELAST,
|
||||
RTSPAddressPoolResult::Ok => ffi::GST_RTSP_ADDRESS_POOL_OK,
|
||||
RTSPAddressPoolResult::Einval => ffi::GST_RTSP_ADDRESS_POOL_EINVAL,
|
||||
RTSPAddressPoolResult::Ereserved => ffi::GST_RTSP_ADDRESS_POOL_ERESERVED,
|
||||
RTSPAddressPoolResult::Erange => ffi::GST_RTSP_ADDRESS_POOL_ERANGE,
|
||||
RTSPAddressPoolResult::Elast => ffi::GST_RTSP_ADDRESS_POOL_ELAST,
|
||||
RTSPAddressPoolResult::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPAddressPoolResult> for RTSPAddressPoolResult {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPAddressPoolResult) -> Self {
|
||||
impl FromGlib<ffi::GstRTSPAddressPoolResult> for RTSPAddressPoolResult {
|
||||
fn from_glib(value: ffi::GstRTSPAddressPoolResult) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => RTSPAddressPoolResult::Ok,
|
||||
|
@ -69,21 +65,21 @@ pub enum RTSPFilterResult {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPFilterResult {
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPFilterResult;
|
||||
type GlibType = ffi::GstRTSPFilterResult;
|
||||
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPFilterResult {
|
||||
fn to_glib(&self) -> ffi::GstRTSPFilterResult {
|
||||
match *self {
|
||||
RTSPFilterResult::Remove => gst_rtsp_server_sys::GST_RTSP_FILTER_REMOVE,
|
||||
RTSPFilterResult::Keep => gst_rtsp_server_sys::GST_RTSP_FILTER_KEEP,
|
||||
RTSPFilterResult::Ref => gst_rtsp_server_sys::GST_RTSP_FILTER_REF,
|
||||
RTSPFilterResult::Remove => ffi::GST_RTSP_FILTER_REMOVE,
|
||||
RTSPFilterResult::Keep => ffi::GST_RTSP_FILTER_KEEP,
|
||||
RTSPFilterResult::Ref => ffi::GST_RTSP_FILTER_REF,
|
||||
RTSPFilterResult::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPFilterResult> for RTSPFilterResult {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPFilterResult) -> Self {
|
||||
impl FromGlib<ffi::GstRTSPFilterResult> for RTSPFilterResult {
|
||||
fn from_glib(value: ffi::GstRTSPFilterResult) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => RTSPFilterResult::Remove,
|
||||
|
@ -109,24 +105,24 @@ pub enum RTSPMediaStatus {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPMediaStatus {
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPMediaStatus;
|
||||
type GlibType = ffi::GstRTSPMediaStatus;
|
||||
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPMediaStatus {
|
||||
fn to_glib(&self) -> ffi::GstRTSPMediaStatus {
|
||||
match *self {
|
||||
RTSPMediaStatus::Unprepared => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_UNPREPARED,
|
||||
RTSPMediaStatus::Unpreparing => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_UNPREPARING,
|
||||
RTSPMediaStatus::Preparing => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_PREPARING,
|
||||
RTSPMediaStatus::Prepared => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_PREPARED,
|
||||
RTSPMediaStatus::Suspended => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_SUSPENDED,
|
||||
RTSPMediaStatus::Error => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_ERROR,
|
||||
RTSPMediaStatus::Unprepared => ffi::GST_RTSP_MEDIA_STATUS_UNPREPARED,
|
||||
RTSPMediaStatus::Unpreparing => ffi::GST_RTSP_MEDIA_STATUS_UNPREPARING,
|
||||
RTSPMediaStatus::Preparing => ffi::GST_RTSP_MEDIA_STATUS_PREPARING,
|
||||
RTSPMediaStatus::Prepared => ffi::GST_RTSP_MEDIA_STATUS_PREPARED,
|
||||
RTSPMediaStatus::Suspended => ffi::GST_RTSP_MEDIA_STATUS_SUSPENDED,
|
||||
RTSPMediaStatus::Error => ffi::GST_RTSP_MEDIA_STATUS_ERROR,
|
||||
RTSPMediaStatus::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPMediaStatus> for RTSPMediaStatus {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPMediaStatus) -> Self {
|
||||
impl FromGlib<ffi::GstRTSPMediaStatus> for RTSPMediaStatus {
|
||||
fn from_glib(value: ffi::GstRTSPMediaStatus) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => RTSPMediaStatus::Unprepared,
|
||||
|
@ -152,14 +148,14 @@ pub enum RTSPPublishClockMode {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPPublishClockMode {
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPPublishClockMode;
|
||||
type GlibType = ffi::GstRTSPPublishClockMode;
|
||||
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPPublishClockMode {
|
||||
fn to_glib(&self) -> ffi::GstRTSPPublishClockMode {
|
||||
match *self {
|
||||
RTSPPublishClockMode::None => gst_rtsp_server_sys::GST_RTSP_PUBLISH_CLOCK_MODE_NONE,
|
||||
RTSPPublishClockMode::Clock => gst_rtsp_server_sys::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK,
|
||||
RTSPPublishClockMode::None => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_NONE,
|
||||
RTSPPublishClockMode::Clock => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK,
|
||||
RTSPPublishClockMode::ClockAndOffset => {
|
||||
gst_rtsp_server_sys::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET
|
||||
ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET
|
||||
}
|
||||
RTSPPublishClockMode::__Unknown(value) => value,
|
||||
}
|
||||
|
@ -167,8 +163,8 @@ impl ToGlib for RTSPPublishClockMode {
|
|||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPPublishClockMode> for RTSPPublishClockMode {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPPublishClockMode) -> Self {
|
||||
impl FromGlib<ffi::GstRTSPPublishClockMode> for RTSPPublishClockMode {
|
||||
fn from_glib(value: ffi::GstRTSPPublishClockMode) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => RTSPPublishClockMode::None,
|
||||
|
@ -181,7 +177,7 @@ impl FromGlib<gst_rtsp_server_sys::GstRTSPPublishClockMode> for RTSPPublishClock
|
|||
|
||||
impl StaticType for RTSPPublishClockMode {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(gst_rtsp_server_sys::gst_rtsp_publish_clock_mode_get_type()) }
|
||||
unsafe { from_glib(ffi::gst_rtsp_publish_clock_mode_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -193,13 +189,13 @@ impl<'a> FromValueOptional<'a> for RTSPPublishClockMode {
|
|||
|
||||
impl<'a> FromValue<'a> for RTSPPublishClockMode {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for RTSPPublishClockMode {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -215,21 +211,21 @@ pub enum RTSPSuspendMode {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPSuspendMode {
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPSuspendMode;
|
||||
type GlibType = ffi::GstRTSPSuspendMode;
|
||||
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPSuspendMode {
|
||||
fn to_glib(&self) -> ffi::GstRTSPSuspendMode {
|
||||
match *self {
|
||||
RTSPSuspendMode::None => gst_rtsp_server_sys::GST_RTSP_SUSPEND_MODE_NONE,
|
||||
RTSPSuspendMode::Pause => gst_rtsp_server_sys::GST_RTSP_SUSPEND_MODE_PAUSE,
|
||||
RTSPSuspendMode::Reset => gst_rtsp_server_sys::GST_RTSP_SUSPEND_MODE_RESET,
|
||||
RTSPSuspendMode::None => ffi::GST_RTSP_SUSPEND_MODE_NONE,
|
||||
RTSPSuspendMode::Pause => ffi::GST_RTSP_SUSPEND_MODE_PAUSE,
|
||||
RTSPSuspendMode::Reset => ffi::GST_RTSP_SUSPEND_MODE_RESET,
|
||||
RTSPSuspendMode::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPSuspendMode> for RTSPSuspendMode {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPSuspendMode) -> Self {
|
||||
impl FromGlib<ffi::GstRTSPSuspendMode> for RTSPSuspendMode {
|
||||
fn from_glib(value: ffi::GstRTSPSuspendMode) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => RTSPSuspendMode::None,
|
||||
|
@ -242,7 +238,7 @@ impl FromGlib<gst_rtsp_server_sys::GstRTSPSuspendMode> for RTSPSuspendMode {
|
|||
|
||||
impl StaticType for RTSPSuspendMode {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(gst_rtsp_server_sys::gst_rtsp_suspend_mode_get_type()) }
|
||||
unsafe { from_glib(ffi::gst_rtsp_suspend_mode_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -254,13 +250,13 @@ impl<'a> FromValueOptional<'a> for RTSPSuspendMode {
|
|||
|
||||
impl<'a> FromValue<'a> for RTSPSuspendMode {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for RTSPSuspendMode {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,20 +271,20 @@ pub enum RTSPThreadType {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPThreadType {
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPThreadType;
|
||||
type GlibType = ffi::GstRTSPThreadType;
|
||||
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPThreadType {
|
||||
fn to_glib(&self) -> ffi::GstRTSPThreadType {
|
||||
match *self {
|
||||
RTSPThreadType::Client => gst_rtsp_server_sys::GST_RTSP_THREAD_TYPE_CLIENT,
|
||||
RTSPThreadType::Media => gst_rtsp_server_sys::GST_RTSP_THREAD_TYPE_MEDIA,
|
||||
RTSPThreadType::Client => ffi::GST_RTSP_THREAD_TYPE_CLIENT,
|
||||
RTSPThreadType::Media => ffi::GST_RTSP_THREAD_TYPE_MEDIA,
|
||||
RTSPThreadType::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPThreadType> for RTSPThreadType {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPThreadType) -> Self {
|
||||
impl FromGlib<ffi::GstRTSPThreadType> for RTSPThreadType {
|
||||
fn from_glib(value: ffi::GstRTSPThreadType) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => RTSPThreadType::Client,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use bitflags::bitflags;
|
||||
use glib::translate::*;
|
||||
use glib::value::FromValue;
|
||||
use glib::value::FromValueOptional;
|
||||
|
@ -9,8 +10,6 @@ use glib::value::SetValue;
|
|||
use glib::value::Value;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use gobject_sys;
|
||||
use gst_rtsp_server_sys;
|
||||
|
||||
bitflags! {
|
||||
pub struct RTSPAddressFlags: u32 {
|
||||
|
@ -24,16 +23,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPAddressFlags {
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPAddressFlags;
|
||||
type GlibType = ffi::GstRTSPAddressFlags;
|
||||
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPAddressFlags {
|
||||
fn to_glib(&self) -> ffi::GstRTSPAddressFlags {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPAddressFlags> for RTSPAddressFlags {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPAddressFlags) -> RTSPAddressFlags {
|
||||
impl FromGlib<ffi::GstRTSPAddressFlags> for RTSPAddressFlags {
|
||||
fn from_glib(value: ffi::GstRTSPAddressFlags) -> RTSPAddressFlags {
|
||||
skip_assert_initialized!();
|
||||
RTSPAddressFlags::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -48,16 +47,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPTransportMode {
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPTransportMode;
|
||||
type GlibType = ffi::GstRTSPTransportMode;
|
||||
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPTransportMode {
|
||||
fn to_glib(&self) -> ffi::GstRTSPTransportMode {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPTransportMode> for RTSPTransportMode {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPTransportMode) -> RTSPTransportMode {
|
||||
impl FromGlib<ffi::GstRTSPTransportMode> for RTSPTransportMode {
|
||||
fn from_glib(value: ffi::GstRTSPTransportMode) -> RTSPTransportMode {
|
||||
skip_assert_initialized!();
|
||||
RTSPTransportMode::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -65,7 +64,7 @@ impl FromGlib<gst_rtsp_server_sys::GstRTSPTransportMode> for RTSPTransportMode {
|
|||
|
||||
impl StaticType for RTSPTransportMode {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(gst_rtsp_server_sys::gst_rtsp_transport_mode_get_type()) }
|
||||
unsafe { from_glib(ffi::gst_rtsp_transport_mode_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,12 +76,12 @@ impl<'a> FromValueOptional<'a> for RTSPTransportMode {
|
|||
|
||||
impl<'a> FromValue<'a> for RTSPTransportMode {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
|
||||
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for RTSPTransportMode {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,16 +3,15 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use glib::translate::*;
|
||||
use gst_rtsp_server_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
glib::glib_wrapper! {
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct RTSPAddress(Boxed<gst_rtsp_server_sys::GstRTSPAddress>);
|
||||
pub struct RTSPAddress(Boxed<ffi::GstRTSPAddress>);
|
||||
|
||||
match fn {
|
||||
copy => |ptr| gst_rtsp_server_sys::gst_rtsp_address_copy(mut_override(ptr)),
|
||||
free => |ptr| gst_rtsp_server_sys::gst_rtsp_address_free(ptr),
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_address_get_type(),
|
||||
copy => |ptr| ffi::gst_rtsp_address_copy(mut_override(ptr)),
|
||||
free => |ptr| ffi::gst_rtsp_address_free(ptr),
|
||||
get_type => || ffi::gst_rtsp_address_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,25 +2,23 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use glib;
|
||||
use crate::RTSPAddress;
|
||||
use crate::RTSPAddressFlags;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst_rtsp_server_sys;
|
||||
use RTSPAddress;
|
||||
use RTSPAddressFlags;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPAddressPool(Object<gst_rtsp_server_sys::GstRTSPAddressPool, gst_rtsp_server_sys::GstRTSPAddressPoolClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPAddressPool(Object<ffi::GstRTSPAddressPool, ffi::GstRTSPAddressPoolClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_address_pool_get_type(),
|
||||
get_type => || ffi::gst_rtsp_address_pool_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl RTSPAddressPool {
|
||||
pub fn new() -> RTSPAddressPool {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_address_pool_new()) }
|
||||
unsafe { from_glib_full(ffi::gst_rtsp_address_pool_new()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,12 +63,12 @@ impl<O: IsA<RTSPAddressPool>> RTSPAddressPoolExt for O {
|
|||
n_ports: i32,
|
||||
) -> Result<RTSPAddress, glib::BoolError> {
|
||||
unsafe {
|
||||
Option::<_>::from_glib_full(gst_rtsp_server_sys::gst_rtsp_address_pool_acquire_address(
|
||||
Option::<_>::from_glib_full(ffi::gst_rtsp_address_pool_acquire_address(
|
||||
self.as_ref().to_glib_none().0,
|
||||
flags.to_glib(),
|
||||
n_ports,
|
||||
))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to acquire address"))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to acquire address"))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,8 +81,8 @@ impl<O: IsA<RTSPAddressPool>> RTSPAddressPoolExt for O {
|
|||
ttl: u8,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_address_pool_add_range(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_address_pool_add_range(
|
||||
self.as_ref().to_glib_none().0,
|
||||
min_address.to_glib_none().0,
|
||||
max_address.to_glib_none().0,
|
||||
|
@ -99,23 +97,21 @@ impl<O: IsA<RTSPAddressPool>> RTSPAddressPoolExt for O {
|
|||
|
||||
fn clear(&self) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_address_pool_clear(self.as_ref().to_glib_none().0);
|
||||
ffi::gst_rtsp_address_pool_clear(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn dump(&self) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_address_pool_dump(self.as_ref().to_glib_none().0);
|
||||
ffi::gst_rtsp_address_pool_dump(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn has_unicast_addresses(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_rtsp_server_sys::gst_rtsp_address_pool_has_unicast_addresses(
|
||||
from_glib(ffi::gst_rtsp_address_pool_has_unicast_addresses(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,55 +2,43 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use gio;
|
||||
use gio_sys;
|
||||
use glib;
|
||||
use crate::RTSPToken;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib_sys;
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
||||
use gst_rtsp;
|
||||
use gst_rtsp_server_sys;
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
use std;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use RTSPToken;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPAuth(Object<gst_rtsp_server_sys::GstRTSPAuth, gst_rtsp_server_sys::GstRTSPAuthClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPAuth(Object<ffi::GstRTSPAuth, ffi::GstRTSPAuthClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_auth_get_type(),
|
||||
get_type => || ffi::gst_rtsp_auth_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl RTSPAuth {
|
||||
pub fn new() -> RTSPAuth {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_new()) }
|
||||
unsafe { from_glib_full(ffi::gst_rtsp_auth_new()) }
|
||||
}
|
||||
|
||||
pub fn check(check: &str) -> Result<(), glib::error::BoolError> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_check(check.to_glib_none().0),
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_auth_check(check.to_glib_none().0),
|
||||
"Check failed"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn make_basic(user: &str, pass: &str) -> GString {
|
||||
pub fn make_basic(user: &str, pass: &str) -> glib::GString {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_make_basic(
|
||||
from_glib_full(ffi::gst_rtsp_auth_make_basic(
|
||||
user.to_glib_none().0,
|
||||
pass.to_glib_none().0,
|
||||
))
|
||||
|
@ -80,7 +68,7 @@ pub trait RTSPAuthExt: 'static {
|
|||
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn get_realm(&self) -> Option<GString>;
|
||||
fn get_realm(&self) -> Option<glib::GString>;
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
||||
|
@ -130,7 +118,7 @@ pub trait RTSPAuthExt: 'static {
|
|||
impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
||||
fn add_basic(&self, basic: &str, token: &RTSPToken) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_add_basic(
|
||||
ffi::gst_rtsp_auth_add_basic(
|
||||
self.as_ref().to_glib_none().0,
|
||||
basic.to_glib_none().0,
|
||||
token.to_glib_none().0,
|
||||
|
@ -142,7 +130,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
||||
fn add_digest(&self, user: &str, pass: &str, token: &RTSPToken) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_add_digest(
|
||||
ffi::gst_rtsp_auth_add_digest(
|
||||
self.as_ref().to_glib_none().0,
|
||||
user.to_glib_none().0,
|
||||
pass.to_glib_none().0,
|
||||
|
@ -153,7 +141,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
|
||||
fn get_default_token(&self) -> Option<RTSPToken> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_get_default_token(
|
||||
from_glib_full(ffi::gst_rtsp_auth_get_default_token(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -161,19 +149,15 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn get_realm(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_get_realm(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
fn get_realm(&self) -> Option<glib::GString> {
|
||||
unsafe { from_glib_full(ffi::gst_rtsp_auth_get_realm(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
||||
fn get_supported_methods(&self) -> gst_rtsp::RTSPAuthMethod {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_auth_get_supported_methods(
|
||||
from_glib(ffi::gst_rtsp_auth_get_supported_methods(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -181,17 +165,15 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
|
||||
fn get_tls_authentication_mode(&self) -> gio::TlsAuthenticationMode {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_get_tls_authentication_mode(
|
||||
from_glib(ffi::gst_rtsp_auth_get_tls_authentication_mode(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_tls_certificate(&self) -> Option<gio::TlsCertificate> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_get_tls_certificate(
|
||||
from_glib_full(ffi::gst_rtsp_auth_get_tls_certificate(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -199,7 +181,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
|
||||
fn get_tls_database(&self) -> Option<gio::TlsDatabase> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_get_tls_database(
|
||||
from_glib_full(ffi::gst_rtsp_auth_get_tls_database(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -209,7 +191,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn parse_htdigest<P: AsRef<std::path::Path>>(&self, path: P, token: &RTSPToken) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_auth_parse_htdigest(
|
||||
from_glib(ffi::gst_rtsp_auth_parse_htdigest(
|
||||
self.as_ref().to_glib_none().0,
|
||||
path.as_ref().to_glib_none().0,
|
||||
token.to_glib_none().0,
|
||||
|
@ -219,10 +201,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
|
||||
fn remove_basic(&self, basic: &str) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_remove_basic(
|
||||
self.as_ref().to_glib_none().0,
|
||||
basic.to_glib_none().0,
|
||||
);
|
||||
ffi::gst_rtsp_auth_remove_basic(self.as_ref().to_glib_none().0, basic.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -230,10 +209,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
||||
fn remove_digest(&self, user: &str) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_remove_digest(
|
||||
self.as_ref().to_glib_none().0,
|
||||
user.to_glib_none().0,
|
||||
);
|
||||
ffi::gst_rtsp_auth_remove_digest(self.as_ref().to_glib_none().0, user.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -241,10 +217,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn set_realm(&self, realm: &str) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_set_realm(
|
||||
self.as_ref().to_glib_none().0,
|
||||
realm.to_glib_none().0,
|
||||
);
|
||||
ffi::gst_rtsp_auth_set_realm(self.as_ref().to_glib_none().0, realm.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -252,7 +225,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
||||
fn set_supported_methods(&self, methods: gst_rtsp::RTSPAuthMethod) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_set_supported_methods(
|
||||
ffi::gst_rtsp_auth_set_supported_methods(
|
||||
self.as_ref().to_glib_none().0,
|
||||
methods.to_glib(),
|
||||
);
|
||||
|
@ -261,7 +234,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
|
||||
fn set_tls_authentication_mode(&self, mode: gio::TlsAuthenticationMode) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_set_tls_authentication_mode(
|
||||
ffi::gst_rtsp_auth_set_tls_authentication_mode(
|
||||
self.as_ref().to_glib_none().0,
|
||||
mode.to_glib(),
|
||||
);
|
||||
|
@ -270,7 +243,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
|
||||
fn set_tls_certificate<P: IsA<gio::TlsCertificate>>(&self, cert: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_set_tls_certificate(
|
||||
ffi::gst_rtsp_auth_set_tls_certificate(
|
||||
self.as_ref().to_glib_none().0,
|
||||
cert.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -279,7 +252,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
|
||||
fn set_tls_database<P: IsA<gio::TlsDatabase>>(&self, database: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_set_tls_database(
|
||||
ffi::gst_rtsp_auth_set_tls_database(
|
||||
self.as_ref().to_glib_none().0,
|
||||
database.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -302,12 +275,12 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
+ Sync
|
||||
+ 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPAuth,
|
||||
connection: *mut gio_sys::GTlsConnection,
|
||||
peer_cert: *mut gio_sys::GTlsCertificate,
|
||||
errors: gio_sys::GTlsCertificateFlags,
|
||||
f: glib_sys::gpointer,
|
||||
) -> glib_sys::gboolean
|
||||
this: *mut ffi::GstRTSPAuth,
|
||||
connection: *mut gio::ffi::GTlsConnection,
|
||||
peer_cert: *mut gio::ffi::GTlsCertificate,
|
||||
errors: gio::ffi::GTlsCertificateFlags,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> glib::ffi::gboolean
|
||||
where
|
||||
P: IsA<RTSPAuth>,
|
||||
{
|
||||
|
|
|
@ -2,6 +2,16 @@
|
|||
// 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;
|
||||
|
@ -9,40 +19,21 @@ use glib::signal::SignalHandlerId;
|
|||
use glib::translate::*;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
||||
use gst_rtsp;
|
||||
use gst_rtsp_server_sys;
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
||||
use gst_rtsp_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use RTSPAuth;
|
||||
use RTSPContext;
|
||||
use RTSPFilterResult;
|
||||
use RTSPMountPoints;
|
||||
use RTSPSession;
|
||||
use RTSPSessionPool;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
use RTSPStreamTransport;
|
||||
use RTSPThreadPool;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPClient(Object<gst_rtsp_server_sys::GstRTSPClient, gst_rtsp_server_sys::GstRTSPClientClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPClient(Object<ffi::GstRTSPClient, ffi::GstRTSPClientClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_client_get_type(),
|
||||
get_type => || ffi::gst_rtsp_client_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl RTSPClient {
|
||||
pub fn new() -> RTSPClient {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_new()) }
|
||||
unsafe { from_glib_full(ffi::gst_rtsp_client_new()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -295,35 +286,31 @@ pub trait RTSPClientExt: 'static {
|
|||
impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
||||
fn close(&self) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_client_close(self.as_ref().to_glib_none().0);
|
||||
ffi::gst_rtsp_client_close(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_auth(&self) -> Option<RTSPAuth> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_auth(
|
||||
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 gst_rtsp_server_sys:gst_rtsp_client_get_connection() }
|
||||
// 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 {
|
||||
gst_rtsp_server_sys::gst_rtsp_client_get_content_length_limit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
)
|
||||
}
|
||||
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(gst_rtsp_server_sys::gst_rtsp_client_get_mount_points(
|
||||
from_glib_full(ffi::gst_rtsp_client_get_mount_points(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -331,7 +318,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
|
||||
fn get_session_pool(&self) -> Option<RTSPSessionPool> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_session_pool(
|
||||
from_glib_full(ffi::gst_rtsp_client_get_session_pool(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -341,7 +328,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_stream_transport(&self, channel: u8) -> Option<RTSPStreamTransport> {
|
||||
unsafe {
|
||||
from_glib_none(gst_rtsp_server_sys::gst_rtsp_client_get_stream_transport(
|
||||
from_glib_none(ffi::gst_rtsp_client_get_stream_transport(
|
||||
self.as_ref().to_glib_none().0,
|
||||
channel,
|
||||
))
|
||||
|
@ -350,18 +337,18 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
|
||||
fn get_thread_pool(&self) -> Option<RTSPThreadPool> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_thread_pool(
|
||||
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 gst_rtsp_server_sys:gst_rtsp_client_handle_message() }
|
||||
// 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 gst_rtsp_server_sys:gst_rtsp_client_send_message() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_client_send_message() }
|
||||
//}
|
||||
|
||||
fn session_filter(
|
||||
|
@ -371,10 +358,10 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
let func_data: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)> =
|
||||
func;
|
||||
unsafe extern "C" fn func_func(
|
||||
client: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
sess: *mut gst_rtsp_server_sys::GstRTSPSession,
|
||||
user_data: glib_sys::gpointer,
|
||||
) -> gst_rtsp_server_sys::GstRTSPFilterResult {
|
||||
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<
|
||||
|
@ -397,19 +384,17 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult),
|
||||
> = &func_data;
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(
|
||||
gst_rtsp_server_sys::gst_rtsp_client_session_filter(
|
||||
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 {
|
||||
gst_rtsp_server_sys::gst_rtsp_client_set_auth(
|
||||
ffi::gst_rtsp_client_set_auth(
|
||||
self.as_ref().to_glib_none().0,
|
||||
auth.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -417,23 +402,20 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
}
|
||||
|
||||
//fn set_connection(&self, conn: /*Ignored*/&mut gst_rtsp::RTSPConnection) -> bool {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_set_connection() }
|
||||
// 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 {
|
||||
gst_rtsp_server_sys::gst_rtsp_client_set_content_length_limit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
limit,
|
||||
);
|
||||
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 {
|
||||
gst_rtsp_server_sys::gst_rtsp_client_set_mount_points(
|
||||
ffi::gst_rtsp_client_set_mount_points(
|
||||
self.as_ref().to_glib_none().0,
|
||||
mounts.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -441,18 +423,18 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
}
|
||||
|
||||
//fn set_send_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, bool) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_set_send_func() }
|
||||
// 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 gst_rtsp_server_sys:gst_rtsp_client_set_send_messages_func() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_client_set_send_messages_func() }
|
||||
//}
|
||||
|
||||
fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_client_set_session_pool(
|
||||
ffi::gst_rtsp_client_set_session_pool(
|
||||
self.as_ref().to_glib_none().0,
|
||||
pool.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -461,7 +443,7 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
|
||||
fn set_thread_pool<P: IsA<RTSPThreadPool>>(&self, pool: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_client_set_thread_pool(
|
||||
ffi::gst_rtsp_client_set_thread_pool(
|
||||
self.as_ref().to_glib_none().0,
|
||||
pool.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -471,8 +453,8 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
fn get_property_drop_backlog(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
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,
|
||||
);
|
||||
|
@ -485,8 +467,8 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
|
||||
fn set_property_drop_backlog(&self, drop_backlog: bool) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
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 _,
|
||||
Value::from(&drop_backlog).to_glib_none().0,
|
||||
);
|
||||
|
@ -496,8 +478,8 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
fn get_property_post_session_timeout(&self) -> i32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
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,
|
||||
);
|
||||
|
@ -510,8 +492,8 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
|
||||
fn set_property_post_session_timeout(&self, post_session_timeout: i32) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
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 _,
|
||||
Value::from(&post_session_timeout).to_glib_none().0,
|
||||
);
|
||||
|
@ -526,9 +508,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -557,8 +539,8 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
|
||||
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 gst_rtsp_server_sys::GstRTSPClient,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -586,9 +568,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -619,9 +601,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -652,9 +634,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -685,9 +667,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPSession) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
object: *mut gst_rtsp_server_sys::GstRTSPSession,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
object: *mut ffi::GstRTSPSession,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -718,9 +700,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -751,9 +733,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -784,9 +766,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -821,10 +803,10 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
||||
where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -860,10 +842,10 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
||||
where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -899,10 +881,10 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
||||
where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -938,10 +920,10 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
||||
where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -977,10 +959,10 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
||||
where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1016,10 +998,10 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
||||
where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1055,10 +1037,10 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
||||
where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1094,10 +1076,10 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
||||
where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1133,10 +1115,10 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
||||
where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1172,10 +1154,10 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) -> gst_rtsp::ffi::GstRTSPStatusCode
|
||||
where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1207,9 +1189,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1244,9 +1226,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1277,9 +1259,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1310,9 +1292,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPContext) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
ctx: *mut gst_rtsp_server_sys::GstRTSPContext,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
ctx: *mut ffi::GstRTSPContext,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1340,9 +1322,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_drop_backlog_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1367,9 +1349,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_mount_points_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1397,9 +1379,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
P,
|
||||
F: Fn(&P) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
@ -1424,9 +1406,9 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_session_pool_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPClient,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,40 +2,33 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use glib;
|
||||
use crate::RTSPAddressPool;
|
||||
use crate::RTSPMedia;
|
||||
use crate::RTSPPublishClockMode;
|
||||
use crate::RTSPSuspendMode;
|
||||
use crate::RTSPTransportMode;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_rtsp;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use RTSPAddressPool;
|
||||
use RTSPMedia;
|
||||
use RTSPPublishClockMode;
|
||||
use RTSPSuspendMode;
|
||||
use RTSPTransportMode;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPMediaFactory(Object<gst_rtsp_server_sys::GstRTSPMediaFactory, gst_rtsp_server_sys::GstRTSPMediaFactoryClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPMediaFactory(Object<ffi::GstRTSPMediaFactory, ffi::GstRTSPMediaFactoryClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_media_factory_get_type(),
|
||||
get_type => || ffi::gst_rtsp_media_factory_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl RTSPMediaFactory {
|
||||
pub fn new() -> RTSPMediaFactory {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_new()) }
|
||||
unsafe { from_glib_full(ffi::gst_rtsp_media_factory_new()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +66,7 @@ pub trait RTSPMediaFactoryExt: 'static {
|
|||
|
||||
fn get_latency(&self) -> u32;
|
||||
|
||||
fn get_launch(&self) -> Option<GString>;
|
||||
fn get_launch(&self) -> Option<glib::GString>;
|
||||
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
|
@ -81,7 +74,7 @@ pub trait RTSPMediaFactoryExt: 'static {
|
|||
|
||||
fn get_media_gtype(&self) -> glib::types::Type;
|
||||
|
||||
fn get_multicast_iface(&self) -> Option<GString>;
|
||||
fn get_multicast_iface(&self) -> Option<glib::GString>;
|
||||
|
||||
//fn get_permissions(&self) -> /*Ignored*/Option<RTSPPermissions>;
|
||||
|
||||
|
@ -258,50 +251,44 @@ pub trait RTSPMediaFactoryExt: 'static {
|
|||
|
||||
impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
||||
//fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_factory_add_role() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_media_factory_add_role() }
|
||||
//}
|
||||
|
||||
fn construct(&self, url: &gst_rtsp::RTSPUrl) -> Result<RTSPMedia, glib::BoolError> {
|
||||
unsafe {
|
||||
Option::<_>::from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_construct(
|
||||
Option::<_>::from_glib_full(ffi::gst_rtsp_media_factory_construct(
|
||||
self.as_ref().to_glib_none().0,
|
||||
url.to_glib_none().0,
|
||||
))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to construct media"))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to construct media"))
|
||||
}
|
||||
}
|
||||
|
||||
fn create_element(&self, url: &gst_rtsp::RTSPUrl) -> Result<gst::Element, glib::BoolError> {
|
||||
unsafe {
|
||||
Option::<_>::from_glib_none(gst_rtsp_server_sys::gst_rtsp_media_factory_create_element(
|
||||
Option::<_>::from_glib_none(ffi::gst_rtsp_media_factory_create_element(
|
||||
self.as_ref().to_glib_none().0,
|
||||
url.to_glib_none().0,
|
||||
))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to create media element"))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to create media element"))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_address_pool(&self) -> Option<RTSPAddressPool> {
|
||||
unsafe {
|
||||
from_glib_full(
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_address_pool(
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_get_address_pool(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_buffer_size(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_buffer_size(
|
||||
self.as_ref().to_glib_none().0,
|
||||
)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_media_factory_get_buffer_size(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_clock(&self) -> Option<gst::Clock> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_get_clock(
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_get_clock(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -311,31 +298,25 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn get_do_retransmission(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_do_retransmission(
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_do_retransmission(
|
||||
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_dscp_qos(&self) -> i32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_dscp_qos(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_media_factory_get_dscp_qos(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_latency(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_latency(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_media_factory_get_latency(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_launch(&self) -> Option<GString> {
|
||||
fn get_launch(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_get_launch(
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_get_launch(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -344,38 +325,32 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn get_max_mcast_ttl(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_max_mcast_ttl(
|
||||
self.as_ref().to_glib_none().0,
|
||||
)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_media_factory_get_max_mcast_ttl(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_media_gtype(&self) -> glib::types::Type {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_media_gtype(
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_media_gtype(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_multicast_iface(&self) -> Option<GString> {
|
||||
fn get_multicast_iface(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_full(
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_multicast_iface(
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_get_multicast_iface(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_permissions(&self) -> /*Ignored*/Option<RTSPPermissions> {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_factory_get_permissions() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_media_factory_get_permissions() }
|
||||
//}
|
||||
|
||||
fn get_profiles(&self) -> gst_rtsp::RTSPProfile {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_profiles(
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_profiles(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -383,7 +358,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn get_protocols(&self) -> gst_rtsp::RTSPLowerTrans {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_protocols(
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_protocols(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -391,41 +366,33 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn get_publish_clock_mode(&self) -> RTSPPublishClockMode {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_publish_clock_mode(
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_publish_clock_mode(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_retransmission_time(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_retransmission_time(
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_retransmission_time(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_suspend_mode(&self) -> RTSPSuspendMode {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_suspend_mode(
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_suspend_mode(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_transport_mode(&self) -> RTSPTransportMode {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_transport_mode(
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_transport_mode(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -433,17 +400,15 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn is_bind_mcast_address(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_is_bind_mcast_address(
|
||||
from_glib(ffi::gst_rtsp_media_factory_is_bind_mcast_address(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_eos_shutdown(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_is_eos_shutdown(
|
||||
from_glib(ffi::gst_rtsp_media_factory_is_eos_shutdown(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -451,7 +416,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn is_shared(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_is_shared(
|
||||
from_glib(ffi::gst_rtsp_media_factory_is_shared(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -459,17 +424,15 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn is_stop_on_disonnect(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_is_stop_on_disonnect(
|
||||
from_glib(ffi::gst_rtsp_media_factory_is_stop_on_disonnect(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_address_pool(
|
||||
ffi::gst_rtsp_media_factory_set_address_pool(
|
||||
self.as_ref().to_glib_none().0,
|
||||
pool.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -480,7 +443,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn set_bind_mcast_address(&self, bind_mcast_addr: bool) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_bind_mcast_address(
|
||||
ffi::gst_rtsp_media_factory_set_bind_mcast_address(
|
||||
self.as_ref().to_glib_none().0,
|
||||
bind_mcast_addr.to_glib(),
|
||||
);
|
||||
|
@ -489,16 +452,13 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_buffer_size(&self, size: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_buffer_size(
|
||||
self.as_ref().to_glib_none().0,
|
||||
size,
|
||||
);
|
||||
ffi::gst_rtsp_media_factory_set_buffer_size(self.as_ref().to_glib_none().0, size);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_clock<P: IsA<gst::Clock>>(&self, clock: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_clock(
|
||||
ffi::gst_rtsp_media_factory_set_clock(
|
||||
self.as_ref().to_glib_none().0,
|
||||
clock.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -509,7 +469,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn set_do_retransmission(&self, do_retransmission: bool) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_do_retransmission(
|
||||
ffi::gst_rtsp_media_factory_set_do_retransmission(
|
||||
self.as_ref().to_glib_none().0,
|
||||
do_retransmission.to_glib(),
|
||||
);
|
||||
|
@ -520,16 +480,13 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn set_dscp_qos(&self, dscp_qos: i32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_dscp_qos(
|
||||
self.as_ref().to_glib_none().0,
|
||||
dscp_qos,
|
||||
);
|
||||
ffi::gst_rtsp_media_factory_set_dscp_qos(self.as_ref().to_glib_none().0, dscp_qos);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_eos_shutdown(&self, eos_shutdown: bool) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_eos_shutdown(
|
||||
ffi::gst_rtsp_media_factory_set_eos_shutdown(
|
||||
self.as_ref().to_glib_none().0,
|
||||
eos_shutdown.to_glib(),
|
||||
);
|
||||
|
@ -538,16 +495,13 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_latency(&self, latency: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_latency(
|
||||
self.as_ref().to_glib_none().0,
|
||||
latency,
|
||||
);
|
||||
ffi::gst_rtsp_media_factory_set_latency(self.as_ref().to_glib_none().0, latency);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_launch(&self, launch: &str) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_launch(
|
||||
ffi::gst_rtsp_media_factory_set_launch(
|
||||
self.as_ref().to_glib_none().0,
|
||||
launch.to_glib_none().0,
|
||||
);
|
||||
|
@ -558,18 +512,16 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn set_max_mcast_ttl(&self, ttl: u32) -> bool {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_max_mcast_ttl(
|
||||
from_glib(ffi::gst_rtsp_media_factory_set_max_mcast_ttl(
|
||||
self.as_ref().to_glib_none().0,
|
||||
ttl,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_media_gtype(&self, media_gtype: glib::types::Type) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_media_gtype(
|
||||
ffi::gst_rtsp_media_factory_set_media_gtype(
|
||||
self.as_ref().to_glib_none().0,
|
||||
media_gtype.to_glib(),
|
||||
);
|
||||
|
@ -578,7 +530,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_multicast_iface(&self, multicast_iface: Option<&str>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_multicast_iface(
|
||||
ffi::gst_rtsp_media_factory_set_multicast_iface(
|
||||
self.as_ref().to_glib_none().0,
|
||||
multicast_iface.to_glib_none().0,
|
||||
);
|
||||
|
@ -586,12 +538,12 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
}
|
||||
|
||||
//fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_factory_set_permissions() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_media_factory_set_permissions() }
|
||||
//}
|
||||
|
||||
fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_profiles(
|
||||
ffi::gst_rtsp_media_factory_set_profiles(
|
||||
self.as_ref().to_glib_none().0,
|
||||
profiles.to_glib(),
|
||||
);
|
||||
|
@ -600,7 +552,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_protocols(
|
||||
ffi::gst_rtsp_media_factory_set_protocols(
|
||||
self.as_ref().to_glib_none().0,
|
||||
protocols.to_glib(),
|
||||
);
|
||||
|
@ -609,7 +561,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_publish_clock_mode(
|
||||
ffi::gst_rtsp_media_factory_set_publish_clock_mode(
|
||||
self.as_ref().to_glib_none().0,
|
||||
mode.to_glib(),
|
||||
);
|
||||
|
@ -618,7 +570,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_retransmission_time(&self, time: gst::ClockTime) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_retransmission_time(
|
||||
ffi::gst_rtsp_media_factory_set_retransmission_time(
|
||||
self.as_ref().to_glib_none().0,
|
||||
time.to_glib(),
|
||||
);
|
||||
|
@ -627,7 +579,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_shared(&self, shared: bool) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_shared(
|
||||
ffi::gst_rtsp_media_factory_set_shared(
|
||||
self.as_ref().to_glib_none().0,
|
||||
shared.to_glib(),
|
||||
);
|
||||
|
@ -636,7 +588,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_stop_on_disconnect(&self, stop_on_disconnect: bool) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_stop_on_disconnect(
|
||||
ffi::gst_rtsp_media_factory_set_stop_on_disconnect(
|
||||
self.as_ref().to_glib_none().0,
|
||||
stop_on_disconnect.to_glib(),
|
||||
);
|
||||
|
@ -645,7 +597,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_suspend_mode(&self, mode: RTSPSuspendMode) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_suspend_mode(
|
||||
ffi::gst_rtsp_media_factory_set_suspend_mode(
|
||||
self.as_ref().to_glib_none().0,
|
||||
mode.to_glib(),
|
||||
);
|
||||
|
@ -654,7 +606,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_transport_mode(&self, mode: RTSPTransportMode) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_transport_mode(
|
||||
ffi::gst_rtsp_media_factory_set_transport_mode(
|
||||
self.as_ref().to_glib_none().0,
|
||||
mode.to_glib(),
|
||||
);
|
||||
|
@ -664,8 +616,8 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
fn get_property_bind_mcast_address(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"bind-mcast-address\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -678,8 +630,8 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_property_bind_mcast_address(&self, bind_mcast_address: bool) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"bind-mcast-address\0".as_ptr() as *const _,
|
||||
Value::from(&bind_mcast_address).to_glib_none().0,
|
||||
);
|
||||
|
@ -689,8 +641,8 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
fn get_property_dscp_qos(&self) -> i32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"dscp-qos\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -703,8 +655,8 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_property_dscp_qos(&self, dscp_qos: i32) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"dscp-qos\0".as_ptr() as *const _,
|
||||
Value::from(&dscp_qos).to_glib_none().0,
|
||||
);
|
||||
|
@ -714,8 +666,8 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
fn get_property_eos_shutdown(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"eos-shutdown\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -729,8 +681,8 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
fn get_property_max_mcast_ttl(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"max-mcast-ttl\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -743,8 +695,8 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
|
||||
fn set_property_max_mcast_ttl(&self, max_mcast_ttl: u32) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"max-mcast-ttl\0".as_ptr() as *const _,
|
||||
Value::from(&max_mcast_ttl).to_glib_none().0,
|
||||
);
|
||||
|
@ -754,8 +706,8 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
fn get_property_shared(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"shared\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -769,8 +721,8 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
fn get_property_stop_on_disconnect(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"stop-on-disconnect\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -789,9 +741,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPMedia) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
object: *mut gst_rtsp_server_sys::GstRTSPMedia,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
object: *mut ffi::GstRTSPMedia,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -822,9 +774,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPMedia) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
object: *mut gst_rtsp_server_sys::GstRTSPMedia,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
object: *mut ffi::GstRTSPMedia,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -855,9 +807,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
P,
|
||||
F: Fn(&P) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -882,9 +834,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_buffer_size_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -909,9 +861,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_clock_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -936,9 +888,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_dscp_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -963,9 +915,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_eos_shutdown_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -990,9 +942,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_latency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -1017,9 +969,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_launch_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -1044,9 +996,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_max_mcast_ttl_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -1071,9 +1023,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_profiles_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -1098,9 +1050,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_protocols_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -1125,9 +1077,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_shared_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -1155,9 +1107,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
P,
|
||||
F: Fn(&P) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -1182,9 +1134,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_suspend_mode_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
@ -1212,9 +1164,9 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
P,
|
||||
F: Fn(&P) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactory,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactory>,
|
||||
{
|
||||
|
|
|
@ -2,33 +2,29 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use crate::RTSPMediaFactory;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use RTSPMediaFactory;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPMediaFactoryURI(Object<gst_rtsp_server_sys::GstRTSPMediaFactoryURI, gst_rtsp_server_sys::GstRTSPMediaFactoryURIClass>) @extends RTSPMediaFactory;
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPMediaFactoryURI(Object<ffi::GstRTSPMediaFactoryURI, ffi::GstRTSPMediaFactoryURIClass>) @extends RTSPMediaFactory;
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_media_factory_uri_get_type(),
|
||||
get_type => || ffi::gst_rtsp_media_factory_uri_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl RTSPMediaFactoryURI {
|
||||
pub fn new() -> RTSPMediaFactoryURI {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_uri_new()) }
|
||||
unsafe { from_glib_full(ffi::gst_rtsp_media_factory_uri_new()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +40,7 @@ unsafe impl Sync for RTSPMediaFactoryURI {}
|
|||
pub const NONE_RTSP_MEDIA_FACTORY_URI: Option<&RTSPMediaFactoryURI> = None;
|
||||
|
||||
pub trait RTSPMediaFactoryURIExt: 'static {
|
||||
fn get_uri(&self) -> Option<GString>;
|
||||
fn get_uri(&self) -> Option<glib::GString>;
|
||||
|
||||
fn set_uri(&self, uri: &str);
|
||||
|
||||
|
@ -64,9 +60,9 @@ pub trait RTSPMediaFactoryURIExt: 'static {
|
|||
}
|
||||
|
||||
impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O {
|
||||
fn get_uri(&self) -> Option<GString> {
|
||||
fn get_uri(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_uri_get_uri(
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_uri_get_uri(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -74,7 +70,7 @@ impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O {
|
|||
|
||||
fn set_uri(&self, uri: &str) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_uri_set_uri(
|
||||
ffi::gst_rtsp_media_factory_uri_set_uri(
|
||||
self.as_ref().to_glib_none().0,
|
||||
uri.to_glib_none().0,
|
||||
);
|
||||
|
@ -84,8 +80,8 @@ impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O {
|
|||
fn get_property_use_gstpay(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"use-gstpay\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -98,8 +94,8 @@ impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O {
|
|||
|
||||
fn set_property_use_gstpay(&self, use_gstpay: bool) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"use-gstpay\0".as_ptr() as *const _,
|
||||
Value::from(&use_gstpay).to_glib_none().0,
|
||||
);
|
||||
|
@ -111,9 +107,9 @@ impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_uri_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactoryURI,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactoryURI,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactoryURI>,
|
||||
{
|
||||
|
@ -138,9 +134,9 @@ impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_use_gstpay_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPMediaFactoryURI,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPMediaFactoryURI,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPMediaFactoryURI>,
|
||||
{
|
||||
|
|
|
@ -2,27 +2,23 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use glib;
|
||||
use crate::RTSPMediaFactory;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use gst_rtsp;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::mem;
|
||||
use RTSPMediaFactory;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPMountPoints(Object<gst_rtsp_server_sys::GstRTSPMountPoints, gst_rtsp_server_sys::GstRTSPMountPointsClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPMountPoints(Object<ffi::GstRTSPMountPoints, ffi::GstRTSPMountPointsClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_mount_points_get_type(),
|
||||
get_type => || ffi::gst_rtsp_mount_points_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl RTSPMountPoints {
|
||||
pub fn new() -> RTSPMountPoints {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_mount_points_new()) }
|
||||
unsafe { from_glib_full(ffi::gst_rtsp_mount_points_new()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +36,7 @@ pub const NONE_RTSP_MOUNT_POINTS: Option<&RTSPMountPoints> = None;
|
|||
pub trait RTSPMountPointsExt: 'static {
|
||||
fn add_factory<P: IsA<RTSPMediaFactory>>(&self, path: &str, factory: &P);
|
||||
|
||||
fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Result<GString, glib::BoolError>;
|
||||
fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Result<glib::GString, glib::BoolError>;
|
||||
|
||||
fn match_(&self, path: &str) -> (RTSPMediaFactory, i32);
|
||||
|
||||
|
@ -50,7 +46,7 @@ pub trait RTSPMountPointsExt: 'static {
|
|||
impl<O: IsA<RTSPMountPoints>> RTSPMountPointsExt for O {
|
||||
fn add_factory<P: IsA<RTSPMediaFactory>>(&self, path: &str, factory: &P) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_mount_points_add_factory(
|
||||
ffi::gst_rtsp_mount_points_add_factory(
|
||||
self.as_ref().to_glib_none().0,
|
||||
path.to_glib_none().0,
|
||||
factory.as_ref().to_glib_full(),
|
||||
|
@ -58,20 +54,20 @@ impl<O: IsA<RTSPMountPoints>> RTSPMountPointsExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Result<GString, glib::BoolError> {
|
||||
fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Result<glib::GString, glib::BoolError> {
|
||||
unsafe {
|
||||
Option::<_>::from_glib_full(gst_rtsp_server_sys::gst_rtsp_mount_points_make_path(
|
||||
Option::<_>::from_glib_full(ffi::gst_rtsp_mount_points_make_path(
|
||||
self.as_ref().to_glib_none().0,
|
||||
url.to_glib_none().0,
|
||||
))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to make path"))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to make path"))
|
||||
}
|
||||
}
|
||||
|
||||
fn match_(&self, path: &str) -> (RTSPMediaFactory, i32) {
|
||||
unsafe {
|
||||
let mut matched = mem::MaybeUninit::uninit();
|
||||
let ret = from_glib_full(gst_rtsp_server_sys::gst_rtsp_mount_points_match(
|
||||
let ret = from_glib_full(ffi::gst_rtsp_mount_points_match(
|
||||
self.as_ref().to_glib_none().0,
|
||||
path.to_glib_none().0,
|
||||
matched.as_mut_ptr(),
|
||||
|
@ -83,7 +79,7 @@ impl<O: IsA<RTSPMountPoints>> RTSPMountPointsExt for O {
|
|||
|
||||
fn remove_factory(&self, path: &str) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_mount_points_remove_factory(
|
||||
ffi::gst_rtsp_mount_points_remove_factory(
|
||||
self.as_ref().to_glib_none().0,
|
||||
path.to_glib_none().0,
|
||||
);
|
||||
|
|
|
@ -2,41 +2,35 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use gio;
|
||||
use glib;
|
||||
use crate::RTSPAuth;
|
||||
use crate::RTSPClient;
|
||||
use crate::RTSPFilterResult;
|
||||
use crate::RTSPMountPoints;
|
||||
use crate::RTSPSessionPool;
|
||||
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::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use RTSPAuth;
|
||||
use RTSPClient;
|
||||
use RTSPFilterResult;
|
||||
use RTSPMountPoints;
|
||||
use RTSPSessionPool;
|
||||
use RTSPThreadPool;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPServer(Object<gst_rtsp_server_sys::GstRTSPServer, gst_rtsp_server_sys::GstRTSPServerClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPServer(Object<ffi::GstRTSPServer, ffi::GstRTSPServerClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_server_get_type(),
|
||||
get_type => || ffi::gst_rtsp_server_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl RTSPServer {
|
||||
pub fn new() -> RTSPServer {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_new()) }
|
||||
unsafe { from_glib_full(ffi::gst_rtsp_server_new()) }
|
||||
}
|
||||
|
||||
pub fn io_func<P: IsA<gio::Socket>, Q: IsA<RTSPServer>>(
|
||||
|
@ -46,8 +40,8 @@ impl RTSPServer {
|
|||
) -> Result<(), glib::error::BoolError> {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_server_io_func(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_server_io_func(
|
||||
socket.as_ref().to_glib_none().0,
|
||||
condition.to_glib(),
|
||||
server.as_ref().to_glib_none().0
|
||||
|
@ -85,7 +79,7 @@ pub trait RTSPServerExt: 'static {
|
|||
cancellable: Option<&P>,
|
||||
) -> Result<glib::Source, glib::Error>;
|
||||
|
||||
fn get_address(&self) -> Option<GString>;
|
||||
fn get_address(&self) -> Option<glib::GString>;
|
||||
|
||||
fn get_auth(&self) -> Option<RTSPAuth>;
|
||||
|
||||
|
@ -99,7 +93,7 @@ pub trait RTSPServerExt: 'static {
|
|||
|
||||
fn get_mount_points(&self) -> Option<RTSPMountPoints>;
|
||||
|
||||
fn get_service(&self) -> Option<GString>;
|
||||
fn get_service(&self) -> Option<glib::GString>;
|
||||
|
||||
fn get_session_pool(&self) -> Option<RTSPSessionPool>;
|
||||
|
||||
|
@ -184,10 +178,10 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
let func_data: Option<&mut dyn (FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult)> =
|
||||
func;
|
||||
unsafe extern "C" fn func_func(
|
||||
server: *mut gst_rtsp_server_sys::GstRTSPServer,
|
||||
client: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
user_data: glib_sys::gpointer,
|
||||
) -> gst_rtsp_server_sys::GstRTSPFilterResult {
|
||||
server: *mut ffi::GstRTSPServer,
|
||||
client: *mut ffi::GstRTSPClient,
|
||||
user_data: glib::ffi::gpointer,
|
||||
) -> ffi::GstRTSPFilterResult {
|
||||
let server = from_glib_borrow(server);
|
||||
let client = from_glib_borrow(client);
|
||||
let callback: *mut Option<
|
||||
|
@ -210,13 +204,11 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
&mut dyn (FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult),
|
||||
> = &func_data;
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(
|
||||
gst_rtsp_server_sys::gst_rtsp_server_client_filter(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_server_client_filter(
|
||||
self.as_ref().to_glib_none().0,
|
||||
func,
|
||||
super_callback0 as *const _ as usize as *mut _,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -226,7 +218,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
) -> Result<gio::Socket, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = gst_rtsp_server_sys::gst_rtsp_server_create_socket(
|
||||
let ret = ffi::gst_rtsp_server_create_socket(
|
||||
self.as_ref().to_glib_none().0,
|
||||
cancellable.map(|p| p.as_ref()).to_glib_none().0,
|
||||
&mut error,
|
||||
|
@ -245,7 +237,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
) -> Result<glib::Source, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = gst_rtsp_server_sys::gst_rtsp_server_create_source(
|
||||
let ret = ffi::gst_rtsp_server_create_source(
|
||||
self.as_ref().to_glib_none().0,
|
||||
cancellable.map(|p| p.as_ref()).to_glib_none().0,
|
||||
&mut error,
|
||||
|
@ -258,9 +250,9 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_address(&self) -> Option<GString> {
|
||||
fn get_address(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_address(
|
||||
from_glib_full(ffi::gst_rtsp_server_get_address(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -268,43 +260,37 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
|
||||
fn get_auth(&self) -> Option<RTSPAuth> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_auth(
|
||||
from_glib_full(ffi::gst_rtsp_server_get_auth(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_backlog(&self) -> i32 {
|
||||
unsafe { gst_rtsp_server_sys::gst_rtsp_server_get_backlog(self.as_ref().to_glib_none().0) }
|
||||
unsafe { ffi::gst_rtsp_server_get_backlog(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_bound_port(&self) -> i32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_get_bound_port(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_server_get_bound_port(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_content_length_limit(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_get_content_length_limit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_server_get_content_length_limit(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_mount_points(&self) -> Option<RTSPMountPoints> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_mount_points(
|
||||
from_glib_full(ffi::gst_rtsp_server_get_mount_points(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_service(&self) -> Option<GString> {
|
||||
fn get_service(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_service(
|
||||
from_glib_full(ffi::gst_rtsp_server_get_service(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -312,7 +298,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
|
||||
fn get_session_pool(&self) -> Option<RTSPSessionPool> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_session_pool(
|
||||
from_glib_full(ffi::gst_rtsp_server_get_session_pool(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -320,7 +306,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
|
||||
fn get_thread_pool(&self) -> Option<RTSPThreadPool> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_thread_pool(
|
||||
from_glib_full(ffi::gst_rtsp_server_get_thread_pool(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -328,7 +314,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
|
||||
fn set_address(&self, address: &str) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_set_address(
|
||||
ffi::gst_rtsp_server_set_address(
|
||||
self.as_ref().to_glib_none().0,
|
||||
address.to_glib_none().0,
|
||||
);
|
||||
|
@ -337,7 +323,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
|
||||
fn set_auth<P: IsA<RTSPAuth>>(&self, auth: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_set_auth(
|
||||
ffi::gst_rtsp_server_set_auth(
|
||||
self.as_ref().to_glib_none().0,
|
||||
auth.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -346,10 +332,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
|
||||
fn set_backlog(&self, backlog: i32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_set_backlog(
|
||||
self.as_ref().to_glib_none().0,
|
||||
backlog,
|
||||
);
|
||||
ffi::gst_rtsp_server_set_backlog(self.as_ref().to_glib_none().0, backlog);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -357,16 +340,13 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn set_content_length_limit(&self, limit: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_set_content_length_limit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
limit,
|
||||
);
|
||||
ffi::gst_rtsp_server_set_content_length_limit(self.as_ref().to_glib_none().0, limit);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_mount_points<P: IsA<RTSPMountPoints>>(&self, mounts: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_set_mount_points(
|
||||
ffi::gst_rtsp_server_set_mount_points(
|
||||
self.as_ref().to_glib_none().0,
|
||||
mounts.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -375,7 +355,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
|
||||
fn set_service(&self, service: &str) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_set_service(
|
||||
ffi::gst_rtsp_server_set_service(
|
||||
self.as_ref().to_glib_none().0,
|
||||
service.to_glib_none().0,
|
||||
);
|
||||
|
@ -384,7 +364,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
|
||||
fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_set_session_pool(
|
||||
ffi::gst_rtsp_server_set_session_pool(
|
||||
self.as_ref().to_glib_none().0,
|
||||
pool.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -393,7 +373,7 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
|
||||
fn set_thread_pool<P: IsA<RTSPThreadPool>>(&self, pool: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_set_thread_pool(
|
||||
ffi::gst_rtsp_server_set_thread_pool(
|
||||
self.as_ref().to_glib_none().0,
|
||||
pool.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -408,8 +388,8 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
initial_buffer: Option<&str>,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_server_transfer_connection(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_server_transfer_connection(
|
||||
self.as_ref().to_glib_none().0,
|
||||
socket.as_ref().to_glib_full(),
|
||||
ip.to_glib_none().0,
|
||||
|
@ -424,8 +404,8 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
fn get_property_content_length_limit(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"content-length-limit\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -438,8 +418,8 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
|
||||
fn set_property_content_length_limit(&self, content_length_limit: u32) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"content-length-limit\0".as_ptr() as *const _,
|
||||
Value::from(&content_length_limit).to_glib_none().0,
|
||||
);
|
||||
|
@ -454,9 +434,9 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPClient) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPServer,
|
||||
object: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPServer,
|
||||
object: *mut ffi::GstRTSPClient,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPServer>,
|
||||
{
|
||||
|
@ -484,9 +464,9 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_address_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPServer,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPServer,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPServer>,
|
||||
{
|
||||
|
@ -511,9 +491,9 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_backlog_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPServer,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPServer,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPServer>,
|
||||
{
|
||||
|
@ -538,9 +518,9 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_bound_port_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPServer,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPServer,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPServer>,
|
||||
{
|
||||
|
@ -568,9 +548,9 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
P,
|
||||
F: Fn(&P) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPServer,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPServer,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPServer>,
|
||||
{
|
||||
|
@ -595,9 +575,9 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_mount_points_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPServer,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPServer,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPServer>,
|
||||
{
|
||||
|
@ -622,9 +602,9 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_service_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPServer,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPServer,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPServer>,
|
||||
{
|
||||
|
@ -649,9 +629,9 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_session_pool_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPServer,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPServer,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPServer>,
|
||||
{
|
||||
|
|
|
@ -2,41 +2,32 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use glib;
|
||||
use crate::RTSPFilterResult;
|
||||
use crate::RTSPMedia;
|
||||
use crate::RTSPSessionMedia;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
use RTSPFilterResult;
|
||||
use RTSPMedia;
|
||||
use RTSPSessionMedia;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPSession(Object<gst_rtsp_server_sys::GstRTSPSession, gst_rtsp_server_sys::GstRTSPSessionClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPSession(Object<ffi::GstRTSPSession, ffi::GstRTSPSessionClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_session_get_type(),
|
||||
get_type => || ffi::gst_rtsp_session_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl RTSPSession {
|
||||
pub fn new(sessionid: &str) -> RTSPSession {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_new(
|
||||
sessionid.to_glib_none().0,
|
||||
))
|
||||
}
|
||||
unsafe { from_glib_full(ffi::gst_rtsp_session_new(sessionid.to_glib_none().0)) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,11 +44,11 @@ pub trait RTSPSessionExt: 'static {
|
|||
func: Option<&mut dyn (FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult)>,
|
||||
) -> Vec<RTSPSessionMedia>;
|
||||
|
||||
fn get_header(&self) -> Option<GString>;
|
||||
fn get_header(&self) -> Option<glib::GString>;
|
||||
|
||||
fn get_media(&self, path: &str) -> (Option<RTSPSessionMedia>, i32);
|
||||
|
||||
fn get_sessionid(&self) -> Option<GString>;
|
||||
fn get_sessionid(&self) -> Option<glib::GString>;
|
||||
|
||||
fn get_timeout(&self) -> u32;
|
||||
|
||||
|
@ -110,7 +101,7 @@ pub trait RTSPSessionExt: 'static {
|
|||
impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
||||
fn allow_expire(&self) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_session_allow_expire(self.as_ref().to_glib_none().0);
|
||||
ffi::gst_rtsp_session_allow_expire(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,10 +113,10 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
&mut dyn (FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult),
|
||||
> = func;
|
||||
unsafe extern "C" fn func_func(
|
||||
sess: *mut gst_rtsp_server_sys::GstRTSPSession,
|
||||
media: *mut gst_rtsp_server_sys::GstRTSPSessionMedia,
|
||||
user_data: glib_sys::gpointer,
|
||||
) -> gst_rtsp_server_sys::GstRTSPFilterResult {
|
||||
sess: *mut ffi::GstRTSPSession,
|
||||
media: *mut ffi::GstRTSPSessionMedia,
|
||||
user_data: glib::ffi::gpointer,
|
||||
) -> ffi::GstRTSPFilterResult {
|
||||
let sess = from_glib_borrow(sess);
|
||||
let media = from_glib_borrow(media);
|
||||
let callback: *mut Option<
|
||||
|
@ -150,7 +141,7 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
&mut dyn (FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult),
|
||||
> = &func_data;
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_filter(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_session_filter(
|
||||
self.as_ref().to_glib_none().0,
|
||||
func,
|
||||
super_callback0 as *const _ as usize as *mut _,
|
||||
|
@ -158,9 +149,9 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_header(&self) -> Option<GString> {
|
||||
fn get_header(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_get_header(
|
||||
from_glib_full(ffi::gst_rtsp_session_get_header(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -169,7 +160,7 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
fn get_media(&self, path: &str) -> (Option<RTSPSessionMedia>, i32) {
|
||||
unsafe {
|
||||
let mut matched = mem::MaybeUninit::uninit();
|
||||
let ret = from_glib_none(gst_rtsp_server_sys::gst_rtsp_session_get_media(
|
||||
let ret = from_glib_none(ffi::gst_rtsp_session_get_media(
|
||||
self.as_ref().to_glib_none().0,
|
||||
path.to_glib_none().0,
|
||||
matched.as_mut_ptr(),
|
||||
|
@ -179,25 +170,25 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_sessionid(&self) -> Option<GString> {
|
||||
fn get_sessionid(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_none(gst_rtsp_server_sys::gst_rtsp_session_get_sessionid(
|
||||
from_glib_none(ffi::gst_rtsp_session_get_sessionid(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_timeout(&self) -> u32 {
|
||||
unsafe { gst_rtsp_server_sys::gst_rtsp_session_get_timeout(self.as_ref().to_glib_none().0) }
|
||||
unsafe { ffi::gst_rtsp_session_get_timeout(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
//fn is_expired(&self, now: /*Ignored*/&mut glib::TimeVal) -> bool {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_is_expired() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_session_is_expired() }
|
||||
//}
|
||||
|
||||
fn is_expired_usec(&self, now: i64) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_session_is_expired_usec(
|
||||
from_glib(ffi::gst_rtsp_session_is_expired_usec(
|
||||
self.as_ref().to_glib_none().0,
|
||||
now,
|
||||
))
|
||||
|
@ -210,37 +201,32 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
media: &P,
|
||||
) -> Result<RTSPSessionMedia, glib::BoolError> {
|
||||
unsafe {
|
||||
Option::<_>::from_glib_none(gst_rtsp_server_sys::gst_rtsp_session_manage_media(
|
||||
Option::<_>::from_glib_none(ffi::gst_rtsp_session_manage_media(
|
||||
self.as_ref().to_glib_none().0,
|
||||
path.to_glib_none().0,
|
||||
media.as_ref().to_glib_full(),
|
||||
))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to manage media"))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to manage media"))
|
||||
}
|
||||
}
|
||||
|
||||
//fn next_timeout(&self, now: /*Ignored*/&mut glib::TimeVal) -> i32 {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_next_timeout() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_session_next_timeout() }
|
||||
//}
|
||||
|
||||
fn next_timeout_usec(&self, now: i64) -> i32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_session_next_timeout_usec(
|
||||
self.as_ref().to_glib_none().0,
|
||||
now,
|
||||
)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_session_next_timeout_usec(self.as_ref().to_glib_none().0, now) }
|
||||
}
|
||||
|
||||
fn prevent_expire(&self) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_session_prevent_expire(self.as_ref().to_glib_none().0);
|
||||
ffi::gst_rtsp_session_prevent_expire(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn release_media<P: IsA<RTSPSessionMedia>>(&self, media: &P) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_session_release_media(
|
||||
from_glib(ffi::gst_rtsp_session_release_media(
|
||||
self.as_ref().to_glib_none().0,
|
||||
media.as_ref().to_glib_none().0,
|
||||
))
|
||||
|
@ -249,24 +235,21 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
|
||||
fn set_timeout(&self, timeout: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_session_set_timeout(
|
||||
self.as_ref().to_glib_none().0,
|
||||
timeout,
|
||||
);
|
||||
ffi::gst_rtsp_session_set_timeout(self.as_ref().to_glib_none().0, timeout);
|
||||
}
|
||||
}
|
||||
|
||||
fn touch(&self) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_session_touch(self.as_ref().to_glib_none().0);
|
||||
ffi::gst_rtsp_session_touch(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_extra_timeout(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"extra-timeout\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -279,8 +262,8 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
|
||||
fn set_property_extra_timeout(&self, extra_timeout: u32) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"extra-timeout\0".as_ptr() as *const _,
|
||||
Value::from(&extra_timeout).to_glib_none().0,
|
||||
);
|
||||
|
@ -290,8 +273,8 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
fn get_property_timeout_always_visible(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"timeout-always-visible\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
|
@ -304,8 +287,8 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
|
||||
fn set_property_timeout_always_visible(&self, timeout_always_visible: bool) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
glib::gobject_ffi::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
|
||||
b"timeout-always-visible\0".as_ptr() as *const _,
|
||||
Value::from(&timeout_always_visible).to_glib_none().0,
|
||||
);
|
||||
|
@ -317,9 +300,9 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_extra_timeout_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPSession,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPSession,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPSession>,
|
||||
{
|
||||
|
@ -344,9 +327,9 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_timeout_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPSession,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPSession,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPSession>,
|
||||
{
|
||||
|
@ -374,9 +357,9 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
P,
|
||||
F: Fn(&P) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPSession,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPSession,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPSession>,
|
||||
{
|
||||
|
|
|
@ -2,21 +2,17 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use glib;
|
||||
use crate::RTSPMedia;
|
||||
use crate::RTSPStreamTransport;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use gst;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::mem;
|
||||
use RTSPMedia;
|
||||
use RTSPStreamTransport;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPSessionMedia(Object<gst_rtsp_server_sys::GstRTSPSessionMedia, gst_rtsp_server_sys::GstRTSPSessionMediaClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPSessionMedia(Object<ffi::GstRTSPSessionMedia, ffi::GstRTSPSessionMediaClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_session_media_get_type(),
|
||||
get_type => || ffi::gst_rtsp_session_media_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +20,7 @@ impl RTSPSessionMedia {
|
|||
pub fn new<P: IsA<RTSPMedia>>(path: &str, media: &P) -> RTSPSessionMedia {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_media_new(
|
||||
from_glib_full(ffi::gst_rtsp_session_media_new(
|
||||
path.to_glib_none().0,
|
||||
media.as_ref().to_glib_full(),
|
||||
))
|
||||
|
@ -44,7 +40,7 @@ pub trait RTSPSessionMediaExt: 'static {
|
|||
|
||||
fn get_media(&self) -> Option<RTSPMedia>;
|
||||
|
||||
fn get_rtpinfo(&self) -> Option<GString>;
|
||||
fn get_rtpinfo(&self) -> Option<glib::GString>;
|
||||
|
||||
//fn get_rtsp_state(&self) -> /*Ignored*/gst_rtsp::RTSPState;
|
||||
|
||||
|
@ -65,12 +61,12 @@ pub trait RTSPSessionMediaExt: 'static {
|
|||
|
||||
impl<O: IsA<RTSPSessionMedia>> RTSPSessionMediaExt for O {
|
||||
//fn alloc_channels(&self, range: /*Ignored*/gst_rtsp::RTSPRange) -> bool {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_media_alloc_channels() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_session_media_alloc_channels() }
|
||||
//}
|
||||
|
||||
fn get_base_time(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_session_media_get_base_time(
|
||||
from_glib(ffi::gst_rtsp_session_media_get_base_time(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -78,27 +74,27 @@ impl<O: IsA<RTSPSessionMedia>> RTSPSessionMediaExt for O {
|
|||
|
||||
fn get_media(&self) -> Option<RTSPMedia> {
|
||||
unsafe {
|
||||
from_glib_none(gst_rtsp_server_sys::gst_rtsp_session_media_get_media(
|
||||
from_glib_none(ffi::gst_rtsp_session_media_get_media(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_rtpinfo(&self) -> Option<GString> {
|
||||
fn get_rtpinfo(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_media_get_rtpinfo(
|
||||
from_glib_full(ffi::gst_rtsp_session_media_get_rtpinfo(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_rtsp_state(&self) -> /*Ignored*/gst_rtsp::RTSPState {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_media_get_rtsp_state() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_session_media_get_rtsp_state() }
|
||||
//}
|
||||
|
||||
fn get_transport(&self, idx: u32) -> Option<RTSPStreamTransport> {
|
||||
unsafe {
|
||||
from_glib_none(gst_rtsp_server_sys::gst_rtsp_session_media_get_transport(
|
||||
from_glib_none(ffi::gst_rtsp_session_media_get_transport(
|
||||
self.as_ref().to_glib_none().0,
|
||||
idx,
|
||||
))
|
||||
|
@ -109,18 +105,16 @@ impl<O: IsA<RTSPSessionMedia>> RTSPSessionMediaExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
||||
fn get_transports(&self) -> Vec<RTSPStreamTransport> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(
|
||||
gst_rtsp_server_sys::gst_rtsp_session_media_get_transports(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_session_media_get_transports(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn matches(&self, path: &str) -> Option<i32> {
|
||||
unsafe {
|
||||
let mut matched = mem::MaybeUninit::uninit();
|
||||
let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_session_media_matches(
|
||||
let ret = from_glib(ffi::gst_rtsp_session_media_matches(
|
||||
self.as_ref().to_glib_none().0,
|
||||
path.to_glib_none().0,
|
||||
matched.as_mut_ptr(),
|
||||
|
@ -135,13 +129,13 @@ impl<O: IsA<RTSPSessionMedia>> RTSPSessionMediaExt for O {
|
|||
}
|
||||
|
||||
//fn set_rtsp_state(&self, state: /*Ignored*/gst_rtsp::RTSPState) {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_media_set_rtsp_state() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_session_media_set_rtsp_state() }
|
||||
//}
|
||||
|
||||
fn set_state(&self, state: gst::State) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_session_media_set_state(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_session_media_set_state(
|
||||
self.as_ref().to_glib_none().0,
|
||||
state.to_glib()
|
||||
),
|
||||
|
@ -151,6 +145,6 @@ impl<O: IsA<RTSPSessionMedia>> RTSPSessionMediaExt for O {
|
|||
}
|
||||
|
||||
//fn set_transport<P: IsA<RTSPStream>>(&self, stream: &P, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> Option<RTSPStreamTransport> {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_media_set_transport() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_session_media_set_transport() }
|
||||
//}
|
||||
}
|
||||
|
|
|
@ -2,31 +2,28 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use glib;
|
||||
use crate::RTSPFilterResult;
|
||||
use crate::RTSPSession;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib_sys;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use RTSPFilterResult;
|
||||
use RTSPSession;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPSessionPool(Object<gst_rtsp_server_sys::GstRTSPSessionPool, gst_rtsp_server_sys::GstRTSPSessionPoolClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPSessionPool(Object<ffi::GstRTSPSessionPool, ffi::GstRTSPSessionPoolClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_session_pool_get_type(),
|
||||
get_type => || ffi::gst_rtsp_session_pool_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl RTSPSessionPool {
|
||||
pub fn new() -> RTSPSessionPool {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_pool_new()) }
|
||||
unsafe { from_glib_full(ffi::gst_rtsp_session_pool_new()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,17 +71,15 @@ pub trait RTSPSessionPoolExt: 'static {
|
|||
|
||||
impl<O: IsA<RTSPSessionPool>> RTSPSessionPoolExt for O {
|
||||
fn cleanup(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_session_pool_cleanup(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_session_pool_cleanup(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn create(&self) -> Result<RTSPSession, glib::BoolError> {
|
||||
unsafe {
|
||||
Option::<_>::from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_pool_create(
|
||||
Option::<_>::from_glib_full(ffi::gst_rtsp_session_pool_create(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
.ok_or_else(|| glib_bool_error!("Failed to create session pool"))
|
||||
.ok_or_else(|| glib::glib_bool_error!("Failed to create session pool"))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,10 +91,10 @@ impl<O: IsA<RTSPSessionPool>> RTSPSessionPoolExt for O {
|
|||
&mut dyn (FnMut(&RTSPSessionPool, &RTSPSession) -> RTSPFilterResult),
|
||||
> = func;
|
||||
unsafe extern "C" fn func_func(
|
||||
pool: *mut gst_rtsp_server_sys::GstRTSPSessionPool,
|
||||
session: *mut gst_rtsp_server_sys::GstRTSPSession,
|
||||
user_data: glib_sys::gpointer,
|
||||
) -> gst_rtsp_server_sys::GstRTSPFilterResult {
|
||||
pool: *mut ffi::GstRTSPSessionPool,
|
||||
session: *mut ffi::GstRTSPSession,
|
||||
user_data: glib::ffi::gpointer,
|
||||
) -> ffi::GstRTSPFilterResult {
|
||||
let pool = from_glib_borrow(pool);
|
||||
let session = from_glib_borrow(session);
|
||||
let callback: *mut Option<
|
||||
|
@ -124,7 +119,7 @@ impl<O: IsA<RTSPSessionPool>> RTSPSessionPoolExt for O {
|
|||
&mut dyn (FnMut(&RTSPSessionPool, &RTSPSession) -> RTSPFilterResult),
|
||||
> = &func_data;
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_pool_filter(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_session_pool_filter(
|
||||
self.as_ref().to_glib_none().0,
|
||||
func,
|
||||
super_callback0 as *const _ as usize as *mut _,
|
||||
|
@ -134,7 +129,7 @@ impl<O: IsA<RTSPSessionPool>> RTSPSessionPoolExt for O {
|
|||
|
||||
fn find(&self, sessionid: &str) -> Option<RTSPSession> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_session_pool_find(
|
||||
from_glib_full(ffi::gst_rtsp_session_pool_find(
|
||||
self.as_ref().to_glib_none().0,
|
||||
sessionid.to_glib_none().0,
|
||||
))
|
||||
|
@ -142,25 +137,17 @@ impl<O: IsA<RTSPSessionPool>> RTSPSessionPoolExt for O {
|
|||
}
|
||||
|
||||
fn get_max_sessions(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_session_pool_get_max_sessions(
|
||||
self.as_ref().to_glib_none().0,
|
||||
)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_session_pool_get_max_sessions(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_n_sessions(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_session_pool_get_n_sessions(
|
||||
self.as_ref().to_glib_none().0,
|
||||
)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_session_pool_get_n_sessions(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn remove<P: IsA<RTSPSession>>(&self, sess: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_session_pool_remove(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_session_pool_remove(
|
||||
self.as_ref().to_glib_none().0,
|
||||
sess.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -171,10 +158,7 @@ impl<O: IsA<RTSPSessionPool>> RTSPSessionPoolExt for O {
|
|||
|
||||
fn set_max_sessions(&self, max: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_session_pool_set_max_sessions(
|
||||
self.as_ref().to_glib_none().0,
|
||||
max,
|
||||
);
|
||||
ffi::gst_rtsp_session_pool_set_max_sessions(self.as_ref().to_glib_none().0, max);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -186,9 +170,9 @@ impl<O: IsA<RTSPSessionPool>> RTSPSessionPoolExt for O {
|
|||
P,
|
||||
F: Fn(&P, &RTSPSession) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPSessionPool,
|
||||
object: *mut gst_rtsp_server_sys::GstRTSPSession,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPSessionPool,
|
||||
object: *mut ffi::GstRTSPSession,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPSessionPool>,
|
||||
{
|
||||
|
@ -216,9 +200,9 @@ impl<O: IsA<RTSPSessionPool>> RTSPSessionPoolExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_max_sessions_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPSessionPool,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPSessionPool,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPSessionPool>,
|
||||
{
|
||||
|
|
|
@ -2,33 +2,25 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use gio;
|
||||
use glib;
|
||||
use crate::RTSPAddress;
|
||||
use crate::RTSPAddressPool;
|
||||
use crate::RTSPFilterResult;
|
||||
use crate::RTSPPublishClockMode;
|
||||
use crate::RTSPStreamTransport;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib_sys;
|
||||
use gst;
|
||||
use gst_rtsp;
|
||||
use gst_rtsp_server_sys;
|
||||
use gst_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
use RTSPAddress;
|
||||
use RTSPAddressPool;
|
||||
use RTSPFilterResult;
|
||||
use RTSPPublishClockMode;
|
||||
use RTSPStreamTransport;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPStream(Object<gst_rtsp_server_sys::GstRTSPStream, gst_rtsp_server_sys::GstRTSPStreamClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPStream(Object<ffi::GstRTSPStream, ffi::GstRTSPStreamClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_stream_get_type(),
|
||||
get_type => || ffi::gst_rtsp_stream_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +32,7 @@ impl RTSPStream {
|
|||
) -> RTSPStream {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_new(
|
||||
from_glib_full(ffi::gst_rtsp_stream_new(
|
||||
idx,
|
||||
payloader.as_ref().to_glib_none().0,
|
||||
pad.as_ref().to_glib_none().0,
|
||||
|
@ -82,7 +74,7 @@ pub trait RTSPStreamExt: 'static {
|
|||
|
||||
fn get_caps(&self) -> Option<gst::Caps>;
|
||||
|
||||
fn get_control(&self) -> Option<GString>;
|
||||
fn get_control(&self) -> Option<glib::GString>;
|
||||
|
||||
fn get_current_seqnum(&self) -> u16;
|
||||
|
||||
|
@ -102,9 +94,9 @@ pub trait RTSPStreamExt: 'static {
|
|||
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn get_multicast_client_addresses(&self) -> Option<GString>;
|
||||
fn get_multicast_client_addresses(&self) -> Option<glib::GString>;
|
||||
|
||||
fn get_multicast_iface(&self) -> Option<GString>;
|
||||
fn get_multicast_iface(&self) -> Option<glib::GString>;
|
||||
|
||||
fn get_profiles(&self) -> gst_rtsp::RTSPProfile;
|
||||
|
||||
|
@ -345,15 +337,13 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
family: gio::SocketFamily,
|
||||
) -> bool {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_add_multicast_client_address(
|
||||
from_glib(ffi::gst_rtsp_stream_add_multicast_client_address(
|
||||
self.as_ref().to_glib_none().0,
|
||||
destination.to_glib_none().0,
|
||||
rtp_port,
|
||||
rtcp_port,
|
||||
family.to_glib(),
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -362,8 +352,8 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
trans: &P,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_add_transport(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_stream_add_transport(
|
||||
self.as_ref().to_glib_none().0,
|
||||
trans.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -373,62 +363,58 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
}
|
||||
|
||||
//fn allocate_udp_sockets(&self, family: gio::SocketFamily, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport, use_client_settings: bool) -> bool {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_allocate_udp_sockets() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_stream_allocate_udp_sockets() }
|
||||
//}
|
||||
|
||||
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
||||
//fn complete_stream(&self, transport: /*Ignored*/&gst_rtsp::RTSPTransport) -> bool {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_complete_stream() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_stream_complete_stream() }
|
||||
//}
|
||||
|
||||
fn get_address_pool(&self) -> Option<RTSPAddressPool> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_address_pool(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_address_pool(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_buffer_size(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_get_buffer_size(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_stream_get_buffer_size(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_caps(&self) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_caps(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_caps(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_control(&self) -> Option<GString> {
|
||||
fn get_control(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_control(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_control(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_current_seqnum(&self) -> u16 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_get_current_seqnum(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_stream_get_current_seqnum(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_dscp_qos(&self) -> i32 {
|
||||
unsafe { gst_rtsp_server_sys::gst_rtsp_stream_get_dscp_qos(self.as_ref().to_glib_none().0) }
|
||||
unsafe { ffi::gst_rtsp_stream_get_dscp_qos(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_index(&self) -> u32 {
|
||||
unsafe { gst_rtsp_server_sys::gst_rtsp_stream_get_index(self.as_ref().to_glib_none().0) }
|
||||
unsafe { ffi::gst_rtsp_stream_get_index(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_joined_bin(&self) -> Option<gst::Bin> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_joined_bin(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_joined_bin(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -437,18 +423,16 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn get_max_mcast_ttl(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_get_max_mcast_ttl(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_stream_get_max_mcast_ttl(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_mtu(&self) -> u32 {
|
||||
unsafe { gst_rtsp_server_sys::gst_rtsp_stream_get_mtu(self.as_ref().to_glib_none().0) }
|
||||
unsafe { ffi::gst_rtsp_stream_get_mtu(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_multicast_address(&self, family: gio::SocketFamily) -> Option<RTSPAddress> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_multicast_address(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_multicast_address(
|
||||
self.as_ref().to_glib_none().0,
|
||||
family.to_glib(),
|
||||
))
|
||||
|
@ -457,19 +441,17 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn get_multicast_client_addresses(&self) -> Option<GString> {
|
||||
fn get_multicast_client_addresses(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_full(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_get_multicast_client_addresses(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_multicast_client_addresses(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_multicast_iface(&self) -> Option<GString> {
|
||||
fn get_multicast_iface(&self) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_multicast_iface(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_multicast_iface(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -477,7 +459,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn get_profiles(&self) -> gst_rtsp::RTSPProfile {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_profiles(
|
||||
from_glib(ffi::gst_rtsp_stream_get_profiles(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -485,19 +467,19 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn get_protocols(&self) -> gst_rtsp::RTSPLowerTrans {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_protocols(
|
||||
from_glib(ffi::gst_rtsp_stream_get_protocols(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_pt(&self) -> u32 {
|
||||
unsafe { gst_rtsp_server_sys::gst_rtsp_stream_get_pt(self.as_ref().to_glib_none().0) }
|
||||
unsafe { ffi::gst_rtsp_stream_get_pt(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_publish_clock_mode(&self) -> RTSPPublishClockMode {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_publish_clock_mode(
|
||||
from_glib(ffi::gst_rtsp_stream_get_publish_clock_mode(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -507,7 +489,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn get_rate_control(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_rate_control(
|
||||
from_glib(ffi::gst_rtsp_stream_get_rate_control(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -519,7 +501,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
unsafe {
|
||||
let mut rate = mem::MaybeUninit::uninit();
|
||||
let mut applied_rate = mem::MaybeUninit::uninit();
|
||||
let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_rates(
|
||||
let ret = from_glib(ffi::gst_rtsp_stream_get_rates(
|
||||
self.as_ref().to_glib_none().0,
|
||||
rate.as_mut_ptr(),
|
||||
applied_rate.as_mut_ptr(),
|
||||
|
@ -535,20 +517,14 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
}
|
||||
|
||||
fn get_retransmission_pt(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_get_retransmission_pt(
|
||||
self.as_ref().to_glib_none().0,
|
||||
)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_stream_get_retransmission_pt(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_retransmission_time(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_get_retransmission_time(
|
||||
from_glib(ffi::gst_rtsp_stream_get_retransmission_time(
|
||||
self.as_ref().to_glib_none().0,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -556,18 +532,16 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
||||
fn get_rtcp_multicast_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket> {
|
||||
unsafe {
|
||||
from_glib_full(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_get_rtcp_multicast_socket(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_rtcp_multicast_socket(
|
||||
self.as_ref().to_glib_none().0,
|
||||
family.to_glib(),
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_rtcp_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_rtcp_socket(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_rtcp_socket(
|
||||
self.as_ref().to_glib_none().0,
|
||||
family.to_glib(),
|
||||
))
|
||||
|
@ -576,18 +550,16 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn get_rtp_multicast_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket> {
|
||||
unsafe {
|
||||
from_glib_full(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_get_rtp_multicast_socket(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_rtp_multicast_socket(
|
||||
self.as_ref().to_glib_none().0,
|
||||
family.to_glib(),
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_rtp_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_rtp_socket(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_rtp_socket(
|
||||
self.as_ref().to_glib_none().0,
|
||||
family.to_glib(),
|
||||
))
|
||||
|
@ -600,7 +572,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
let mut seq = mem::MaybeUninit::uninit();
|
||||
let mut clock_rate = mem::MaybeUninit::uninit();
|
||||
let mut running_time = mem::MaybeUninit::uninit();
|
||||
let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_rtpinfo(
|
||||
let ret = from_glib(ffi::gst_rtsp_stream_get_rtpinfo(
|
||||
self.as_ref().to_glib_none().0,
|
||||
rtptime.as_mut_ptr(),
|
||||
seq.as_mut_ptr(),
|
||||
|
@ -621,19 +593,19 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn get_rtpsession(&self) -> Option<glib::Object> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_rtpsession(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_rtpsession(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_server_port(&self, server_port: /*Ignored*/gst_rtsp::RTSPRange, family: gio::SocketFamily) {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_get_server_port() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_stream_get_server_port() }
|
||||
//}
|
||||
|
||||
fn get_sinkpad(&self) -> Option<gst::Pad> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_sinkpad(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_sinkpad(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -641,7 +613,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn get_srcpad(&self) -> Option<gst::Pad> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_srcpad(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_srcpad(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -649,7 +621,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn get_srtp_encoder(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_srtp_encoder(
|
||||
from_glib_full(ffi::gst_rtsp_stream_get_srtp_encoder(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -658,10 +630,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
fn get_ssrc(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut ssrc = mem::MaybeUninit::uninit();
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_get_ssrc(
|
||||
self.as_ref().to_glib_none().0,
|
||||
ssrc.as_mut_ptr(),
|
||||
);
|
||||
ffi::gst_rtsp_stream_get_ssrc(self.as_ref().to_glib_none().0, ssrc.as_mut_ptr());
|
||||
let ssrc = ssrc.assume_init();
|
||||
ssrc
|
||||
}
|
||||
|
@ -669,7 +638,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn get_ulpfec_enabled(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_ulpfec_enabled(
|
||||
from_glib(ffi::gst_rtsp_stream_get_ulpfec_enabled(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -678,26 +647,20 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn get_ulpfec_percentage(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_get_ulpfec_percentage(
|
||||
self.as_ref().to_glib_none().0,
|
||||
)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_stream_get_ulpfec_percentage(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn get_ulpfec_pt(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_get_ulpfec_pt(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_stream_get_ulpfec_pt(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn handle_keymgmt(&self, keymgmt: &str) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_handle_keymgmt(
|
||||
from_glib(ffi::gst_rtsp_stream_handle_keymgmt(
|
||||
self.as_ref().to_glib_none().0,
|
||||
keymgmt.to_glib_none().0,
|
||||
))
|
||||
|
@ -706,7 +669,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn has_control(&self, control: Option<&str>) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_has_control(
|
||||
from_glib(ffi::gst_rtsp_stream_has_control(
|
||||
self.as_ref().to_glib_none().0,
|
||||
control.to_glib_none().0,
|
||||
))
|
||||
|
@ -717,7 +680,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn is_bind_mcast_address(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_bind_mcast_address(
|
||||
from_glib(ffi::gst_rtsp_stream_is_bind_mcast_address(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -725,7 +688,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn is_blocking(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_blocking(
|
||||
from_glib(ffi::gst_rtsp_stream_is_blocking(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -733,7 +696,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn is_client_side(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_client_side(
|
||||
from_glib(ffi::gst_rtsp_stream_is_client_side(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -743,7 +706,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
||||
fn is_complete(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_complete(
|
||||
from_glib(ffi::gst_rtsp_stream_is_complete(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -753,7 +716,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
||||
fn is_receiver(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_receiver(
|
||||
from_glib(ffi::gst_rtsp_stream_is_receiver(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -763,14 +726,14 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
||||
fn is_sender(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_sender(
|
||||
from_glib(ffi::gst_rtsp_stream_is_sender(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
//fn is_transport_supported(&self, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> bool {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_is_transport_supported() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_stream_is_transport_supported() }
|
||||
//}
|
||||
|
||||
fn join_bin<P: IsA<gst::Bin>, Q: IsA<gst::Element>>(
|
||||
|
@ -780,8 +743,8 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
state: gst::State,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_join_bin(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_stream_join_bin(
|
||||
self.as_ref().to_glib_none().0,
|
||||
bin.as_ref().to_glib_none().0,
|
||||
rtpbin.as_ref().to_glib_none().0,
|
||||
|
@ -798,8 +761,8 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
rtpbin: &Q,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_leave_bin(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_stream_leave_bin(
|
||||
self.as_ref().to_glib_none().0,
|
||||
bin.as_ref().to_glib_none().0,
|
||||
rtpbin.as_ref().to_glib_none().0
|
||||
|
@ -814,8 +777,8 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
trans: &P,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_remove_transport(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_stream_remove_transport(
|
||||
self.as_ref().to_glib_none().0,
|
||||
trans.as_ref().to_glib_none().0
|
||||
),
|
||||
|
@ -828,7 +791,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn request_aux_receiver(&self, sessid: u32) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_request_aux_receiver(
|
||||
from_glib_full(ffi::gst_rtsp_stream_request_aux_receiver(
|
||||
self.as_ref().to_glib_none().0,
|
||||
sessid,
|
||||
))
|
||||
|
@ -837,7 +800,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn request_aux_sender(&self, sessid: u32) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_request_aux_sender(
|
||||
from_glib_full(ffi::gst_rtsp_stream_request_aux_sender(
|
||||
self.as_ref().to_glib_none().0,
|
||||
sessid,
|
||||
))
|
||||
|
@ -852,7 +815,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
sessid: u32,
|
||||
) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_request_ulpfec_decoder(
|
||||
from_glib_full(ffi::gst_rtsp_stream_request_ulpfec_decoder(
|
||||
self.as_ref().to_glib_none().0,
|
||||
rtpbin.as_ref().to_glib_none().0,
|
||||
sessid,
|
||||
|
@ -864,7 +827,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn request_ulpfec_encoder(&self, sessid: u32) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_request_ulpfec_encoder(
|
||||
from_glib_full(ffi::gst_rtsp_stream_request_ulpfec_encoder(
|
||||
self.as_ref().to_glib_none().0,
|
||||
sessid,
|
||||
))
|
||||
|
@ -879,7 +842,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
ttl: u32,
|
||||
) -> Option<RTSPAddress> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_reserve_address(
|
||||
from_glib_full(ffi::gst_rtsp_stream_reserve_address(
|
||||
self.as_ref().to_glib_none().0,
|
||||
address.to_glib_none().0,
|
||||
port,
|
||||
|
@ -893,7 +856,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
||||
fn seekable(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_seekable(
|
||||
from_glib(ffi::gst_rtsp_stream_seekable(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -901,7 +864,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_address_pool(
|
||||
ffi::gst_rtsp_stream_set_address_pool(
|
||||
self.as_ref().to_glib_none().0,
|
||||
pool.map(|p| p.as_ref()).to_glib_none().0,
|
||||
);
|
||||
|
@ -912,7 +875,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn set_bind_mcast_address(&self, bind_mcast_addr: bool) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_bind_mcast_address(
|
||||
ffi::gst_rtsp_stream_set_bind_mcast_address(
|
||||
self.as_ref().to_glib_none().0,
|
||||
bind_mcast_addr.to_glib(),
|
||||
);
|
||||
|
@ -921,11 +884,8 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn set_blocked(&self, blocked: bool) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_blocked(
|
||||
self.as_ref().to_glib_none().0,
|
||||
blocked.to_glib()
|
||||
),
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_stream_set_blocked(self.as_ref().to_glib_none().0, blocked.to_glib()),
|
||||
"Failed to block/unblock the dataflow"
|
||||
)
|
||||
}
|
||||
|
@ -933,16 +893,13 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn set_buffer_size(&self, size: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_buffer_size(
|
||||
self.as_ref().to_glib_none().0,
|
||||
size,
|
||||
);
|
||||
ffi::gst_rtsp_stream_set_buffer_size(self.as_ref().to_glib_none().0, size);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_client_side(&self, client_side: bool) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_client_side(
|
||||
ffi::gst_rtsp_stream_set_client_side(
|
||||
self.as_ref().to_glib_none().0,
|
||||
client_side.to_glib(),
|
||||
);
|
||||
|
@ -951,7 +908,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn set_control(&self, control: Option<&str>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_control(
|
||||
ffi::gst_rtsp_stream_set_control(
|
||||
self.as_ref().to_glib_none().0,
|
||||
control.to_glib_none().0,
|
||||
);
|
||||
|
@ -960,10 +917,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn set_dscp_qos(&self, dscp_qos: i32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_dscp_qos(
|
||||
self.as_ref().to_glib_none().0,
|
||||
dscp_qos,
|
||||
);
|
||||
ffi::gst_rtsp_stream_set_dscp_qos(self.as_ref().to_glib_none().0, dscp_qos);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -971,7 +925,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn set_max_mcast_ttl(&self, ttl: u32) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_set_max_mcast_ttl(
|
||||
from_glib(ffi::gst_rtsp_stream_set_max_mcast_ttl(
|
||||
self.as_ref().to_glib_none().0,
|
||||
ttl,
|
||||
))
|
||||
|
@ -980,13 +934,13 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn set_mtu(&self, mtu: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_mtu(self.as_ref().to_glib_none().0, mtu);
|
||||
ffi::gst_rtsp_stream_set_mtu(self.as_ref().to_glib_none().0, mtu);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_multicast_iface(&self, multicast_iface: Option<&str>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_multicast_iface(
|
||||
ffi::gst_rtsp_stream_set_multicast_iface(
|
||||
self.as_ref().to_glib_none().0,
|
||||
multicast_iface.to_glib_none().0,
|
||||
);
|
||||
|
@ -995,25 +949,19 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_profiles(
|
||||
self.as_ref().to_glib_none().0,
|
||||
profiles.to_glib(),
|
||||
);
|
||||
ffi::gst_rtsp_stream_set_profiles(self.as_ref().to_glib_none().0, profiles.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_protocols(
|
||||
self.as_ref().to_glib_none().0,
|
||||
protocols.to_glib(),
|
||||
);
|
||||
ffi::gst_rtsp_stream_set_protocols(self.as_ref().to_glib_none().0, protocols.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_pt_map(&self, pt: u32, caps: &gst::Caps) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_pt_map(
|
||||
ffi::gst_rtsp_stream_set_pt_map(
|
||||
self.as_ref().to_glib_none().0,
|
||||
pt,
|
||||
caps.to_glib_none().0,
|
||||
|
@ -1023,7 +971,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_publish_clock_mode(
|
||||
ffi::gst_rtsp_stream_set_publish_clock_mode(
|
||||
self.as_ref().to_glib_none().0,
|
||||
mode.to_glib(),
|
||||
);
|
||||
|
@ -1034,7 +982,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||
fn set_rate_control(&self, enabled: bool) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_rate_control(
|
||||
ffi::gst_rtsp_stream_set_rate_control(
|
||||
self.as_ref().to_glib_none().0,
|
||||
enabled.to_glib(),
|
||||
);
|
||||
|
@ -1043,16 +991,13 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn set_retransmission_pt(&self, rtx_pt: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_retransmission_pt(
|
||||
self.as_ref().to_glib_none().0,
|
||||
rtx_pt,
|
||||
);
|
||||
ffi::gst_rtsp_stream_set_retransmission_pt(self.as_ref().to_glib_none().0, rtx_pt);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_retransmission_time(&self, time: gst::ClockTime) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_retransmission_time(
|
||||
ffi::gst_rtsp_stream_set_retransmission_time(
|
||||
self.as_ref().to_glib_none().0,
|
||||
time.to_glib(),
|
||||
);
|
||||
|
@ -1061,10 +1006,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
|
||||
fn set_seqnum_offset(&self, seqnum: u16) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_seqnum_offset(
|
||||
self.as_ref().to_glib_none().0,
|
||||
seqnum,
|
||||
);
|
||||
ffi::gst_rtsp_stream_set_seqnum_offset(self.as_ref().to_glib_none().0, seqnum);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1072,10 +1014,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn set_ulpfec_percentage(&self, percentage: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_ulpfec_percentage(
|
||||
self.as_ref().to_glib_none().0,
|
||||
percentage,
|
||||
);
|
||||
ffi::gst_rtsp_stream_set_ulpfec_percentage(self.as_ref().to_glib_none().0, percentage);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1083,7 +1022,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn set_ulpfec_pt(&self, pt: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_ulpfec_pt(self.as_ref().to_glib_none().0, pt);
|
||||
ffi::gst_rtsp_stream_set_ulpfec_pt(self.as_ref().to_glib_none().0, pt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1095,10 +1034,10 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult),
|
||||
> = func;
|
||||
unsafe extern "C" fn func_func(
|
||||
stream: *mut gst_rtsp_server_sys::GstRTSPStream,
|
||||
trans: *mut gst_rtsp_server_sys::GstRTSPStreamTransport,
|
||||
user_data: glib_sys::gpointer,
|
||||
) -> gst_rtsp_server_sys::GstRTSPFilterResult {
|
||||
stream: *mut ffi::GstRTSPStream,
|
||||
trans: *mut ffi::GstRTSPStreamTransport,
|
||||
user_data: glib::ffi::gpointer,
|
||||
) -> ffi::GstRTSPFilterResult {
|
||||
let stream = from_glib_borrow(stream);
|
||||
let trans = from_glib_borrow(trans);
|
||||
let callback: *mut Option<
|
||||
|
@ -1123,20 +1062,18 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult),
|
||||
> = &func_data;
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_transport_filter(
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_stream_transport_filter(
|
||||
self.as_ref().to_glib_none().0,
|
||||
func,
|
||||
super_callback0 as *const _ as usize as *mut _,
|
||||
),
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn unblock_linked(&self) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_unblock_linked(self.as_ref().to_glib_none().0),
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_stream_unblock_linked(self.as_ref().to_glib_none().0),
|
||||
"Failed to unblock the dataflow"
|
||||
)
|
||||
}
|
||||
|
@ -1148,8 +1085,8 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
crypto: Option<&gst::Caps>,
|
||||
) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_update_crypto(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_stream_update_crypto(
|
||||
self.as_ref().to_glib_none().0,
|
||||
ssrc,
|
||||
crypto.to_glib_none().0
|
||||
|
@ -1163,7 +1100,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn verify_mcast_ttl(&self, ttl: u32) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_verify_mcast_ttl(
|
||||
from_glib(ffi::gst_rtsp_stream_verify_mcast_ttl(
|
||||
self.as_ref().to_glib_none().0,
|
||||
ttl,
|
||||
))
|
||||
|
@ -1178,9 +1115,9 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
P,
|
||||
F: Fn(&P, &gst::Element) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPStream,
|
||||
object: *mut gst_sys::GstElement,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPStream,
|
||||
object: *mut gst::ffi::GstElement,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPStream>,
|
||||
{
|
||||
|
@ -1211,9 +1148,9 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
P,
|
||||
F: Fn(&P, &gst::Element) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPStream,
|
||||
object: *mut gst_sys::GstElement,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPStream,
|
||||
object: *mut gst::ffi::GstElement,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPStream>,
|
||||
{
|
||||
|
@ -1244,9 +1181,9 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
P,
|
||||
F: Fn(&P, &gst::Element) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPStream,
|
||||
object: *mut gst_sys::GstElement,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPStream,
|
||||
object: *mut gst::ffi::GstElement,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPStream>,
|
||||
{
|
||||
|
@ -1274,9 +1211,9 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_control_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPStream,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPStream,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPStream>,
|
||||
{
|
||||
|
@ -1301,9 +1238,9 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_profiles_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPStream,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPStream,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPStream>,
|
||||
{
|
||||
|
@ -1328,9 +1265,9 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_protocols_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPStream,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPStream,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPStream>,
|
||||
{
|
||||
|
|
|
@ -2,34 +2,29 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use glib;
|
||||
use crate::RTSPStream;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use gst;
|
||||
use gst_rtsp;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use RTSPStream;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPStreamTransport(Object<gst_rtsp_server_sys::GstRTSPStreamTransport, gst_rtsp_server_sys::GstRTSPStreamTransportClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPStreamTransport(Object<ffi::GstRTSPStreamTransport, ffi::GstRTSPStreamTransportClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_stream_transport_get_type(),
|
||||
get_type => || ffi::gst_rtsp_stream_transport_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl RTSPStreamTransport {
|
||||
//pub fn new<P: IsA<RTSPStream>>(stream: &P, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> RTSPStreamTransport {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_new() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_stream_transport_new() }
|
||||
//}
|
||||
}
|
||||
|
||||
pub const NONE_RTSP_STREAM_TRANSPORT: Option<&RTSPStreamTransport> = None;
|
||||
|
||||
pub trait RTSPStreamTransportExt: 'static {
|
||||
fn get_rtpinfo(&self, start_time: gst::ClockTime) -> Option<GString>;
|
||||
fn get_rtpinfo(&self, start_time: gst::ClockTime) -> Option<glib::GString>;
|
||||
|
||||
fn get_stream(&self) -> Option<RTSPStream>;
|
||||
|
||||
|
@ -81,9 +76,9 @@ pub trait RTSPStreamTransportExt: 'static {
|
|||
}
|
||||
|
||||
impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
||||
fn get_rtpinfo(&self, start_time: gst::ClockTime) -> Option<GString> {
|
||||
fn get_rtpinfo(&self, start_time: gst::ClockTime) -> Option<glib::GString> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_transport_get_rtpinfo(
|
||||
from_glib_full(ffi::gst_rtsp_stream_transport_get_rtpinfo(
|
||||
self.as_ref().to_glib_none().0,
|
||||
start_time.to_glib(),
|
||||
))
|
||||
|
@ -92,19 +87,19 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
|
||||
fn get_stream(&self) -> Option<RTSPStream> {
|
||||
unsafe {
|
||||
from_glib_none(gst_rtsp_server_sys::gst_rtsp_stream_transport_get_stream(
|
||||
from_glib_none(ffi::gst_rtsp_stream_transport_get_stream(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_transport(&self) -> /*Ignored*/Option<gst_rtsp::RTSPTransport> {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_get_transport() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_stream_transport_get_transport() }
|
||||
//}
|
||||
|
||||
fn get_url(&self) -> Option<gst_rtsp::RTSPUrl> {
|
||||
unsafe {
|
||||
from_glib_none(gst_rtsp_server_sys::gst_rtsp_stream_transport_get_url(
|
||||
from_glib_none(ffi::gst_rtsp_stream_transport_get_url(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -112,7 +107,7 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
|
||||
fn is_timed_out(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_transport_is_timed_out(
|
||||
from_glib(ffi::gst_rtsp_stream_transport_is_timed_out(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
|
@ -120,9 +115,7 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
|
||||
fn keep_alive(&self) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_transport_keep_alive(
|
||||
self.as_ref().to_glib_none().0,
|
||||
);
|
||||
ffi::gst_rtsp_stream_transport_keep_alive(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,16 +123,14 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
fn message_sent(&self) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_transport_message_sent(
|
||||
self.as_ref().to_glib_none().0,
|
||||
);
|
||||
ffi::gst_rtsp_stream_transport_message_sent(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn send_rtcp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_transport_send_rtcp(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_stream_transport_send_rtcp(
|
||||
self.as_ref().to_glib_none().0,
|
||||
buffer.to_glib_none().0
|
||||
),
|
||||
|
@ -151,13 +142,13 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
//#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
//fn send_rtcp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_send_rtcp_list() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_stream_transport_send_rtcp_list() }
|
||||
//}
|
||||
|
||||
fn send_rtp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_transport_send_rtp(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_stream_transport_send_rtp(
|
||||
self.as_ref().to_glib_none().0,
|
||||
buffer.to_glib_none().0
|
||||
),
|
||||
|
@ -169,13 +160,13 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
//#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
//fn send_rtp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_send_rtp_list() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_stream_transport_send_rtp_list() }
|
||||
//}
|
||||
|
||||
fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_transport_set_active(
|
||||
glib::glib_result_from_gboolean!(
|
||||
ffi::gst_rtsp_stream_transport_set_active(
|
||||
self.as_ref().to_glib_none().0,
|
||||
active.to_glib()
|
||||
),
|
||||
|
@ -185,23 +176,23 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
}
|
||||
|
||||
//fn set_callbacks<P: Fn(&gst::Buffer, u8) -> bool + 'static, Q: Fn(&gst::Buffer, u8) -> bool + 'static>(&self, send_rtp: P, send_rtcp: Q) {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_set_callbacks() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_stream_transport_set_callbacks() }
|
||||
//}
|
||||
|
||||
fn set_keepalive<P: Fn() + 'static>(&self, keep_alive: P) {
|
||||
let keep_alive_data: Box_<P> = Box_::new(keep_alive);
|
||||
unsafe extern "C" fn keep_alive_func<P: Fn() + 'static>(user_data: glib_sys::gpointer) {
|
||||
unsafe extern "C" fn keep_alive_func<P: Fn() + 'static>(user_data: glib::ffi::gpointer) {
|
||||
let callback: &P = &*(user_data as *mut _);
|
||||
(*callback)();
|
||||
}
|
||||
let keep_alive = Some(keep_alive_func::<P> as _);
|
||||
unsafe extern "C" fn notify_func<P: Fn() + 'static>(data: glib_sys::gpointer) {
|
||||
unsafe extern "C" fn notify_func<P: Fn() + 'static>(data: glib::ffi::gpointer) {
|
||||
let _callback: Box_<P> = Box_::from_raw(data as *mut _);
|
||||
}
|
||||
let destroy_call3 = Some(notify_func::<P> as _);
|
||||
let super_callback0: Box_<P> = keep_alive_data;
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_transport_set_keepalive(
|
||||
ffi::gst_rtsp_stream_transport_set_keepalive(
|
||||
self.as_ref().to_glib_none().0,
|
||||
keep_alive,
|
||||
Box_::into_raw(super_callback0) as *mut _,
|
||||
|
@ -213,23 +204,23 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
//#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
//#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
||||
//fn set_list_callbacks(&self, send_rtp_list: /*Unimplemented*/Fn(/*Ignored*/gst::BufferList, u8) -> bool, send_rtcp_list: /*Unimplemented*/Fn(/*Ignored*/gst::BufferList, u8) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_set_list_callbacks() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_stream_transport_set_list_callbacks() }
|
||||
//}
|
||||
|
||||
fn set_message_sent<P: Fn() + 'static>(&self, message_sent: P) {
|
||||
let message_sent_data: Box_<P> = Box_::new(message_sent);
|
||||
unsafe extern "C" fn message_sent_func<P: Fn() + 'static>(user_data: glib_sys::gpointer) {
|
||||
unsafe extern "C" fn message_sent_func<P: Fn() + 'static>(user_data: glib::ffi::gpointer) {
|
||||
let callback: &P = &*(user_data as *mut _);
|
||||
(*callback)();
|
||||
}
|
||||
let message_sent = Some(message_sent_func::<P> as _);
|
||||
unsafe extern "C" fn notify_func<P: Fn() + 'static>(data: glib_sys::gpointer) {
|
||||
unsafe extern "C" fn notify_func<P: Fn() + 'static>(data: glib::ffi::gpointer) {
|
||||
let _callback: Box_<P> = Box_::from_raw(data as *mut _);
|
||||
}
|
||||
let destroy_call3 = Some(notify_func::<P> as _);
|
||||
let super_callback0: Box_<P> = message_sent_data;
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_transport_set_message_sent(
|
||||
ffi::gst_rtsp_stream_transport_set_message_sent(
|
||||
self.as_ref().to_glib_none().0,
|
||||
message_sent,
|
||||
Box_::into_raw(super_callback0) as *mut _,
|
||||
|
@ -243,8 +234,8 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
fn set_message_sent_full<P: Fn(&RTSPStreamTransport) + 'static>(&self, message_sent: P) {
|
||||
let message_sent_data: Box_<P> = Box_::new(message_sent);
|
||||
unsafe extern "C" fn message_sent_func<P: Fn(&RTSPStreamTransport) + 'static>(
|
||||
trans: *mut gst_rtsp_server_sys::GstRTSPStreamTransport,
|
||||
user_data: glib_sys::gpointer,
|
||||
trans: *mut ffi::GstRTSPStreamTransport,
|
||||
user_data: glib::ffi::gpointer,
|
||||
) {
|
||||
let trans = from_glib_borrow(trans);
|
||||
let callback: &P = &*(user_data as *mut _);
|
||||
|
@ -252,14 +243,14 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
}
|
||||
let message_sent = Some(message_sent_func::<P> as _);
|
||||
unsafe extern "C" fn notify_func<P: Fn(&RTSPStreamTransport) + 'static>(
|
||||
data: glib_sys::gpointer,
|
||||
data: glib::ffi::gpointer,
|
||||
) {
|
||||
let _callback: Box_<P> = Box_::from_raw(data as *mut _);
|
||||
}
|
||||
let destroy_call3 = Some(notify_func::<P> as _);
|
||||
let super_callback0: Box_<P> = message_sent_data;
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_transport_set_message_sent_full(
|
||||
ffi::gst_rtsp_stream_transport_set_message_sent_full(
|
||||
self.as_ref().to_glib_none().0,
|
||||
message_sent,
|
||||
Box_::into_raw(super_callback0) as *mut _,
|
||||
|
@ -270,7 +261,7 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
|
||||
fn set_timed_out(&self, timedout: bool) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_transport_set_timed_out(
|
||||
ffi::gst_rtsp_stream_transport_set_timed_out(
|
||||
self.as_ref().to_glib_none().0,
|
||||
timedout.to_glib(),
|
||||
);
|
||||
|
@ -278,12 +269,12 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
}
|
||||
|
||||
//fn set_transport(&self, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport) {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_set_transport() }
|
||||
// unsafe { TODO: call ffi:gst_rtsp_stream_transport_set_transport() }
|
||||
//}
|
||||
|
||||
fn set_url(&self, url: Option<&gst_rtsp::RTSPUrl>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_transport_set_url(
|
||||
ffi::gst_rtsp_stream_transport_set_url(
|
||||
self.as_ref().to_glib_none().0,
|
||||
url.to_glib_none().0,
|
||||
);
|
||||
|
|
|
@ -2,37 +2,35 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use crate::RTSPContext;
|
||||
use crate::RTSPThread;
|
||||
use crate::RTSPThreadType;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib_sys;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use RTSPContext;
|
||||
use RTSPThread;
|
||||
use RTSPThreadType;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPThreadPool(Object<gst_rtsp_server_sys::GstRTSPThreadPool, gst_rtsp_server_sys::GstRTSPThreadPoolClass>);
|
||||
glib::glib_wrapper! {
|
||||
pub struct RTSPThreadPool(Object<ffi::GstRTSPThreadPool, ffi::GstRTSPThreadPoolClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_thread_pool_get_type(),
|
||||
get_type => || ffi::gst_rtsp_thread_pool_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl RTSPThreadPool {
|
||||
pub fn new() -> RTSPThreadPool {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_full(gst_rtsp_server_sys::gst_rtsp_thread_pool_new()) }
|
||||
unsafe { from_glib_full(ffi::gst_rtsp_thread_pool_new()) }
|
||||
}
|
||||
|
||||
pub fn cleanup() {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_thread_pool_cleanup();
|
||||
ffi::gst_rtsp_thread_pool_cleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,16 +61,12 @@ pub trait RTSPThreadPoolExt: 'static {
|
|||
|
||||
impl<O: IsA<RTSPThreadPool>> RTSPThreadPoolExt for O {
|
||||
fn get_max_threads(&self) -> i32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_thread_pool_get_max_threads(
|
||||
self.as_ref().to_glib_none().0,
|
||||
)
|
||||
}
|
||||
unsafe { ffi::gst_rtsp_thread_pool_get_max_threads(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
||||
fn get_thread(&self, type_: RTSPThreadType, ctx: &RTSPContext) -> Option<RTSPThread> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_thread_pool_get_thread(
|
||||
from_glib_full(ffi::gst_rtsp_thread_pool_get_thread(
|
||||
self.as_ref().to_glib_none().0,
|
||||
type_.to_glib(),
|
||||
ctx.to_glib_none().0,
|
||||
|
@ -82,10 +76,7 @@ impl<O: IsA<RTSPThreadPool>> RTSPThreadPoolExt for O {
|
|||
|
||||
fn set_max_threads(&self, max_threads: i32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_thread_pool_set_max_threads(
|
||||
self.as_ref().to_glib_none().0,
|
||||
max_threads,
|
||||
);
|
||||
ffi::gst_rtsp_thread_pool_set_max_threads(self.as_ref().to_glib_none().0, max_threads);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,9 +85,9 @@ impl<O: IsA<RTSPThreadPool>> RTSPThreadPoolExt for O {
|
|||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_max_threads_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPThreadPool,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
this: *mut ffi::GstRTSPThreadPool,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPThreadPool>,
|
||||
{
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 062b3d6)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ b84cead5)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 694b4b8)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 6278d819)
|
||||
|
|
Loading…
Reference in a new issue