// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use bitflags::bitflags; use glib::translate::*; use glib::value::FromValue; use glib::value::FromValueOptional; use glib::value::SetValue; use glib::StaticType; use glib::Type; #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] bitflags! { pub struct RTPBufferFlags: u32 { const RETRANSMISSION = 1048576; const REDUNDANT = 2097152; } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl ToGlib for RTPBufferFlags { type GlibType = ffi::GstRTPBufferFlags; fn to_glib(&self) -> ffi::GstRTPBufferFlags { self.bits() } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] #[doc(hidden)] impl FromGlib for RTPBufferFlags { unsafe fn from_glib(value: ffi::GstRTPBufferFlags) -> RTPBufferFlags { skip_assert_initialized!(); RTPBufferFlags::from_bits_truncate(value) } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl StaticType for RTPBufferFlags { fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtp_buffer_flags_get_type()) } } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> FromValueOptional<'a> for RTPBufferFlags { unsafe fn from_value_optional(value: &glib::Value) -> Option { Some(FromValue::from_value(value)) } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl<'a> FromValue<'a> for RTPBufferFlags { unsafe fn from_value(value: &glib::Value) -> Self { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } #[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))] impl SetValue for RTPBufferFlags { unsafe fn set_value(value: &mut glib::Value, this: &Self) { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } } bitflags! { pub struct RTPBufferMapFlags: u32 { const SKIP_PADDING = 65536; } } #[doc(hidden)] impl ToGlib for RTPBufferMapFlags { type GlibType = ffi::GstRTPBufferMapFlags; fn to_glib(&self) -> ffi::GstRTPBufferMapFlags { self.bits() } } #[doc(hidden)] impl FromGlib for RTPBufferMapFlags { unsafe fn from_glib(value: ffi::GstRTPBufferMapFlags) -> RTPBufferMapFlags { skip_assert_initialized!(); RTPBufferMapFlags::from_bits_truncate(value) } } impl StaticType for RTPBufferMapFlags { fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtp_buffer_map_flags_get_type()) } } } impl<'a> FromValueOptional<'a> for RTPBufferMapFlags { unsafe fn from_value_optional(value: &glib::Value) -> Option { Some(FromValue::from_value(value)) } } impl<'a> FromValue<'a> for RTPBufferMapFlags { unsafe fn from_value(value: &glib::Value) -> Self { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) } } impl SetValue for RTPBufferMapFlags { unsafe fn set_value(value: &mut glib::Value, this: &Self) { glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib()) } }