mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-01-26 08:58:11 +00:00
338 lines
10 KiB
Rust
338 lines
10 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 glib::translate::*;
|
|
use glib::value::FromValue;
|
|
use glib::value::ToValue;
|
|
use glib::StaticType;
|
|
use glib::Type;
|
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
#[non_exhaustive]
|
|
#[doc(alias = "GstRTSPAddressPoolResult")]
|
|
pub enum RTSPAddressPoolResult {
|
|
#[doc(alias = "GST_RTSP_ADDRESS_POOL_OK")]
|
|
Ok,
|
|
#[doc(alias = "GST_RTSP_ADDRESS_POOL_EINVAL")]
|
|
Einval,
|
|
#[doc(alias = "GST_RTSP_ADDRESS_POOL_ERESERVED")]
|
|
Ereserved,
|
|
#[doc(alias = "GST_RTSP_ADDRESS_POOL_ERANGE")]
|
|
Erange,
|
|
#[doc(alias = "GST_RTSP_ADDRESS_POOL_ELAST")]
|
|
Elast,
|
|
#[doc(hidden)]
|
|
__Unknown(i32),
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl IntoGlib for RTSPAddressPoolResult {
|
|
type GlibType = ffi::GstRTSPAddressPoolResult;
|
|
|
|
fn into_glib(self) -> ffi::GstRTSPAddressPoolResult {
|
|
match self {
|
|
Self::Ok => ffi::GST_RTSP_ADDRESS_POOL_OK,
|
|
Self::Einval => ffi::GST_RTSP_ADDRESS_POOL_EINVAL,
|
|
Self::Ereserved => ffi::GST_RTSP_ADDRESS_POOL_ERESERVED,
|
|
Self::Erange => ffi::GST_RTSP_ADDRESS_POOL_ERANGE,
|
|
Self::Elast => ffi::GST_RTSP_ADDRESS_POOL_ELAST,
|
|
Self::__Unknown(value) => value,
|
|
}
|
|
}
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl FromGlib<ffi::GstRTSPAddressPoolResult> for RTSPAddressPoolResult {
|
|
unsafe fn from_glib(value: ffi::GstRTSPAddressPoolResult) -> Self {
|
|
skip_assert_initialized!();
|
|
match value {
|
|
ffi::GST_RTSP_ADDRESS_POOL_OK => Self::Ok,
|
|
ffi::GST_RTSP_ADDRESS_POOL_EINVAL => Self::Einval,
|
|
ffi::GST_RTSP_ADDRESS_POOL_ERESERVED => Self::Ereserved,
|
|
ffi::GST_RTSP_ADDRESS_POOL_ERANGE => Self::Erange,
|
|
ffi::GST_RTSP_ADDRESS_POOL_ELAST => Self::Elast,
|
|
value => Self::__Unknown(value),
|
|
}
|
|
}
|
|
}
|
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
#[non_exhaustive]
|
|
#[doc(alias = "GstRTSPFilterResult")]
|
|
pub enum RTSPFilterResult {
|
|
#[doc(alias = "GST_RTSP_FILTER_REMOVE")]
|
|
Remove,
|
|
#[doc(alias = "GST_RTSP_FILTER_KEEP")]
|
|
Keep,
|
|
#[doc(alias = "GST_RTSP_FILTER_REF")]
|
|
Ref,
|
|
#[doc(hidden)]
|
|
__Unknown(i32),
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl IntoGlib for RTSPFilterResult {
|
|
type GlibType = ffi::GstRTSPFilterResult;
|
|
|
|
fn into_glib(self) -> ffi::GstRTSPFilterResult {
|
|
match self {
|
|
Self::Remove => ffi::GST_RTSP_FILTER_REMOVE,
|
|
Self::Keep => ffi::GST_RTSP_FILTER_KEEP,
|
|
Self::Ref => ffi::GST_RTSP_FILTER_REF,
|
|
Self::__Unknown(value) => value,
|
|
}
|
|
}
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl FromGlib<ffi::GstRTSPFilterResult> for RTSPFilterResult {
|
|
unsafe fn from_glib(value: ffi::GstRTSPFilterResult) -> Self {
|
|
skip_assert_initialized!();
|
|
match value {
|
|
ffi::GST_RTSP_FILTER_REMOVE => Self::Remove,
|
|
ffi::GST_RTSP_FILTER_KEEP => Self::Keep,
|
|
ffi::GST_RTSP_FILTER_REF => Self::Ref,
|
|
value => Self::__Unknown(value),
|
|
}
|
|
}
|
|
}
|
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
#[non_exhaustive]
|
|
#[doc(alias = "GstRTSPMediaStatus")]
|
|
pub enum RTSPMediaStatus {
|
|
#[doc(alias = "GST_RTSP_MEDIA_STATUS_UNPREPARED")]
|
|
Unprepared,
|
|
#[doc(alias = "GST_RTSP_MEDIA_STATUS_UNPREPARING")]
|
|
Unpreparing,
|
|
#[doc(alias = "GST_RTSP_MEDIA_STATUS_PREPARING")]
|
|
Preparing,
|
|
#[doc(alias = "GST_RTSP_MEDIA_STATUS_PREPARED")]
|
|
Prepared,
|
|
#[doc(alias = "GST_RTSP_MEDIA_STATUS_SUSPENDED")]
|
|
Suspended,
|
|
#[doc(alias = "GST_RTSP_MEDIA_STATUS_ERROR")]
|
|
Error,
|
|
#[doc(hidden)]
|
|
__Unknown(i32),
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl IntoGlib for RTSPMediaStatus {
|
|
type GlibType = ffi::GstRTSPMediaStatus;
|
|
|
|
fn into_glib(self) -> ffi::GstRTSPMediaStatus {
|
|
match self {
|
|
Self::Unprepared => ffi::GST_RTSP_MEDIA_STATUS_UNPREPARED,
|
|
Self::Unpreparing => ffi::GST_RTSP_MEDIA_STATUS_UNPREPARING,
|
|
Self::Preparing => ffi::GST_RTSP_MEDIA_STATUS_PREPARING,
|
|
Self::Prepared => ffi::GST_RTSP_MEDIA_STATUS_PREPARED,
|
|
Self::Suspended => ffi::GST_RTSP_MEDIA_STATUS_SUSPENDED,
|
|
Self::Error => ffi::GST_RTSP_MEDIA_STATUS_ERROR,
|
|
Self::__Unknown(value) => value,
|
|
}
|
|
}
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl FromGlib<ffi::GstRTSPMediaStatus> for RTSPMediaStatus {
|
|
unsafe fn from_glib(value: ffi::GstRTSPMediaStatus) -> Self {
|
|
skip_assert_initialized!();
|
|
match value {
|
|
ffi::GST_RTSP_MEDIA_STATUS_UNPREPARED => Self::Unprepared,
|
|
ffi::GST_RTSP_MEDIA_STATUS_UNPREPARING => Self::Unpreparing,
|
|
ffi::GST_RTSP_MEDIA_STATUS_PREPARING => Self::Preparing,
|
|
ffi::GST_RTSP_MEDIA_STATUS_PREPARED => Self::Prepared,
|
|
ffi::GST_RTSP_MEDIA_STATUS_SUSPENDED => Self::Suspended,
|
|
ffi::GST_RTSP_MEDIA_STATUS_ERROR => Self::Error,
|
|
value => Self::__Unknown(value),
|
|
}
|
|
}
|
|
}
|
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
#[non_exhaustive]
|
|
#[doc(alias = "GstRTSPPublishClockMode")]
|
|
pub enum RTSPPublishClockMode {
|
|
#[doc(alias = "GST_RTSP_PUBLISH_CLOCK_MODE_NONE")]
|
|
None,
|
|
#[doc(alias = "GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK")]
|
|
Clock,
|
|
#[doc(alias = "GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET")]
|
|
ClockAndOffset,
|
|
#[doc(hidden)]
|
|
__Unknown(i32),
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl IntoGlib for RTSPPublishClockMode {
|
|
type GlibType = ffi::GstRTSPPublishClockMode;
|
|
|
|
fn into_glib(self) -> ffi::GstRTSPPublishClockMode {
|
|
match self {
|
|
Self::None => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_NONE,
|
|
Self::Clock => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK,
|
|
Self::ClockAndOffset => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET,
|
|
Self::__Unknown(value) => value,
|
|
}
|
|
}
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl FromGlib<ffi::GstRTSPPublishClockMode> for RTSPPublishClockMode {
|
|
unsafe fn from_glib(value: ffi::GstRTSPPublishClockMode) -> Self {
|
|
skip_assert_initialized!();
|
|
match value {
|
|
ffi::GST_RTSP_PUBLISH_CLOCK_MODE_NONE => Self::None,
|
|
ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK => Self::Clock,
|
|
ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET => Self::ClockAndOffset,
|
|
value => Self::__Unknown(value),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl StaticType for RTSPPublishClockMode {
|
|
fn static_type() -> Type {
|
|
unsafe { from_glib(ffi::gst_rtsp_publish_clock_mode_get_type()) }
|
|
}
|
|
}
|
|
|
|
impl glib::value::ValueType for RTSPPublishClockMode {
|
|
type Type = Self;
|
|
}
|
|
|
|
unsafe impl<'a> FromValue<'a> for RTSPPublishClockMode {
|
|
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_enum(value.to_glib_none().0))
|
|
}
|
|
}
|
|
|
|
impl ToValue for RTSPPublishClockMode {
|
|
fn to_value(&self) -> glib::Value {
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
|
unsafe {
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
|
}
|
|
value
|
|
}
|
|
|
|
fn value_type(&self) -> glib::Type {
|
|
Self::static_type()
|
|
}
|
|
}
|
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
#[non_exhaustive]
|
|
#[doc(alias = "GstRTSPSuspendMode")]
|
|
pub enum RTSPSuspendMode {
|
|
#[doc(alias = "GST_RTSP_SUSPEND_MODE_NONE")]
|
|
None,
|
|
#[doc(alias = "GST_RTSP_SUSPEND_MODE_PAUSE")]
|
|
Pause,
|
|
#[doc(alias = "GST_RTSP_SUSPEND_MODE_RESET")]
|
|
Reset,
|
|
#[doc(hidden)]
|
|
__Unknown(i32),
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl IntoGlib for RTSPSuspendMode {
|
|
type GlibType = ffi::GstRTSPSuspendMode;
|
|
|
|
fn into_glib(self) -> ffi::GstRTSPSuspendMode {
|
|
match self {
|
|
Self::None => ffi::GST_RTSP_SUSPEND_MODE_NONE,
|
|
Self::Pause => ffi::GST_RTSP_SUSPEND_MODE_PAUSE,
|
|
Self::Reset => ffi::GST_RTSP_SUSPEND_MODE_RESET,
|
|
Self::__Unknown(value) => value,
|
|
}
|
|
}
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl FromGlib<ffi::GstRTSPSuspendMode> for RTSPSuspendMode {
|
|
unsafe fn from_glib(value: ffi::GstRTSPSuspendMode) -> Self {
|
|
skip_assert_initialized!();
|
|
match value {
|
|
ffi::GST_RTSP_SUSPEND_MODE_NONE => Self::None,
|
|
ffi::GST_RTSP_SUSPEND_MODE_PAUSE => Self::Pause,
|
|
ffi::GST_RTSP_SUSPEND_MODE_RESET => Self::Reset,
|
|
value => Self::__Unknown(value),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl StaticType for RTSPSuspendMode {
|
|
fn static_type() -> Type {
|
|
unsafe { from_glib(ffi::gst_rtsp_suspend_mode_get_type()) }
|
|
}
|
|
}
|
|
|
|
impl glib::value::ValueType for RTSPSuspendMode {
|
|
type Type = Self;
|
|
}
|
|
|
|
unsafe impl<'a> FromValue<'a> for RTSPSuspendMode {
|
|
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_enum(value.to_glib_none().0))
|
|
}
|
|
}
|
|
|
|
impl ToValue for RTSPSuspendMode {
|
|
fn to_value(&self) -> glib::Value {
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
|
unsafe {
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
|
}
|
|
value
|
|
}
|
|
|
|
fn value_type(&self) -> glib::Type {
|
|
Self::static_type()
|
|
}
|
|
}
|
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
#[non_exhaustive]
|
|
#[doc(alias = "GstRTSPThreadType")]
|
|
pub enum RTSPThreadType {
|
|
#[doc(alias = "GST_RTSP_THREAD_TYPE_CLIENT")]
|
|
Client,
|
|
#[doc(alias = "GST_RTSP_THREAD_TYPE_MEDIA")]
|
|
Media,
|
|
#[doc(hidden)]
|
|
__Unknown(i32),
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl IntoGlib for RTSPThreadType {
|
|
type GlibType = ffi::GstRTSPThreadType;
|
|
|
|
fn into_glib(self) -> ffi::GstRTSPThreadType {
|
|
match self {
|
|
Self::Client => ffi::GST_RTSP_THREAD_TYPE_CLIENT,
|
|
Self::Media => ffi::GST_RTSP_THREAD_TYPE_MEDIA,
|
|
Self::__Unknown(value) => value,
|
|
}
|
|
}
|
|
}
|
|
|
|
#[doc(hidden)]
|
|
impl FromGlib<ffi::GstRTSPThreadType> for RTSPThreadType {
|
|
unsafe fn from_glib(value: ffi::GstRTSPThreadType) -> Self {
|
|
skip_assert_initialized!();
|
|
match value {
|
|
ffi::GST_RTSP_THREAD_TYPE_CLIENT => Self::Client,
|
|
ffi::GST_RTSP_THREAD_TYPE_MEDIA => Self::Media,
|
|
value => Self::__Unknown(value),
|
|
}
|
|
}
|
|
}
|