gstreamer-rs/gstreamer-rtp/src/auto/flags.rs

122 lines
3.6 KiB
Rust
Raw Normal View History

// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT
2020-11-22 10:32:36 +00:00
use bitflags::bitflags;
use glib::translate::*;
use glib::value::FromValue;
use glib::value::FromValueOptional;
use glib::value::SetValue;
use glib::StaticType;
use glib::Type;
2020-11-27 13:37:24 +00:00
#[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;
}
}
2020-11-27 13:37:24 +00:00
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(hidden)]
impl ToGlib for RTPBufferFlags {
2020-11-22 10:32:36 +00:00
type GlibType = ffi::GstRTPBufferFlags;
2020-11-22 10:32:36 +00:00
fn to_glib(&self) -> ffi::GstRTPBufferFlags {
self.bits()
}
}
2020-11-27 13:37:24 +00:00
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
#[doc(hidden)]
2020-11-22 10:32:36 +00:00
impl FromGlib<ffi::GstRTPBufferFlags> for RTPBufferFlags {
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstRTPBufferFlags) -> RTPBufferFlags {
skip_assert_initialized!();
RTPBufferFlags::from_bits_truncate(value)
}
}
2020-11-27 13:37:24 +00:00
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl StaticType for RTPBufferFlags {
fn static_type() -> Type {
2020-11-22 10:32:36 +00:00
unsafe { from_glib(ffi::gst_rtp_buffer_flags_get_type()) }
}
}
2020-11-27 13:37:24 +00:00
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> FromValueOptional<'a> for RTPBufferFlags {
2020-11-27 13:37:24 +00:00
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
2020-11-27 13:37:24 +00:00
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl<'a> FromValue<'a> for RTPBufferFlags {
2020-11-27 13:37:24 +00:00
unsafe fn from_value(value: &glib::Value) -> Self {
2020-11-22 10:32:36 +00:00
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
2020-11-27 13:37:24 +00:00
#[cfg(any(feature = "v1_10", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
impl SetValue for RTPBufferFlags {
2020-11-27 13:37:24 +00:00
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
2020-11-22 10:32:36 +00:00
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 {
2020-11-22 10:32:36 +00:00
type GlibType = ffi::GstRTPBufferMapFlags;
2020-11-22 10:32:36 +00:00
fn to_glib(&self) -> ffi::GstRTPBufferMapFlags {
self.bits()
}
}
#[doc(hidden)]
2020-11-22 10:32:36 +00:00
impl FromGlib<ffi::GstRTPBufferMapFlags> for RTPBufferMapFlags {
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstRTPBufferMapFlags) -> RTPBufferMapFlags {
skip_assert_initialized!();
RTPBufferMapFlags::from_bits_truncate(value)
}
}
impl StaticType for RTPBufferMapFlags {
fn static_type() -> Type {
2020-11-22 10:32:36 +00:00
unsafe { from_glib(ffi::gst_rtp_buffer_map_flags_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for RTPBufferMapFlags {
2020-11-27 13:37:24 +00:00
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for RTPBufferMapFlags {
2020-11-27 13:37:24 +00:00
unsafe fn from_value(value: &glib::Value) -> Self {
2020-11-22 10:32:36 +00:00
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
}
}
impl SetValue for RTPBufferMapFlags {
2020-11-27 13:37:24 +00:00
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
2020-11-22 10:32:36 +00:00
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
}
}