2018-04-23 17:34:22 +00:00
|
|
|
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
|
|
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
2018-02-09 02:30:08 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
|
|
|
use glib::translate::*;
|
|
|
|
use glib::value::FromValue;
|
|
|
|
use glib::value::FromValueOptional;
|
|
|
|
use glib::value::SetValue;
|
|
|
|
use glib::value::Value;
|
2019-06-18 10:12:00 +00:00
|
|
|
use glib::StaticType;
|
|
|
|
use glib::Type;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2018-02-09 02:30:08 +00:00
|
|
|
pub enum RTSPAddressPoolResult {
|
|
|
|
Ok,
|
|
|
|
Einval,
|
|
|
|
Ereserved,
|
|
|
|
Erange,
|
|
|
|
Elast,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for RTSPAddressPoolResult {
|
2020-11-22 10:40:56 +00:00
|
|
|
type GlibType = ffi::GstRTSPAddressPoolResult;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-11-22 10:40:56 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstRTSPAddressPoolResult {
|
2018-02-09 02:30:08 +00:00
|
|
|
match *self {
|
2020-11-22 10:40:56 +00:00
|
|
|
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,
|
2019-06-18 10:12:00 +00:00
|
|
|
RTSPAddressPoolResult::__Unknown(value) => value,
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:40:56 +00:00
|
|
|
impl FromGlib<ffi::GstRTSPAddressPoolResult> for RTSPAddressPoolResult {
|
|
|
|
fn from_glib(value: ffi::GstRTSPAddressPoolResult) -> Self {
|
2018-02-09 02:30:08 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => RTSPAddressPoolResult::Ok,
|
|
|
|
-1 => RTSPAddressPoolResult::Einval,
|
|
|
|
-2 => RTSPAddressPoolResult::Ereserved,
|
|
|
|
-3 => RTSPAddressPoolResult::Erange,
|
|
|
|
-4 => RTSPAddressPoolResult::Elast,
|
|
|
|
value => RTSPAddressPoolResult::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2019-02-22 09:54:27 +00:00
|
|
|
pub enum RTSPFilterResult {
|
|
|
|
Remove,
|
|
|
|
Keep,
|
|
|
|
Ref,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for RTSPFilterResult {
|
2020-11-22 10:40:56 +00:00
|
|
|
type GlibType = ffi::GstRTSPFilterResult;
|
2019-02-22 09:54:27 +00:00
|
|
|
|
2020-11-22 10:40:56 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstRTSPFilterResult {
|
2019-02-22 09:54:27 +00:00
|
|
|
match *self {
|
2020-11-22 10:40:56 +00:00
|
|
|
RTSPFilterResult::Remove => ffi::GST_RTSP_FILTER_REMOVE,
|
|
|
|
RTSPFilterResult::Keep => ffi::GST_RTSP_FILTER_KEEP,
|
|
|
|
RTSPFilterResult::Ref => ffi::GST_RTSP_FILTER_REF,
|
2019-06-18 10:12:00 +00:00
|
|
|
RTSPFilterResult::__Unknown(value) => value,
|
2019-02-22 09:54:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:40:56 +00:00
|
|
|
impl FromGlib<ffi::GstRTSPFilterResult> for RTSPFilterResult {
|
|
|
|
fn from_glib(value: ffi::GstRTSPFilterResult) -> Self {
|
2019-02-22 09:54:27 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => RTSPFilterResult::Remove,
|
|
|
|
1 => RTSPFilterResult::Keep,
|
|
|
|
2 => RTSPFilterResult::Ref,
|
|
|
|
value => RTSPFilterResult::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2018-02-09 02:30:08 +00:00
|
|
|
pub enum RTSPMediaStatus {
|
|
|
|
Unprepared,
|
|
|
|
Unpreparing,
|
|
|
|
Preparing,
|
|
|
|
Prepared,
|
|
|
|
Suspended,
|
|
|
|
Error,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for RTSPMediaStatus {
|
2020-11-22 10:40:56 +00:00
|
|
|
type GlibType = ffi::GstRTSPMediaStatus;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-11-22 10:40:56 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstRTSPMediaStatus {
|
2018-02-09 02:30:08 +00:00
|
|
|
match *self {
|
2020-11-22 10:40:56 +00:00
|
|
|
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,
|
2019-06-18 10:12:00 +00:00
|
|
|
RTSPMediaStatus::__Unknown(value) => value,
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:40:56 +00:00
|
|
|
impl FromGlib<ffi::GstRTSPMediaStatus> for RTSPMediaStatus {
|
|
|
|
fn from_glib(value: ffi::GstRTSPMediaStatus) -> Self {
|
2018-02-09 02:30:08 +00:00
|
|
|
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),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2018-02-09 02:30:08 +00:00
|
|
|
pub enum RTSPPublishClockMode {
|
|
|
|
None,
|
|
|
|
Clock,
|
|
|
|
ClockAndOffset,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for RTSPPublishClockMode {
|
2020-11-22 10:40:56 +00:00
|
|
|
type GlibType = ffi::GstRTSPPublishClockMode;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-11-22 10:40:56 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstRTSPPublishClockMode {
|
2018-02-09 02:30:08 +00:00
|
|
|
match *self {
|
2020-11-22 10:40:56 +00:00
|
|
|
RTSPPublishClockMode::None => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_NONE,
|
|
|
|
RTSPPublishClockMode::Clock => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK,
|
2019-06-18 10:12:00 +00:00
|
|
|
RTSPPublishClockMode::ClockAndOffset => {
|
2020-11-22 10:40:56 +00:00
|
|
|
ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
|
|
|
RTSPPublishClockMode::__Unknown(value) => value,
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:40:56 +00:00
|
|
|
impl FromGlib<ffi::GstRTSPPublishClockMode> for RTSPPublishClockMode {
|
|
|
|
fn from_glib(value: ffi::GstRTSPPublishClockMode) -> Self {
|
2018-02-09 02:30:08 +00:00
|
|
|
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 {
|
2020-11-22 10:40:56 +00:00
|
|
|
unsafe { from_glib(ffi::gst_rtsp_publish_clock_mode_get_type()) }
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for RTSPPublishClockMode {
|
|
|
|
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
|
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for RTSPPublishClockMode {
|
|
|
|
unsafe fn from_value(value: &Value) -> Self {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for RTSPPublishClockMode {
|
|
|
|
unsafe fn set_value(value: &mut Value, this: &Self) {
|
2020-11-22 10:40:56 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2018-02-09 02:30:08 +00:00
|
|
|
pub enum RTSPSuspendMode {
|
|
|
|
None,
|
|
|
|
Pause,
|
|
|
|
Reset,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for RTSPSuspendMode {
|
2020-11-22 10:40:56 +00:00
|
|
|
type GlibType = ffi::GstRTSPSuspendMode;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-11-22 10:40:56 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstRTSPSuspendMode {
|
2018-02-09 02:30:08 +00:00
|
|
|
match *self {
|
2020-11-22 10:40:56 +00:00
|
|
|
RTSPSuspendMode::None => ffi::GST_RTSP_SUSPEND_MODE_NONE,
|
|
|
|
RTSPSuspendMode::Pause => ffi::GST_RTSP_SUSPEND_MODE_PAUSE,
|
|
|
|
RTSPSuspendMode::Reset => ffi::GST_RTSP_SUSPEND_MODE_RESET,
|
2019-06-18 10:12:00 +00:00
|
|
|
RTSPSuspendMode::__Unknown(value) => value,
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:40:56 +00:00
|
|
|
impl FromGlib<ffi::GstRTSPSuspendMode> for RTSPSuspendMode {
|
|
|
|
fn from_glib(value: ffi::GstRTSPSuspendMode) -> Self {
|
2018-02-09 02:30:08 +00:00
|
|
|
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 {
|
2020-11-22 10:40:56 +00:00
|
|
|
unsafe { from_glib(ffi::gst_rtsp_suspend_mode_get_type()) }
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for RTSPSuspendMode {
|
|
|
|
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
|
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for RTSPSuspendMode {
|
|
|
|
unsafe fn from_value(value: &Value) -> Self {
|
2020-11-22 10:40:56 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for RTSPSuspendMode {
|
|
|
|
unsafe fn set_value(value: &mut Value, this: &Self) {
|
2020-11-22 10:40:56 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2018-02-09 02:30:08 +00:00
|
|
|
pub enum RTSPThreadType {
|
|
|
|
Client,
|
|
|
|
Media,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for RTSPThreadType {
|
2020-11-22 10:40:56 +00:00
|
|
|
type GlibType = ffi::GstRTSPThreadType;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2020-11-22 10:40:56 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstRTSPThreadType {
|
2018-02-09 02:30:08 +00:00
|
|
|
match *self {
|
2020-11-22 10:40:56 +00:00
|
|
|
RTSPThreadType::Client => ffi::GST_RTSP_THREAD_TYPE_CLIENT,
|
|
|
|
RTSPThreadType::Media => ffi::GST_RTSP_THREAD_TYPE_MEDIA,
|
2019-06-18 10:12:00 +00:00
|
|
|
RTSPThreadType::__Unknown(value) => value,
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:40:56 +00:00
|
|
|
impl FromGlib<ffi::GstRTSPThreadType> for RTSPThreadType {
|
|
|
|
fn from_glib(value: ffi::GstRTSPThreadType) -> Self {
|
2018-02-09 02:30:08 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => RTSPThreadType::Client,
|
|
|
|
1 => RTSPThreadType::Media,
|
|
|
|
value => RTSPThreadType::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|