gstreamer-rtp: Regenerate

This commit is contained in:
Sebastian Dröge 2020-11-22 12:32:36 +02:00
parent ddad791418
commit 1ea6fac9f4
5 changed files with 170 additions and 186 deletions

View file

@ -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()
});

View file

@ -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<gst_rtp_sys::GstRTCPFBType> for RTCPFBType {
fn from_glib(value: gst_rtp_sys::GstRTCPFBType) -> Self {
impl FromGlib<ffi::GstRTCPFBType> for RTCPFBType {
fn from_glib(value: ffi::GstRTCPFBType) -> Self {
skip_assert_initialized!();
match value {
0 => RTCPFBType::FbTypeInvalid,
@ -69,7 +67,7 @@ impl FromGlib<gst_rtp_sys::GstRTCPFBType> 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<gst_rtp_sys::GstRTCPSDESType> for RTCPSDESType {
fn from_glib(value: gst_rtp_sys::GstRTCPSDESType) -> Self {
impl FromGlib<ffi::GstRTCPSDESType> for RTCPSDESType {
fn from_glib(value: ffi::GstRTCPSDESType) -> Self {
skip_assert_initialized!();
match value {
-1 => RTCPSDESType::Invalid,
@ -151,7 +149,7 @@ impl FromGlib<gst_rtp_sys::GstRTCPSDESType> 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<gst_rtp_sys::GstRTCPType> for RTCPType {
fn from_glib(value: gst_rtp_sys::GstRTCPType) -> Self {
impl FromGlib<ffi::GstRTCPType> for RTCPType {
fn from_glib(value: ffi::GstRTCPType) -> Self {
skip_assert_initialized!();
match value {
0 => RTCPType::Invalid,
@ -230,7 +228,7 @@ impl FromGlib<gst_rtp_sys::GstRTCPType> 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<gst_rtp_sys::GstRTCPXRType> for RTCPXRType {
fn from_glib(value: gst_rtp_sys::GstRTCPXRType) -> Self {
impl FromGlib<ffi::GstRTCPXRType> for RTCPXRType {
fn from_glib(value: ffi::GstRTCPXRType) -> Self {
skip_assert_initialized!();
match value {
-1 => RTCPXRType::Invalid,
@ -314,7 +312,7 @@ impl FromGlib<gst_rtp_sys::GstRTCPXRType> 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<gst_rtp_sys::GstRTPPayload> for RTPPayload {
fn from_glib(value: gst_rtp_sys::GstRTPPayload) -> Self {
impl FromGlib<ffi::GstRTPPayload> for RTPPayload {
fn from_glib(value: ffi::GstRTPPayload) -> Self {
skip_assert_initialized!();
match value {
0 => RTPPayload::Pcmu,
@ -450,7 +448,7 @@ impl FromGlib<gst_rtp_sys::GstRTPPayload> 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<gst_rtp_sys::GstRTPProfile> for RTPProfile {
fn from_glib(value: gst_rtp_sys::GstRTPProfile) -> Self {
impl FromGlib<ffi::GstRTPProfile> for RTPProfile {
fn from_glib(value: ffi::GstRTPProfile) -> Self {
skip_assert_initialized!();
match value {
0 => RTPProfile::Unknown,
@ -517,7 +515,7 @@ impl FromGlib<gst_rtp_sys::GstRTPProfile> 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())
}
}

View file

@ -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<gst_rtp_sys::GstRTPBufferFlags> for RTPBufferFlags {
fn from_glib(value: gst_rtp_sys::GstRTPBufferFlags) -> RTPBufferFlags {
impl FromGlib<ffi::GstRTPBufferFlags> for RTPBufferFlags {
fn from_glib(value: ffi::GstRTPBufferFlags) -> RTPBufferFlags {
skip_assert_initialized!();
RTPBufferFlags::from_bits_truncate(value)
}
@ -46,7 +45,7 @@ impl FromGlib<gst_rtp_sys::GstRTPBufferFlags> 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<gst_rtp_sys::GstRTPBufferMapFlags> for RTPBufferMapFlags {
fn from_glib(value: gst_rtp_sys::GstRTPBufferMapFlags) -> RTPBufferMapFlags {
impl FromGlib<ffi::GstRTPBufferMapFlags> for RTPBufferMapFlags {
fn from_glib(value: ffi::GstRTPBufferMapFlags) -> RTPBufferMapFlags {
skip_assert_initialized!();
RTPBufferMapFlags::from_bits_truncate(value)
}
@ -99,7 +98,7 @@ impl FromGlib<gst_rtp_sys::GstRTPBufferMapFlags> 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())
}
}

View file

@ -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<RTPSourceMeta> {
// 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<RTPSourceMeta> {
// 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<GString> {
pub fn rtcp_sdes_type_to_name(type_: RTCPSDESType) -> Option<glib::GString> {
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<Fundamental: Pointer>, 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<Fundamental: Pointer>, 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() }
//}

View file

@ -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)