mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-01-23 15:38:19 +00:00
7fcd560d18
- Doc aliases for types; - ffi constants for bitflags too; - Completely overhauled docs generation under the hood (only emitting valid links, more types receive documentation now).
143 lines
4.2 KiB
Rust
143 lines
4.2 KiB
Rust
// 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
|
|
|
|
use bitflags::bitflags;
|
|
use glib::translate::*;
|
|
use glib::value::FromValue;
|
|
use glib::value::ToValue;
|
|
use glib::StaticType;
|
|
use glib::Type;
|
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
|
bitflags! {
|
|
#[doc(alias = "GstRTPBufferFlags")]
|
|
pub struct RTPBufferFlags: u32 {
|
|
#[doc(alias = "GST_RTP_BUFFER_FLAG_RETRANSMISSION")]
|
|
const RETRANSMISSION = ffi::GST_RTP_BUFFER_FLAG_RETRANSMISSION as u32;
|
|
#[doc(alias = "GST_RTP_BUFFER_FLAG_REDUNDANT")]
|
|
const REDUNDANT = ffi::GST_RTP_BUFFER_FLAG_REDUNDANT as u32;
|
|
}
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
|
#[doc(hidden)]
|
|
impl IntoGlib for RTPBufferFlags {
|
|
type GlibType = ffi::GstRTPBufferFlags;
|
|
|
|
fn into_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<ffi::GstRTPBufferFlags> for RTPBufferFlags {
|
|
unsafe fn from_glib(value: ffi::GstRTPBufferFlags) -> Self {
|
|
skip_assert_initialized!();
|
|
Self::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 glib::value::ValueType for RTPBufferFlags {
|
|
type Type = Self;
|
|
}
|
|
|
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
|
unsafe impl<'a> FromValue<'a> for RTPBufferFlags {
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
skip_assert_initialized!();
|
|
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 ToValue for RTPBufferFlags {
|
|
fn to_value(&self) -> glib::Value {
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
|
unsafe {
|
|
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
|
|
}
|
|
value
|
|
}
|
|
|
|
fn value_type(&self) -> glib::Type {
|
|
Self::static_type()
|
|
}
|
|
}
|
|
|
|
bitflags! {
|
|
#[doc(alias = "GstRTPBufferMapFlags")]
|
|
pub struct RTPBufferMapFlags: u32 {
|
|
#[doc(alias = "GST_RTP_BUFFER_MAP_FLAG_SKIP_PADDING")]
|
|
const SKIP_PADDING = ffi::GST_RTP_BUFFER_MAP_FLAG_SKIP_PADDING as u32;
|
|
}
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl IntoGlib for RTPBufferMapFlags {
|
|
type GlibType = ffi::GstRTPBufferMapFlags;
|
|
|
|
fn into_glib(self) -> ffi::GstRTPBufferMapFlags {
|
|
self.bits()
|
|
}
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl FromGlib<ffi::GstRTPBufferMapFlags> for RTPBufferMapFlags {
|
|
unsafe fn from_glib(value: ffi::GstRTPBufferMapFlags) -> Self {
|
|
skip_assert_initialized!();
|
|
Self::from_bits_truncate(value)
|
|
}
|
|
}
|
|
|
|
impl StaticType for RTPBufferMapFlags {
|
|
fn static_type() -> Type {
|
|
unsafe { from_glib(ffi::gst_rtp_buffer_map_flags_get_type()) }
|
|
}
|
|
}
|
|
|
|
impl glib::value::ValueType for RTPBufferMapFlags {
|
|
type Type = Self;
|
|
}
|
|
|
|
unsafe impl<'a> FromValue<'a> for RTPBufferMapFlags {
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
skip_assert_initialized!();
|
|
from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
|
}
|
|
}
|
|
|
|
impl ToValue for RTPBufferMapFlags {
|
|
fn to_value(&self) -> glib::Value {
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
|
unsafe {
|
|
glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
|
|
}
|
|
value
|
|
}
|
|
|
|
fn value_type(&self) -> glib::Type {
|
|
Self::static_type()
|
|
}
|
|
}
|