// 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 { RTSPAddressPoolResult::Ok => ffi::GST_RTSP_ADDRESS_POOL_OK, RTSPAddressPoolResult::Einval => ffi::GST_RTSP_ADDRESS_POOL_EINVAL, RTSPAddressPoolResult::Ereserved => ffi::GST_RTSP_ADDRESS_POOL_ERESERVED, RTSPAddressPoolResult::Erange => ffi::GST_RTSP_ADDRESS_POOL_ERANGE, RTSPAddressPoolResult::Elast => ffi::GST_RTSP_ADDRESS_POOL_ELAST, RTSPAddressPoolResult::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for RTSPAddressPoolResult { unsafe fn from_glib(value: ffi::GstRTSPAddressPoolResult) -> Self { skip_assert_initialized!(); match value { 0 => RTSPAddressPoolResult::Ok, -1 => RTSPAddressPoolResult::Einval, -2 => RTSPAddressPoolResult::Ereserved, -3 => RTSPAddressPoolResult::Erange, -4 => RTSPAddressPoolResult::Elast, value => RTSPAddressPoolResult::__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 { RTSPFilterResult::Remove => ffi::GST_RTSP_FILTER_REMOVE, RTSPFilterResult::Keep => ffi::GST_RTSP_FILTER_KEEP, RTSPFilterResult::Ref => ffi::GST_RTSP_FILTER_REF, RTSPFilterResult::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for RTSPFilterResult { unsafe fn from_glib(value: ffi::GstRTSPFilterResult) -> Self { skip_assert_initialized!(); match value { 0 => RTSPFilterResult::Remove, 1 => RTSPFilterResult::Keep, 2 => RTSPFilterResult::Ref, value => RTSPFilterResult::__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 { RTSPMediaStatus::Unprepared => ffi::GST_RTSP_MEDIA_STATUS_UNPREPARED, RTSPMediaStatus::Unpreparing => ffi::GST_RTSP_MEDIA_STATUS_UNPREPARING, RTSPMediaStatus::Preparing => ffi::GST_RTSP_MEDIA_STATUS_PREPARING, RTSPMediaStatus::Prepared => ffi::GST_RTSP_MEDIA_STATUS_PREPARED, RTSPMediaStatus::Suspended => ffi::GST_RTSP_MEDIA_STATUS_SUSPENDED, RTSPMediaStatus::Error => ffi::GST_RTSP_MEDIA_STATUS_ERROR, RTSPMediaStatus::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for RTSPMediaStatus { unsafe fn from_glib(value: ffi::GstRTSPMediaStatus) -> Self { skip_assert_initialized!(); match value { 0 => RTSPMediaStatus::Unprepared, 1 => RTSPMediaStatus::Unpreparing, 2 => RTSPMediaStatus::Preparing, 3 => RTSPMediaStatus::Prepared, 4 => RTSPMediaStatus::Suspended, 5 => RTSPMediaStatus::Error, value => RTSPMediaStatus::__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 { RTSPPublishClockMode::None => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_NONE, RTSPPublishClockMode::Clock => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK, RTSPPublishClockMode::ClockAndOffset => { ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET } RTSPPublishClockMode::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for RTSPPublishClockMode { unsafe fn from_glib(value: ffi::GstRTSPPublishClockMode) -> Self { skip_assert_initialized!(); match value { 0 => RTSPPublishClockMode::None, 1 => RTSPPublishClockMode::Clock, 2 => RTSPPublishClockMode::ClockAndOffset, value => RTSPPublishClockMode::__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; 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::(); 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 { RTSPSuspendMode::None => ffi::GST_RTSP_SUSPEND_MODE_NONE, RTSPSuspendMode::Pause => ffi::GST_RTSP_SUSPEND_MODE_PAUSE, RTSPSuspendMode::Reset => ffi::GST_RTSP_SUSPEND_MODE_RESET, RTSPSuspendMode::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for RTSPSuspendMode { unsafe fn from_glib(value: ffi::GstRTSPSuspendMode) -> Self { skip_assert_initialized!(); match value { 0 => RTSPSuspendMode::None, 1 => RTSPSuspendMode::Pause, 2 => RTSPSuspendMode::Reset, value => RTSPSuspendMode::__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; 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::(); 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 { RTSPThreadType::Client => ffi::GST_RTSP_THREAD_TYPE_CLIENT, RTSPThreadType::Media => ffi::GST_RTSP_THREAD_TYPE_MEDIA, RTSPThreadType::__Unknown(value) => value, } } } #[doc(hidden)] impl FromGlib for RTSPThreadType { unsafe fn from_glib(value: ffi::GstRTSPThreadType) -> Self { skip_assert_initialized!(); match value { 0 => RTSPThreadType::Client, 1 => RTSPThreadType::Media, value => RTSPThreadType::__Unknown(value), } } }