diff --git a/gstreamer-rtp/src/auto/constants.rs b/gstreamer-rtp/src/auto/constants.rs index af0e535a8..2d46c8a3a 100644 --- a/gstreamer-rtp/src/auto/constants.rs +++ b/gstreamer-rtp/src/auto/constants.rs @@ -2,210 +2,203 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT -use gst_rtp_sys; use std::ffi::CStr; pub static RTP_HDREXT_BASE: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_HDREXT_BASE) - .to_str() - .unwrap() + CStr::from_ptr(ffi::GST_RTP_HDREXT_BASE).to_str().unwrap() }); pub static RTP_HDREXT_NTP_56: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_HDREXT_NTP_56) - .to_str() - .unwrap() + CStr::from_ptr(ffi::GST_RTP_HDREXT_NTP_56).to_str().unwrap() }); pub static RTP_HDREXT_NTP_64: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_HDREXT_NTP_64) - .to_str() - .unwrap() + CStr::from_ptr(ffi::GST_RTP_HDREXT_NTP_64).to_str().unwrap() }); pub static RTP_PAYLOAD_1016_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_1016_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_1016_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_CELLB_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_CELLB_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_CELLB_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_CN_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_CN_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_CN_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_DVI4_11025_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_DVI4_11025_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_DVI4_11025_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_DVI4_16000_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_DVI4_16000_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_DVI4_16000_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_DVI4_22050_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_DVI4_22050_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_DVI4_22050_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_DVI4_8000_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_DVI4_8000_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_DVI4_8000_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_DYNAMIC_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_DYNAMIC_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_DYNAMIC_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_G721_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_G721_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_G721_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_G722_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_G722_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_G722_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_G723_53_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_G723_53_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_G723_53_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_G723_63_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_G723_63_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_G723_63_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_G723_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_G723_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_G723_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_G728_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_G728_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_G728_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_G729_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_G729_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_G729_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_GSM_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_GSM_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_GSM_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_H261_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_H261_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_H261_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_H263_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_H263_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_H263_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_JPEG_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_JPEG_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_JPEG_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_L16_MONO_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_L16_MONO_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_L16_MONO_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_L16_STEREO_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_L16_STEREO_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_L16_STEREO_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_LPC_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_LPC_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_LPC_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_MP2T_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_MP2T_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_MP2T_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_MPA_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_MPA_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_MPA_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_MPV_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_MPV_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_MPV_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_NV_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_NV_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_NV_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_PCMA_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_PCMA_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_PCMA_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_PCMU_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_PCMU_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_PCMU_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_QCELP_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_QCELP_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_QCELP_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_TS41_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_TS41_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_TS41_STRING) .to_str() .unwrap() }); pub static RTP_PAYLOAD_TS48_STRING: once_cell::sync::Lazy<&'static str> = once_cell::sync::Lazy::new(|| unsafe { - CStr::from_ptr(gst_rtp_sys::GST_RTP_PAYLOAD_TS48_STRING) + CStr::from_ptr(ffi::GST_RTP_PAYLOAD_TS48_STRING) .to_str() .unwrap() }); diff --git a/gstreamer-rtp/src/auto/enums.rs b/gstreamer-rtp/src/auto/enums.rs index 69a94ed0b..1204aa394 100644 --- a/gstreamer-rtp/src/auto/enums.rs +++ b/gstreamer-rtp/src/auto/enums.rs @@ -9,8 +9,6 @@ use glib::value::SetValue; use glib::value::Value; use glib::StaticType; use glib::Type; -use gobject_sys; -use gst_rtp_sys; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -30,27 +28,27 @@ pub enum RTCPFBType { #[doc(hidden)] impl ToGlib for RTCPFBType { - type GlibType = gst_rtp_sys::GstRTCPFBType; + type GlibType = ffi::GstRTCPFBType; - fn to_glib(&self) -> gst_rtp_sys::GstRTCPFBType { + fn to_glib(&self) -> ffi::GstRTCPFBType { match *self { - RTCPFBType::FbTypeInvalid => gst_rtp_sys::GST_RTCP_FB_TYPE_INVALID, - RTCPFBType::RtpfbTypeNack => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_NACK, - RTCPFBType::RtpfbTypeTmmbr => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_TMMBR, - RTCPFBType::RtpfbTypeTmmbn => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_TMMBN, - RTCPFBType::RtpfbTypeRtcpSrReq => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ, - RTCPFBType::RtpfbTypeTwcc => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_TWCC, - RTCPFBType::PsfbTypeSli => gst_rtp_sys::GST_RTCP_PSFB_TYPE_SLI, - RTCPFBType::PsfbTypeTstn => gst_rtp_sys::GST_RTCP_PSFB_TYPE_TSTN, - RTCPFBType::PsfbTypeVbcn => gst_rtp_sys::GST_RTCP_PSFB_TYPE_VBCN, + RTCPFBType::FbTypeInvalid => ffi::GST_RTCP_FB_TYPE_INVALID, + RTCPFBType::RtpfbTypeNack => ffi::GST_RTCP_RTPFB_TYPE_NACK, + RTCPFBType::RtpfbTypeTmmbr => ffi::GST_RTCP_RTPFB_TYPE_TMMBR, + RTCPFBType::RtpfbTypeTmmbn => ffi::GST_RTCP_RTPFB_TYPE_TMMBN, + RTCPFBType::RtpfbTypeRtcpSrReq => ffi::GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ, + RTCPFBType::RtpfbTypeTwcc => ffi::GST_RTCP_RTPFB_TYPE_TWCC, + RTCPFBType::PsfbTypeSli => ffi::GST_RTCP_PSFB_TYPE_SLI, + RTCPFBType::PsfbTypeTstn => ffi::GST_RTCP_PSFB_TYPE_TSTN, + RTCPFBType::PsfbTypeVbcn => ffi::GST_RTCP_PSFB_TYPE_VBCN, RTCPFBType::__Unknown(value) => value, } } } #[doc(hidden)] -impl FromGlib for RTCPFBType { - fn from_glib(value: gst_rtp_sys::GstRTCPFBType) -> Self { +impl FromGlib for RTCPFBType { + fn from_glib(value: ffi::GstRTCPFBType) -> Self { skip_assert_initialized!(); match value { 0 => RTCPFBType::FbTypeInvalid, @@ -69,7 +67,7 @@ impl FromGlib for RTCPFBType { impl StaticType for RTCPFBType { fn static_type() -> Type { - unsafe { from_glib(gst_rtp_sys::gst_rtcpfb_type_get_type()) } + unsafe { from_glib(ffi::gst_rtcpfb_type_get_type()) } } } @@ -81,13 +79,13 @@ impl<'a> FromValueOptional<'a> for RTCPFBType { impl<'a> FromValue<'a> for RTCPFBType { 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 RTCPFBType { 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()) } } @@ -110,28 +108,28 @@ pub enum RTCPSDESType { #[doc(hidden)] impl ToGlib for RTCPSDESType { - type GlibType = gst_rtp_sys::GstRTCPSDESType; + type GlibType = ffi::GstRTCPSDESType; - fn to_glib(&self) -> gst_rtp_sys::GstRTCPSDESType { + fn to_glib(&self) -> ffi::GstRTCPSDESType { match *self { - RTCPSDESType::Invalid => gst_rtp_sys::GST_RTCP_SDES_INVALID, - RTCPSDESType::End => gst_rtp_sys::GST_RTCP_SDES_END, - RTCPSDESType::Cname => gst_rtp_sys::GST_RTCP_SDES_CNAME, - RTCPSDESType::Name => gst_rtp_sys::GST_RTCP_SDES_NAME, - RTCPSDESType::Email => gst_rtp_sys::GST_RTCP_SDES_EMAIL, - RTCPSDESType::Phone => gst_rtp_sys::GST_RTCP_SDES_PHONE, - RTCPSDESType::Loc => gst_rtp_sys::GST_RTCP_SDES_LOC, - RTCPSDESType::Tool => gst_rtp_sys::GST_RTCP_SDES_TOOL, - RTCPSDESType::Note => gst_rtp_sys::GST_RTCP_SDES_NOTE, - RTCPSDESType::Priv => gst_rtp_sys::GST_RTCP_SDES_PRIV, + RTCPSDESType::Invalid => ffi::GST_RTCP_SDES_INVALID, + RTCPSDESType::End => ffi::GST_RTCP_SDES_END, + RTCPSDESType::Cname => ffi::GST_RTCP_SDES_CNAME, + RTCPSDESType::Name => ffi::GST_RTCP_SDES_NAME, + RTCPSDESType::Email => ffi::GST_RTCP_SDES_EMAIL, + RTCPSDESType::Phone => ffi::GST_RTCP_SDES_PHONE, + RTCPSDESType::Loc => ffi::GST_RTCP_SDES_LOC, + RTCPSDESType::Tool => ffi::GST_RTCP_SDES_TOOL, + RTCPSDESType::Note => ffi::GST_RTCP_SDES_NOTE, + RTCPSDESType::Priv => ffi::GST_RTCP_SDES_PRIV, RTCPSDESType::__Unknown(value) => value, } } } #[doc(hidden)] -impl FromGlib for RTCPSDESType { - fn from_glib(value: gst_rtp_sys::GstRTCPSDESType) -> Self { +impl FromGlib for RTCPSDESType { + fn from_glib(value: ffi::GstRTCPSDESType) -> Self { skip_assert_initialized!(); match value { -1 => RTCPSDESType::Invalid, @@ -151,7 +149,7 @@ impl FromGlib for RTCPSDESType { impl StaticType for RTCPSDESType { fn static_type() -> Type { - unsafe { from_glib(gst_rtp_sys::gst_rtcpsdes_type_get_type()) } + unsafe { from_glib(ffi::gst_rtcpsdes_type_get_type()) } } } @@ -163,13 +161,13 @@ impl<'a> FromValueOptional<'a> for RTCPSDESType { impl<'a> FromValue<'a> for RTCPSDESType { 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 RTCPSDESType { 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()) } } @@ -191,27 +189,27 @@ pub enum RTCPType { #[doc(hidden)] impl ToGlib for RTCPType { - type GlibType = gst_rtp_sys::GstRTCPType; + type GlibType = ffi::GstRTCPType; - fn to_glib(&self) -> gst_rtp_sys::GstRTCPType { + fn to_glib(&self) -> ffi::GstRTCPType { match *self { - RTCPType::Invalid => gst_rtp_sys::GST_RTCP_TYPE_INVALID, - RTCPType::Sr => gst_rtp_sys::GST_RTCP_TYPE_SR, - RTCPType::Rr => gst_rtp_sys::GST_RTCP_TYPE_RR, - RTCPType::Sdes => gst_rtp_sys::GST_RTCP_TYPE_SDES, - RTCPType::Bye => gst_rtp_sys::GST_RTCP_TYPE_BYE, - RTCPType::App => gst_rtp_sys::GST_RTCP_TYPE_APP, - RTCPType::Rtpfb => gst_rtp_sys::GST_RTCP_TYPE_RTPFB, - RTCPType::Psfb => gst_rtp_sys::GST_RTCP_TYPE_PSFB, - RTCPType::Xr => gst_rtp_sys::GST_RTCP_TYPE_XR, + RTCPType::Invalid => ffi::GST_RTCP_TYPE_INVALID, + RTCPType::Sr => ffi::GST_RTCP_TYPE_SR, + RTCPType::Rr => ffi::GST_RTCP_TYPE_RR, + RTCPType::Sdes => ffi::GST_RTCP_TYPE_SDES, + RTCPType::Bye => ffi::GST_RTCP_TYPE_BYE, + RTCPType::App => ffi::GST_RTCP_TYPE_APP, + RTCPType::Rtpfb => ffi::GST_RTCP_TYPE_RTPFB, + RTCPType::Psfb => ffi::GST_RTCP_TYPE_PSFB, + RTCPType::Xr => ffi::GST_RTCP_TYPE_XR, RTCPType::__Unknown(value) => value, } } } #[doc(hidden)] -impl FromGlib for RTCPType { - fn from_glib(value: gst_rtp_sys::GstRTCPType) -> Self { +impl FromGlib for RTCPType { + fn from_glib(value: ffi::GstRTCPType) -> Self { skip_assert_initialized!(); match value { 0 => RTCPType::Invalid, @@ -230,7 +228,7 @@ impl FromGlib for RTCPType { impl StaticType for RTCPType { fn static_type() -> Type { - unsafe { from_glib(gst_rtp_sys::gst_rtcp_type_get_type()) } + unsafe { from_glib(ffi::gst_rtcp_type_get_type()) } } } @@ -242,13 +240,13 @@ impl<'a> FromValueOptional<'a> for RTCPType { impl<'a> FromValue<'a> for RTCPType { 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 RTCPType { 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()) } } @@ -273,18 +271,18 @@ pub enum RTCPXRType { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(hidden)] impl ToGlib for RTCPXRType { - type GlibType = gst_rtp_sys::GstRTCPXRType; + type GlibType = ffi::GstRTCPXRType; - fn to_glib(&self) -> gst_rtp_sys::GstRTCPXRType { + fn to_glib(&self) -> ffi::GstRTCPXRType { match *self { - RTCPXRType::Invalid => gst_rtp_sys::GST_RTCP_XR_TYPE_INVALID, - RTCPXRType::Lrle => gst_rtp_sys::GST_RTCP_XR_TYPE_LRLE, - RTCPXRType::Drle => gst_rtp_sys::GST_RTCP_XR_TYPE_DRLE, - RTCPXRType::Prt => gst_rtp_sys::GST_RTCP_XR_TYPE_PRT, - RTCPXRType::Rrt => gst_rtp_sys::GST_RTCP_XR_TYPE_RRT, - RTCPXRType::Dlrr => gst_rtp_sys::GST_RTCP_XR_TYPE_DLRR, - RTCPXRType::Ssumm => gst_rtp_sys::GST_RTCP_XR_TYPE_SSUMM, - RTCPXRType::VoipMetrics => gst_rtp_sys::GST_RTCP_XR_TYPE_VOIP_METRICS, + RTCPXRType::Invalid => ffi::GST_RTCP_XR_TYPE_INVALID, + RTCPXRType::Lrle => ffi::GST_RTCP_XR_TYPE_LRLE, + RTCPXRType::Drle => ffi::GST_RTCP_XR_TYPE_DRLE, + RTCPXRType::Prt => ffi::GST_RTCP_XR_TYPE_PRT, + RTCPXRType::Rrt => ffi::GST_RTCP_XR_TYPE_RRT, + RTCPXRType::Dlrr => ffi::GST_RTCP_XR_TYPE_DLRR, + RTCPXRType::Ssumm => ffi::GST_RTCP_XR_TYPE_SSUMM, + RTCPXRType::VoipMetrics => ffi::GST_RTCP_XR_TYPE_VOIP_METRICS, RTCPXRType::__Unknown(value) => value, } } @@ -293,8 +291,8 @@ impl ToGlib for RTCPXRType { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(hidden)] -impl FromGlib for RTCPXRType { - fn from_glib(value: gst_rtp_sys::GstRTCPXRType) -> Self { +impl FromGlib for RTCPXRType { + fn from_glib(value: ffi::GstRTCPXRType) -> Self { skip_assert_initialized!(); match value { -1 => RTCPXRType::Invalid, @@ -314,7 +312,7 @@ impl FromGlib for RTCPXRType { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl StaticType for RTCPXRType { fn static_type() -> Type { - unsafe { from_glib(gst_rtp_sys::gst_rtcpxr_type_get_type()) } + unsafe { from_glib(ffi::gst_rtcpxr_type_get_type()) } } } @@ -330,7 +328,7 @@ impl<'a> FromValueOptional<'a> for RTCPXRType { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl<'a> FromValue<'a> for RTCPXRType { 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)) } } @@ -338,7 +336,7 @@ impl<'a> FromValue<'a> for RTCPXRType { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl SetValue for RTCPXRType { 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()) } } @@ -377,44 +375,44 @@ pub enum RTPPayload { #[doc(hidden)] impl ToGlib for RTPPayload { - type GlibType = gst_rtp_sys::GstRTPPayload; + type GlibType = ffi::GstRTPPayload; - fn to_glib(&self) -> gst_rtp_sys::GstRTPPayload { + fn to_glib(&self) -> ffi::GstRTPPayload { match *self { - RTPPayload::Pcmu => gst_rtp_sys::GST_RTP_PAYLOAD_PCMU, - RTPPayload::_1016 => gst_rtp_sys::GST_RTP_PAYLOAD_1016, - RTPPayload::G721 => gst_rtp_sys::GST_RTP_PAYLOAD_G721, - RTPPayload::Gsm => gst_rtp_sys::GST_RTP_PAYLOAD_GSM, - RTPPayload::G723 => gst_rtp_sys::GST_RTP_PAYLOAD_G723, - RTPPayload::Dvi48000 => gst_rtp_sys::GST_RTP_PAYLOAD_DVI4_8000, - RTPPayload::Dvi416000 => gst_rtp_sys::GST_RTP_PAYLOAD_DVI4_16000, - RTPPayload::Lpc => gst_rtp_sys::GST_RTP_PAYLOAD_LPC, - RTPPayload::Pcma => gst_rtp_sys::GST_RTP_PAYLOAD_PCMA, - RTPPayload::G722 => gst_rtp_sys::GST_RTP_PAYLOAD_G722, - RTPPayload::L16Stereo => gst_rtp_sys::GST_RTP_PAYLOAD_L16_STEREO, - RTPPayload::L16Mono => gst_rtp_sys::GST_RTP_PAYLOAD_L16_MONO, - RTPPayload::Qcelp => gst_rtp_sys::GST_RTP_PAYLOAD_QCELP, - RTPPayload::Cn => gst_rtp_sys::GST_RTP_PAYLOAD_CN, - RTPPayload::Mpa => gst_rtp_sys::GST_RTP_PAYLOAD_MPA, - RTPPayload::G728 => gst_rtp_sys::GST_RTP_PAYLOAD_G728, - RTPPayload::Dvi411025 => gst_rtp_sys::GST_RTP_PAYLOAD_DVI4_11025, - RTPPayload::Dvi422050 => gst_rtp_sys::GST_RTP_PAYLOAD_DVI4_22050, - RTPPayload::G729 => gst_rtp_sys::GST_RTP_PAYLOAD_G729, - RTPPayload::Cellb => gst_rtp_sys::GST_RTP_PAYLOAD_CELLB, - RTPPayload::Jpeg => gst_rtp_sys::GST_RTP_PAYLOAD_JPEG, - RTPPayload::Nv => gst_rtp_sys::GST_RTP_PAYLOAD_NV, - RTPPayload::H261 => gst_rtp_sys::GST_RTP_PAYLOAD_H261, - RTPPayload::Mpv => gst_rtp_sys::GST_RTP_PAYLOAD_MPV, - RTPPayload::Mp2t => gst_rtp_sys::GST_RTP_PAYLOAD_MP2T, - RTPPayload::H263 => gst_rtp_sys::GST_RTP_PAYLOAD_H263, + RTPPayload::Pcmu => ffi::GST_RTP_PAYLOAD_PCMU, + RTPPayload::_1016 => ffi::GST_RTP_PAYLOAD_1016, + RTPPayload::G721 => ffi::GST_RTP_PAYLOAD_G721, + RTPPayload::Gsm => ffi::GST_RTP_PAYLOAD_GSM, + RTPPayload::G723 => ffi::GST_RTP_PAYLOAD_G723, + RTPPayload::Dvi48000 => ffi::GST_RTP_PAYLOAD_DVI4_8000, + RTPPayload::Dvi416000 => ffi::GST_RTP_PAYLOAD_DVI4_16000, + RTPPayload::Lpc => ffi::GST_RTP_PAYLOAD_LPC, + RTPPayload::Pcma => ffi::GST_RTP_PAYLOAD_PCMA, + RTPPayload::G722 => ffi::GST_RTP_PAYLOAD_G722, + RTPPayload::L16Stereo => ffi::GST_RTP_PAYLOAD_L16_STEREO, + RTPPayload::L16Mono => ffi::GST_RTP_PAYLOAD_L16_MONO, + RTPPayload::Qcelp => ffi::GST_RTP_PAYLOAD_QCELP, + RTPPayload::Cn => ffi::GST_RTP_PAYLOAD_CN, + RTPPayload::Mpa => ffi::GST_RTP_PAYLOAD_MPA, + RTPPayload::G728 => ffi::GST_RTP_PAYLOAD_G728, + RTPPayload::Dvi411025 => ffi::GST_RTP_PAYLOAD_DVI4_11025, + RTPPayload::Dvi422050 => ffi::GST_RTP_PAYLOAD_DVI4_22050, + RTPPayload::G729 => ffi::GST_RTP_PAYLOAD_G729, + RTPPayload::Cellb => ffi::GST_RTP_PAYLOAD_CELLB, + RTPPayload::Jpeg => ffi::GST_RTP_PAYLOAD_JPEG, + RTPPayload::Nv => ffi::GST_RTP_PAYLOAD_NV, + RTPPayload::H261 => ffi::GST_RTP_PAYLOAD_H261, + RTPPayload::Mpv => ffi::GST_RTP_PAYLOAD_MPV, + RTPPayload::Mp2t => ffi::GST_RTP_PAYLOAD_MP2T, + RTPPayload::H263 => ffi::GST_RTP_PAYLOAD_H263, RTPPayload::__Unknown(value) => value, } } } #[doc(hidden)] -impl FromGlib for RTPPayload { - fn from_glib(value: gst_rtp_sys::GstRTPPayload) -> Self { +impl FromGlib for RTPPayload { + fn from_glib(value: ffi::GstRTPPayload) -> Self { skip_assert_initialized!(); match value { 0 => RTPPayload::Pcmu, @@ -450,7 +448,7 @@ impl FromGlib for RTPPayload { impl StaticType for RTPPayload { fn static_type() -> Type { - unsafe { from_glib(gst_rtp_sys::gst_rtp_payload_get_type()) } + unsafe { from_glib(ffi::gst_rtp_payload_get_type()) } } } @@ -462,13 +460,13 @@ impl<'a> FromValueOptional<'a> for RTPPayload { impl<'a> FromValue<'a> for RTPPayload { 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 RTPPayload { 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()) } } @@ -486,23 +484,23 @@ pub enum RTPProfile { #[doc(hidden)] impl ToGlib for RTPProfile { - type GlibType = gst_rtp_sys::GstRTPProfile; + type GlibType = ffi::GstRTPProfile; - fn to_glib(&self) -> gst_rtp_sys::GstRTPProfile { + fn to_glib(&self) -> ffi::GstRTPProfile { match *self { - RTPProfile::Unknown => gst_rtp_sys::GST_RTP_PROFILE_UNKNOWN, - RTPProfile::Avp => gst_rtp_sys::GST_RTP_PROFILE_AVP, - RTPProfile::Savp => gst_rtp_sys::GST_RTP_PROFILE_SAVP, - RTPProfile::Avpf => gst_rtp_sys::GST_RTP_PROFILE_AVPF, - RTPProfile::Savpf => gst_rtp_sys::GST_RTP_PROFILE_SAVPF, + RTPProfile::Unknown => ffi::GST_RTP_PROFILE_UNKNOWN, + RTPProfile::Avp => ffi::GST_RTP_PROFILE_AVP, + RTPProfile::Savp => ffi::GST_RTP_PROFILE_SAVP, + RTPProfile::Avpf => ffi::GST_RTP_PROFILE_AVPF, + RTPProfile::Savpf => ffi::GST_RTP_PROFILE_SAVPF, RTPProfile::__Unknown(value) => value, } } } #[doc(hidden)] -impl FromGlib for RTPProfile { - fn from_glib(value: gst_rtp_sys::GstRTPProfile) -> Self { +impl FromGlib for RTPProfile { + fn from_glib(value: ffi::GstRTPProfile) -> Self { skip_assert_initialized!(); match value { 0 => RTPProfile::Unknown, @@ -517,7 +515,7 @@ impl FromGlib for RTPProfile { impl StaticType for RTPProfile { fn static_type() -> Type { - unsafe { from_glib(gst_rtp_sys::gst_rtp_profile_get_type()) } + unsafe { from_glib(ffi::gst_rtp_profile_get_type()) } } } @@ -529,12 +527,12 @@ impl<'a> FromValueOptional<'a> for RTPProfile { impl<'a> FromValue<'a> for RTPProfile { 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 RTPProfile { 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()) } } diff --git a/gstreamer-rtp/src/auto/flags.rs b/gstreamer-rtp/src/auto/flags.rs index 813e51fd1..8e23a727f 100644 --- a/gstreamer-rtp/src/auto/flags.rs +++ b/gstreamer-rtp/src/auto/flags.rs @@ -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_rtp_sys; #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] @@ -25,9 +24,9 @@ bitflags! { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl ToGlib for RTPBufferFlags { - type GlibType = gst_rtp_sys::GstRTPBufferFlags; + type GlibType = ffi::GstRTPBufferFlags; - fn to_glib(&self) -> gst_rtp_sys::GstRTPBufferFlags { + fn to_glib(&self) -> ffi::GstRTPBufferFlags { self.bits() } } @@ -35,8 +34,8 @@ impl ToGlib for RTPBufferFlags { #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] -impl FromGlib for RTPBufferFlags { - fn from_glib(value: gst_rtp_sys::GstRTPBufferFlags) -> RTPBufferFlags { +impl FromGlib for RTPBufferFlags { + fn from_glib(value: ffi::GstRTPBufferFlags) -> RTPBufferFlags { skip_assert_initialized!(); RTPBufferFlags::from_bits_truncate(value) } @@ -46,7 +45,7 @@ impl FromGlib for RTPBufferFlags { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StaticType for RTPBufferFlags { fn static_type() -> Type { - unsafe { from_glib(gst_rtp_sys::gst_rtp_buffer_flags_get_type()) } + unsafe { from_glib(ffi::gst_rtp_buffer_flags_get_type()) } } } @@ -62,7 +61,7 @@ impl<'a> FromValueOptional<'a> for RTPBufferFlags { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> FromValue<'a> for RTPBufferFlags { 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)) } } @@ -70,7 +69,7 @@ impl<'a> FromValue<'a> for RTPBufferFlags { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl SetValue for RTPBufferFlags { 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()) } } @@ -82,16 +81,16 @@ bitflags! { #[doc(hidden)] impl ToGlib for RTPBufferMapFlags { - type GlibType = gst_rtp_sys::GstRTPBufferMapFlags; + type GlibType = ffi::GstRTPBufferMapFlags; - fn to_glib(&self) -> gst_rtp_sys::GstRTPBufferMapFlags { + fn to_glib(&self) -> ffi::GstRTPBufferMapFlags { self.bits() } } #[doc(hidden)] -impl FromGlib for RTPBufferMapFlags { - fn from_glib(value: gst_rtp_sys::GstRTPBufferMapFlags) -> RTPBufferMapFlags { +impl FromGlib for RTPBufferMapFlags { + fn from_glib(value: ffi::GstRTPBufferMapFlags) -> RTPBufferMapFlags { skip_assert_initialized!(); RTPBufferMapFlags::from_bits_truncate(value) } @@ -99,7 +98,7 @@ impl FromGlib for RTPBufferMapFlags { impl StaticType for RTPBufferMapFlags { fn static_type() -> Type { - unsafe { from_glib(gst_rtp_sys::gst_rtp_buffer_map_flags_get_type()) } + unsafe { from_glib(ffi::gst_rtp_buffer_map_flags_get_type()) } } } @@ -111,12 +110,12 @@ impl<'a> FromValueOptional<'a> for RTPBufferMapFlags { impl<'a> FromValue<'a> for RTPBufferMapFlags { 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 RTPBufferMapFlags { 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()) } } diff --git a/gstreamer-rtp/src/auto/functions.rs b/gstreamer-rtp/src/auto/functions.rs index 20eff670f..fb4a7ba21 100644 --- a/gstreamer-rtp/src/auto/functions.rs +++ b/gstreamer-rtp/src/auto/functions.rs @@ -2,51 +2,45 @@ // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT +use crate::RTCPSDESType; use glib::translate::*; -use glib::GString; -use gst_rtp_sys; -use RTCPSDESType; //#[cfg(any(feature = "v1_16", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] //pub fn buffer_add_rtp_source_meta(buffer: &gst::Buffer, ssrc: u32, csrc: u32, csrc_count: u32) -> /*Ignored*/Option { -// unsafe { TODO: call gst_rtp_sys:gst_buffer_add_rtp_source_meta() } +// unsafe { TODO: call ffi:gst_buffer_add_rtp_source_meta() } //} //#[cfg(any(feature = "v1_16", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] //pub fn buffer_get_rtp_source_meta(buffer: &gst::Buffer) -> /*Ignored*/Option { -// unsafe { TODO: call gst_rtp_sys:gst_buffer_get_rtp_source_meta() } +// unsafe { TODO: call ffi:gst_buffer_get_rtp_source_meta() } //} pub fn rtcp_ntp_to_unix(ntptime: u64) -> u64 { assert_initialized_main_thread!(); - unsafe { gst_rtp_sys::gst_rtcp_ntp_to_unix(ntptime) } + unsafe { ffi::gst_rtcp_ntp_to_unix(ntptime) } } pub fn rtcp_sdes_name_to_type(name: &str) -> RTCPSDESType { assert_initialized_main_thread!(); - unsafe { - from_glib(gst_rtp_sys::gst_rtcp_sdes_name_to_type( - name.to_glib_none().0, - )) - } + unsafe { from_glib(ffi::gst_rtcp_sdes_name_to_type(name.to_glib_none().0)) } } -pub fn rtcp_sdes_type_to_name(type_: RTCPSDESType) -> Option { +pub fn rtcp_sdes_type_to_name(type_: RTCPSDESType) -> Option { assert_initialized_main_thread!(); - unsafe { from_glib_none(gst_rtp_sys::gst_rtcp_sdes_type_to_name(type_.to_glib())) } + unsafe { from_glib_none(ffi::gst_rtcp_sdes_type_to_name(type_.to_glib())) } } pub fn rtcp_unix_to_ntp(unixtime: u64) -> u64 { assert_initialized_main_thread!(); - unsafe { gst_rtp_sys::gst_rtcp_unix_to_ntp(unixtime) } + unsafe { ffi::gst_rtcp_unix_to_ntp(unixtime) } } //pub fn rtp_hdrext_set_ntp_56(data: /*Unimplemented*/Option, size: u32, ntptime: u64) -> bool { -// unsafe { TODO: call gst_rtp_sys:gst_rtp_hdrext_set_ntp_56() } +// unsafe { TODO: call ffi:gst_rtp_hdrext_set_ntp_56() } //} //pub fn rtp_hdrext_set_ntp_64(data: /*Unimplemented*/Option, size: u32, ntptime: u64) -> bool { -// unsafe { TODO: call gst_rtp_sys:gst_rtp_hdrext_set_ntp_64() } +// unsafe { TODO: call ffi:gst_rtp_hdrext_set_ntp_64() } //} diff --git a/gstreamer-rtp/src/auto/versions.txt b/gstreamer-rtp/src/auto/versions.txt index bdfc6f381..b492a0529 100644 --- a/gstreamer-rtp/src/auto/versions.txt +++ b/gstreamer-rtp/src/auto/versions.txt @@ -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 @ 85876a52)