use glib::translate::*;
use glib::value::FromValue;
use glib::value::FromValueOptional;
use glib::value::SetValue;
use glib::value::Value;
use glib::StaticType;
use glib::Type;
use gobject_sys;
use gst_rtsp_sys;
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPAuthMethod {
None,
Basic,
Digest,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl ToGlib for RTSPAuthMethod {
type GlibType = gst_rtsp_sys::GstRTSPAuthMethod;
fn to_glib(&self) -> gst_rtsp_sys::GstRTSPAuthMethod {
match *self {
RTSPAuthMethod::None => gst_rtsp_sys::GST_RTSP_AUTH_NONE,
RTSPAuthMethod::Basic => gst_rtsp_sys::GST_RTSP_AUTH_BASIC,
RTSPAuthMethod::Digest => gst_rtsp_sys::GST_RTSP_AUTH_DIGEST,
RTSPAuthMethod::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPAuthMethod> for RTSPAuthMethod {
fn from_glib(value: gst_rtsp_sys::GstRTSPAuthMethod) -> Self {
skip_assert_initialized!();
match value {
0 => RTSPAuthMethod::None,
1 => RTSPAuthMethod::Basic,
2 => RTSPAuthMethod::Digest,
value => RTSPAuthMethod::__Unknown(value),
}
}
}
impl StaticType for RTSPAuthMethod {
fn static_type() -> Type {
unsafe { from_glib(gst_rtsp_sys::gst_rtsp_auth_method_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for RTSPAuthMethod {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for RTSPAuthMethod {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for RTSPAuthMethod {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPFamily {
None,
Inet,
Inet6,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl ToGlib for RTSPFamily {
type GlibType = gst_rtsp_sys::GstRTSPFamily;
fn to_glib(&self) -> gst_rtsp_sys::GstRTSPFamily {
match *self {
RTSPFamily::None => gst_rtsp_sys::GST_RTSP_FAM_NONE,
RTSPFamily::Inet => gst_rtsp_sys::GST_RTSP_FAM_INET,
RTSPFamily::Inet6 => gst_rtsp_sys::GST_RTSP_FAM_INET6,
RTSPFamily::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPFamily> for RTSPFamily {
fn from_glib(value: gst_rtsp_sys::GstRTSPFamily) -> Self {
skip_assert_initialized!();
match value {
0 => RTSPFamily::None,
1 => RTSPFamily::Inet,
2 => RTSPFamily::Inet6,
value => RTSPFamily::__Unknown(value),
}
}
}
impl StaticType for RTSPFamily {
fn static_type() -> Type {
unsafe { from_glib(gst_rtsp_sys::gst_rtsp_family_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for RTSPFamily {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for RTSPFamily {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for RTSPFamily {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPHeaderField {
Invalid,
Accept,
AcceptEncoding,
AcceptLanguage,
Allow,
Authorization,
Bandwidth,
Blocksize,
CacheControl,
Conference,
Connection,
ContentBase,
ContentEncoding,
ContentLanguage,
ContentLength,
ContentLocation,
ContentType,
Cseq,
Date,
Expires,
From,
IfModifiedSince,
LastModified,
ProxyAuthenticate,
ProxyRequire,
Public,
Range,
Referer,
Require,
RetryAfter,
RtpInfo,
Scale,
Session,
Server,
Speed,
Transport,
Unsupported,
UserAgent,
Via,
WwwAuthenticate,
ClientChallenge,
RealChallenge1,
RealChallenge2,
RealChallenge3,
Subscribe,
Alert,
ClientId,
CompanyId,
Guid,
RegionData,
MaxAsmWidth,
Language,
PlayerStartTime,
Location,
Etag,
IfMatch,
AcceptCharset,
Supported,
Vary,
XAccelerateStreaming,
XAcceptAuthent,
XAcceptProxyAuthent,
XBroadcastId,
XBurstStreaming,
XNotice,
XPlayerLagTime,
XPlaylist,
XPlaylistChangeNotice,
XPlaylistGenId,
XPlaylistSeekId,
XProxyClientAgent,
XProxyClientVerb,
XRecedingPlaylistchange,
XRtpInfo,
XStartupprofile,
Timestamp,
AuthenticationInfo,
Host,
Pragma,
XServerIpAddress,
XSessioncookie,
RtcpInterval,
Keymgmt,
PipelinedRequests,
MediaProperties,
SeekStyle,
AcceptRanges,
Frames,
RateControl,
Last,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl ToGlib for RTSPHeaderField {
type GlibType = gst_rtsp_sys::GstRTSPHeaderField;
fn to_glib(&self) -> gst_rtsp_sys::GstRTSPHeaderField {
match *self {
RTSPHeaderField::Invalid => gst_rtsp_sys::GST_RTSP_HDR_INVALID,
RTSPHeaderField::Accept => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT,
RTSPHeaderField::AcceptEncoding => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_ENCODING,
RTSPHeaderField::AcceptLanguage => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_LANGUAGE,
RTSPHeaderField::Allow => gst_rtsp_sys::GST_RTSP_HDR_ALLOW,
RTSPHeaderField::Authorization => gst_rtsp_sys::GST_RTSP_HDR_AUTHORIZATION,
RTSPHeaderField::Bandwidth => gst_rtsp_sys::GST_RTSP_HDR_BANDWIDTH,
RTSPHeaderField::Blocksize => gst_rtsp_sys::GST_RTSP_HDR_BLOCKSIZE,
RTSPHeaderField::CacheControl => gst_rtsp_sys::GST_RTSP_HDR_CACHE_CONTROL,
RTSPHeaderField::Conference => gst_rtsp_sys::GST_RTSP_HDR_CONFERENCE,
RTSPHeaderField::Connection => gst_rtsp_sys::GST_RTSP_HDR_CONNECTION,
RTSPHeaderField::ContentBase => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_BASE,
RTSPHeaderField::ContentEncoding => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_ENCODING,
RTSPHeaderField::ContentLanguage => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_LANGUAGE,
RTSPHeaderField::ContentLength => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_LENGTH,
RTSPHeaderField::ContentLocation => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_LOCATION,
RTSPHeaderField::ContentType => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_TYPE,
RTSPHeaderField::Cseq => gst_rtsp_sys::GST_RTSP_HDR_CSEQ,
RTSPHeaderField::Date => gst_rtsp_sys::GST_RTSP_HDR_DATE,
RTSPHeaderField::Expires => gst_rtsp_sys::GST_RTSP_HDR_EXPIRES,
RTSPHeaderField::From => gst_rtsp_sys::GST_RTSP_HDR_FROM,
RTSPHeaderField::IfModifiedSince => gst_rtsp_sys::GST_RTSP_HDR_IF_MODIFIED_SINCE,
RTSPHeaderField::LastModified => gst_rtsp_sys::GST_RTSP_HDR_LAST_MODIFIED,
RTSPHeaderField::ProxyAuthenticate => gst_rtsp_sys::GST_RTSP_HDR_PROXY_AUTHENTICATE,
RTSPHeaderField::ProxyRequire => gst_rtsp_sys::GST_RTSP_HDR_PROXY_REQUIRE,
RTSPHeaderField::Public => gst_rtsp_sys::GST_RTSP_HDR_PUBLIC,
RTSPHeaderField::Range => gst_rtsp_sys::GST_RTSP_HDR_RANGE,
RTSPHeaderField::Referer => gst_rtsp_sys::GST_RTSP_HDR_REFERER,
RTSPHeaderField::Require => gst_rtsp_sys::GST_RTSP_HDR_REQUIRE,
RTSPHeaderField::RetryAfter => gst_rtsp_sys::GST_RTSP_HDR_RETRY_AFTER,
RTSPHeaderField::RtpInfo => gst_rtsp_sys::GST_RTSP_HDR_RTP_INFO,
RTSPHeaderField::Scale => gst_rtsp_sys::GST_RTSP_HDR_SCALE,
RTSPHeaderField::Session => gst_rtsp_sys::GST_RTSP_HDR_SESSION,
RTSPHeaderField::Server => gst_rtsp_sys::GST_RTSP_HDR_SERVER,
RTSPHeaderField::Speed => gst_rtsp_sys::GST_RTSP_HDR_SPEED,
RTSPHeaderField::Transport => gst_rtsp_sys::GST_RTSP_HDR_TRANSPORT,
RTSPHeaderField::Unsupported => gst_rtsp_sys::GST_RTSP_HDR_UNSUPPORTED,
RTSPHeaderField::UserAgent => gst_rtsp_sys::GST_RTSP_HDR_USER_AGENT,
RTSPHeaderField::Via => gst_rtsp_sys::GST_RTSP_HDR_VIA,
RTSPHeaderField::WwwAuthenticate => gst_rtsp_sys::GST_RTSP_HDR_WWW_AUTHENTICATE,
RTSPHeaderField::ClientChallenge => gst_rtsp_sys::GST_RTSP_HDR_CLIENT_CHALLENGE,
RTSPHeaderField::RealChallenge1 => gst_rtsp_sys::GST_RTSP_HDR_REAL_CHALLENGE1,
RTSPHeaderField::RealChallenge2 => gst_rtsp_sys::GST_RTSP_HDR_REAL_CHALLENGE2,
RTSPHeaderField::RealChallenge3 => gst_rtsp_sys::GST_RTSP_HDR_REAL_CHALLENGE3,
RTSPHeaderField::Subscribe => gst_rtsp_sys::GST_RTSP_HDR_SUBSCRIBE,
RTSPHeaderField::Alert => gst_rtsp_sys::GST_RTSP_HDR_ALERT,
RTSPHeaderField::ClientId => gst_rtsp_sys::GST_RTSP_HDR_CLIENT_ID,
RTSPHeaderField::CompanyId => gst_rtsp_sys::GST_RTSP_HDR_COMPANY_ID,
RTSPHeaderField::Guid => gst_rtsp_sys::GST_RTSP_HDR_GUID,
RTSPHeaderField::RegionData => gst_rtsp_sys::GST_RTSP_HDR_REGION_DATA,
RTSPHeaderField::MaxAsmWidth => gst_rtsp_sys::GST_RTSP_HDR_MAX_ASM_WIDTH,
RTSPHeaderField::Language => gst_rtsp_sys::GST_RTSP_HDR_LANGUAGE,
RTSPHeaderField::PlayerStartTime => gst_rtsp_sys::GST_RTSP_HDR_PLAYER_START_TIME,
RTSPHeaderField::Location => gst_rtsp_sys::GST_RTSP_HDR_LOCATION,
RTSPHeaderField::Etag => gst_rtsp_sys::GST_RTSP_HDR_ETAG,
RTSPHeaderField::IfMatch => gst_rtsp_sys::GST_RTSP_HDR_IF_MATCH,
RTSPHeaderField::AcceptCharset => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_CHARSET,
RTSPHeaderField::Supported => gst_rtsp_sys::GST_RTSP_HDR_SUPPORTED,
RTSPHeaderField::Vary => gst_rtsp_sys::GST_RTSP_HDR_VARY,
RTSPHeaderField::XAccelerateStreaming => {
gst_rtsp_sys::GST_RTSP_HDR_X_ACCELERATE_STREAMING
}
RTSPHeaderField::XAcceptAuthent => gst_rtsp_sys::GST_RTSP_HDR_X_ACCEPT_AUTHENT,
RTSPHeaderField::XAcceptProxyAuthent => {
gst_rtsp_sys::GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT
}
RTSPHeaderField::XBroadcastId => gst_rtsp_sys::GST_RTSP_HDR_X_BROADCAST_ID,
RTSPHeaderField::XBurstStreaming => gst_rtsp_sys::GST_RTSP_HDR_X_BURST_STREAMING,
RTSPHeaderField::XNotice => gst_rtsp_sys::GST_RTSP_HDR_X_NOTICE,
RTSPHeaderField::XPlayerLagTime => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYER_LAG_TIME,
RTSPHeaderField::XPlaylist => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYLIST,
RTSPHeaderField::XPlaylistChangeNotice => {
gst_rtsp_sys::GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE
}
RTSPHeaderField::XPlaylistGenId => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYLIST_GEN_ID,
RTSPHeaderField::XPlaylistSeekId => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYLIST_SEEK_ID,
RTSPHeaderField::XProxyClientAgent => gst_rtsp_sys::GST_RTSP_HDR_X_PROXY_CLIENT_AGENT,
RTSPHeaderField::XProxyClientVerb => gst_rtsp_sys::GST_RTSP_HDR_X_PROXY_CLIENT_VERB,
RTSPHeaderField::XRecedingPlaylistchange => {
gst_rtsp_sys::GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE
}
RTSPHeaderField::XRtpInfo => gst_rtsp_sys::GST_RTSP_HDR_X_RTP_INFO,
RTSPHeaderField::XStartupprofile => gst_rtsp_sys::GST_RTSP_HDR_X_STARTUPPROFILE,
RTSPHeaderField::Timestamp => gst_rtsp_sys::GST_RTSP_HDR_TIMESTAMP,
RTSPHeaderField::AuthenticationInfo => gst_rtsp_sys::GST_RTSP_HDR_AUTHENTICATION_INFO,
RTSPHeaderField::Host => gst_rtsp_sys::GST_RTSP_HDR_HOST,
RTSPHeaderField::Pragma => gst_rtsp_sys::GST_RTSP_HDR_PRAGMA,
RTSPHeaderField::XServerIpAddress => gst_rtsp_sys::GST_RTSP_HDR_X_SERVER_IP_ADDRESS,
RTSPHeaderField::XSessioncookie => gst_rtsp_sys::GST_RTSP_HDR_X_SESSIONCOOKIE,
RTSPHeaderField::RtcpInterval => gst_rtsp_sys::GST_RTSP_HDR_RTCP_INTERVAL,
RTSPHeaderField::Keymgmt => gst_rtsp_sys::GST_RTSP_HDR_KEYMGMT,
RTSPHeaderField::PipelinedRequests => gst_rtsp_sys::GST_RTSP_HDR_PIPELINED_REQUESTS,
RTSPHeaderField::MediaProperties => gst_rtsp_sys::GST_RTSP_HDR_MEDIA_PROPERTIES,
RTSPHeaderField::SeekStyle => gst_rtsp_sys::GST_RTSP_HDR_SEEK_STYLE,
RTSPHeaderField::AcceptRanges => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_RANGES,
RTSPHeaderField::Frames => gst_rtsp_sys::GST_RTSP_HDR_FRAMES,
RTSPHeaderField::RateControl => gst_rtsp_sys::GST_RTSP_HDR_RATE_CONTROL,
RTSPHeaderField::Last => gst_rtsp_sys::GST_RTSP_HDR_LAST,
RTSPHeaderField::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPHeaderField> for RTSPHeaderField {
fn from_glib(value: gst_rtsp_sys::GstRTSPHeaderField) -> Self {
skip_assert_initialized!();
match value {
0 => RTSPHeaderField::Invalid,
1 => RTSPHeaderField::Accept,
2 => RTSPHeaderField::AcceptEncoding,
3 => RTSPHeaderField::AcceptLanguage,
4 => RTSPHeaderField::Allow,
5 => RTSPHeaderField::Authorization,
6 => RTSPHeaderField::Bandwidth,
7 => RTSPHeaderField::Blocksize,
8 => RTSPHeaderField::CacheControl,
9 => RTSPHeaderField::Conference,
10 => RTSPHeaderField::Connection,
11 => RTSPHeaderField::ContentBase,
12 => RTSPHeaderField::ContentEncoding,
13 => RTSPHeaderField::ContentLanguage,
14 => RTSPHeaderField::ContentLength,
15 => RTSPHeaderField::ContentLocation,
16 => RTSPHeaderField::ContentType,
17 => RTSPHeaderField::Cseq,
18 => RTSPHeaderField::Date,
19 => RTSPHeaderField::Expires,
20 => RTSPHeaderField::From,
21 => RTSPHeaderField::IfModifiedSince,
22 => RTSPHeaderField::LastModified,
23 => RTSPHeaderField::ProxyAuthenticate,
24 => RTSPHeaderField::ProxyRequire,
25 => RTSPHeaderField::Public,
26 => RTSPHeaderField::Range,
27 => RTSPHeaderField::Referer,
28 => RTSPHeaderField::Require,
29 => RTSPHeaderField::RetryAfter,
30 => RTSPHeaderField::RtpInfo,
31 => RTSPHeaderField::Scale,
32 => RTSPHeaderField::Session,
33 => RTSPHeaderField::Server,
34 => RTSPHeaderField::Speed,
35 => RTSPHeaderField::Transport,
36 => RTSPHeaderField::Unsupported,
37 => RTSPHeaderField::UserAgent,
38 => RTSPHeaderField::Via,
39 => RTSPHeaderField::WwwAuthenticate,
40 => RTSPHeaderField::ClientChallenge,
41 => RTSPHeaderField::RealChallenge1,
42 => RTSPHeaderField::RealChallenge2,
43 => RTSPHeaderField::RealChallenge3,
44 => RTSPHeaderField::Subscribe,
45 => RTSPHeaderField::Alert,
46 => RTSPHeaderField::ClientId,
47 => RTSPHeaderField::CompanyId,
48 => RTSPHeaderField::Guid,
49 => RTSPHeaderField::RegionData,
50 => RTSPHeaderField::MaxAsmWidth,
51 => RTSPHeaderField::Language,
52 => RTSPHeaderField::PlayerStartTime,
53 => RTSPHeaderField::Location,
54 => RTSPHeaderField::Etag,
55 => RTSPHeaderField::IfMatch,
56 => RTSPHeaderField::AcceptCharset,
57 => RTSPHeaderField::Supported,
58 => RTSPHeaderField::Vary,
59 => RTSPHeaderField::XAccelerateStreaming,
60 => RTSPHeaderField::XAcceptAuthent,
61 => RTSPHeaderField::XAcceptProxyAuthent,
62 => RTSPHeaderField::XBroadcastId,
63 => RTSPHeaderField::XBurstStreaming,
64 => RTSPHeaderField::XNotice,
65 => RTSPHeaderField::XPlayerLagTime,
66 => RTSPHeaderField::XPlaylist,
67 => RTSPHeaderField::XPlaylistChangeNotice,
68 => RTSPHeaderField::XPlaylistGenId,
69 => RTSPHeaderField::XPlaylistSeekId,
70 => RTSPHeaderField::XProxyClientAgent,
71 => RTSPHeaderField::XProxyClientVerb,
72 => RTSPHeaderField::XRecedingPlaylistchange,
73 => RTSPHeaderField::XRtpInfo,
74 => RTSPHeaderField::XStartupprofile,
75 => RTSPHeaderField::Timestamp,
76 => RTSPHeaderField::AuthenticationInfo,
77 => RTSPHeaderField::Host,
78 => RTSPHeaderField::Pragma,
79 => RTSPHeaderField::XServerIpAddress,
80 => RTSPHeaderField::XSessioncookie,
81 => RTSPHeaderField::RtcpInterval,
82 => RTSPHeaderField::Keymgmt,
83 => RTSPHeaderField::PipelinedRequests,
84 => RTSPHeaderField::MediaProperties,
85 => RTSPHeaderField::SeekStyle,
86 => RTSPHeaderField::AcceptRanges,
87 => RTSPHeaderField::Frames,
88 => RTSPHeaderField::RateControl,
89 => RTSPHeaderField::Last,
value => RTSPHeaderField::__Unknown(value),
}
}
}
impl StaticType for RTSPHeaderField {
fn static_type() -> Type {
unsafe { from_glib(gst_rtsp_sys::gst_rtsp_header_field_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for RTSPHeaderField {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for RTSPHeaderField {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for RTSPHeaderField {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPMsgType {
Invalid,
Request,
Response,
HttpRequest,
HttpResponse,
Data,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl ToGlib for RTSPMsgType {
type GlibType = gst_rtsp_sys::GstRTSPMsgType;
fn to_glib(&self) -> gst_rtsp_sys::GstRTSPMsgType {
match *self {
RTSPMsgType::Invalid => gst_rtsp_sys::GST_RTSP_MESSAGE_INVALID,
RTSPMsgType::Request => gst_rtsp_sys::GST_RTSP_MESSAGE_REQUEST,
RTSPMsgType::Response => gst_rtsp_sys::GST_RTSP_MESSAGE_RESPONSE,
RTSPMsgType::HttpRequest => gst_rtsp_sys::GST_RTSP_MESSAGE_HTTP_REQUEST,
RTSPMsgType::HttpResponse => gst_rtsp_sys::GST_RTSP_MESSAGE_HTTP_RESPONSE,
RTSPMsgType::Data => gst_rtsp_sys::GST_RTSP_MESSAGE_DATA,
RTSPMsgType::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPMsgType> for RTSPMsgType {
fn from_glib(value: gst_rtsp_sys::GstRTSPMsgType) -> Self {
skip_assert_initialized!();
match value {
0 => RTSPMsgType::Invalid,
1 => RTSPMsgType::Request,
2 => RTSPMsgType::Response,
3 => RTSPMsgType::HttpRequest,
4 => RTSPMsgType::HttpResponse,
5 => RTSPMsgType::Data,
value => RTSPMsgType::__Unknown(value),
}
}
}
impl StaticType for RTSPMsgType {
fn static_type() -> Type {
unsafe { from_glib(gst_rtsp_sys::gst_rtsp_msg_type_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for RTSPMsgType {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for RTSPMsgType {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for RTSPMsgType {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPRangeUnit {
Smpte,
Smpte30Drop,
Smpte25,
Npt,
Clock,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl ToGlib for RTSPRangeUnit {
type GlibType = gst_rtsp_sys::GstRTSPRangeUnit;
fn to_glib(&self) -> gst_rtsp_sys::GstRTSPRangeUnit {
match *self {
RTSPRangeUnit::Smpte => gst_rtsp_sys::GST_RTSP_RANGE_SMPTE,
RTSPRangeUnit::Smpte30Drop => gst_rtsp_sys::GST_RTSP_RANGE_SMPTE_30_DROP,
RTSPRangeUnit::Smpte25 => gst_rtsp_sys::GST_RTSP_RANGE_SMPTE_25,
RTSPRangeUnit::Npt => gst_rtsp_sys::GST_RTSP_RANGE_NPT,
RTSPRangeUnit::Clock => gst_rtsp_sys::GST_RTSP_RANGE_CLOCK,
RTSPRangeUnit::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPRangeUnit> for RTSPRangeUnit {
fn from_glib(value: gst_rtsp_sys::GstRTSPRangeUnit) -> Self {
skip_assert_initialized!();
match value {
0 => RTSPRangeUnit::Smpte,
1 => RTSPRangeUnit::Smpte30Drop,
2 => RTSPRangeUnit::Smpte25,
3 => RTSPRangeUnit::Npt,
4 => RTSPRangeUnit::Clock,
value => RTSPRangeUnit::__Unknown(value),
}
}
}
impl StaticType for RTSPRangeUnit {
fn static_type() -> Type {
unsafe { from_glib(gst_rtsp_sys::gst_rtsp_range_unit_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for RTSPRangeUnit {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for RTSPRangeUnit {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for RTSPRangeUnit {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPResult {
Ok,
Error,
Einval,
Eintr,
Enomem,
Eresolv,
Enotimpl,
Esys,
Eparse,
Ewsastart,
Ewsaversion,
Eeof,
Enet,
Enotip,
Etimeout,
Etget,
Etpost,
Elast,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl ToGlib for RTSPResult {
type GlibType = gst_rtsp_sys::GstRTSPResult;
fn to_glib(&self) -> gst_rtsp_sys::GstRTSPResult {
match *self {
RTSPResult::Ok => gst_rtsp_sys::GST_RTSP_OK,
RTSPResult::Error => gst_rtsp_sys::GST_RTSP_ERROR,
RTSPResult::Einval => gst_rtsp_sys::GST_RTSP_EINVAL,
RTSPResult::Eintr => gst_rtsp_sys::GST_RTSP_EINTR,
RTSPResult::Enomem => gst_rtsp_sys::GST_RTSP_ENOMEM,
RTSPResult::Eresolv => gst_rtsp_sys::GST_RTSP_ERESOLV,
RTSPResult::Enotimpl => gst_rtsp_sys::GST_RTSP_ENOTIMPL,
RTSPResult::Esys => gst_rtsp_sys::GST_RTSP_ESYS,
RTSPResult::Eparse => gst_rtsp_sys::GST_RTSP_EPARSE,
RTSPResult::Ewsastart => gst_rtsp_sys::GST_RTSP_EWSASTART,
RTSPResult::Ewsaversion => gst_rtsp_sys::GST_RTSP_EWSAVERSION,
RTSPResult::Eeof => gst_rtsp_sys::GST_RTSP_EEOF,
RTSPResult::Enet => gst_rtsp_sys::GST_RTSP_ENET,
RTSPResult::Enotip => gst_rtsp_sys::GST_RTSP_ENOTIP,
RTSPResult::Etimeout => gst_rtsp_sys::GST_RTSP_ETIMEOUT,
RTSPResult::Etget => gst_rtsp_sys::GST_RTSP_ETGET,
RTSPResult::Etpost => gst_rtsp_sys::GST_RTSP_ETPOST,
RTSPResult::Elast => gst_rtsp_sys::GST_RTSP_ELAST,
RTSPResult::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPResult> for RTSPResult {
fn from_glib(value: gst_rtsp_sys::GstRTSPResult) -> Self {
skip_assert_initialized!();
match value {
0 => RTSPResult::Ok,
-1 => RTSPResult::Error,
-2 => RTSPResult::Einval,
-3 => RTSPResult::Eintr,
-4 => RTSPResult::Enomem,
-5 => RTSPResult::Eresolv,
-6 => RTSPResult::Enotimpl,
-7 => RTSPResult::Esys,
-8 => RTSPResult::Eparse,
-9 => RTSPResult::Ewsastart,
-10 => RTSPResult::Ewsaversion,
-11 => RTSPResult::Eeof,
-12 => RTSPResult::Enet,
-13 => RTSPResult::Enotip,
-14 => RTSPResult::Etimeout,
-15 => RTSPResult::Etget,
-16 => RTSPResult::Etpost,
-17 => RTSPResult::Elast,
value => RTSPResult::__Unknown(value),
}
}
}
impl StaticType for RTSPResult {
fn static_type() -> Type {
unsafe { from_glib(gst_rtsp_sys::gst_rtsp_result_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for RTSPResult {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for RTSPResult {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for RTSPResult {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPState {
Invalid,
Init,
Ready,
Seeking,
Playing,
Recording,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl ToGlib for RTSPState {
type GlibType = gst_rtsp_sys::GstRTSPState;
fn to_glib(&self) -> gst_rtsp_sys::GstRTSPState {
match *self {
RTSPState::Invalid => gst_rtsp_sys::GST_RTSP_STATE_INVALID,
RTSPState::Init => gst_rtsp_sys::GST_RTSP_STATE_INIT,
RTSPState::Ready => gst_rtsp_sys::GST_RTSP_STATE_READY,
RTSPState::Seeking => gst_rtsp_sys::GST_RTSP_STATE_SEEKING,
RTSPState::Playing => gst_rtsp_sys::GST_RTSP_STATE_PLAYING,
RTSPState::Recording => gst_rtsp_sys::GST_RTSP_STATE_RECORDING,
RTSPState::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPState> for RTSPState {
fn from_glib(value: gst_rtsp_sys::GstRTSPState) -> Self {
skip_assert_initialized!();
match value {
0 => RTSPState::Invalid,
1 => RTSPState::Init,
2 => RTSPState::Ready,
3 => RTSPState::Seeking,
4 => RTSPState::Playing,
5 => RTSPState::Recording,
value => RTSPState::__Unknown(value),
}
}
}
impl StaticType for RTSPState {
fn static_type() -> Type {
unsafe { from_glib(gst_rtsp_sys::gst_rtsp_state_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for RTSPState {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for RTSPState {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for RTSPState {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPStatusCode {
Invalid,
Continue,
Ok,
Created,
LowOnStorage,
MultipleChoices,
MovedPermanently,
MoveTemporarily,
SeeOther,
NotModified,
UseProxy,
BadRequest,
Unauthorized,
PaymentRequired,
Forbidden,
NotFound,
MethodNotAllowed,
NotAcceptable,
ProxyAuthRequired,
RequestTimeout,
Gone,
LengthRequired,
PreconditionFailed,
RequestEntityTooLarge,
RequestUriTooLarge,
UnsupportedMediaType,
ParameterNotUnderstood,
ConferenceNotFound,
NotEnoughBandwidth,
SessionNotFound,
MethodNotValidInThisState,
HeaderFieldNotValidForResource,
InvalidRange,
ParameterIsReadonly,
AggregateOperationNotAllowed,
OnlyAggregateOperationAllowed,
UnsupportedTransport,
DestinationUnreachable,
KeyManagementFailure,
InternalServerError,
NotImplemented,
BadGateway,
ServiceUnavailable,
GatewayTimeout,
RtspVersionNotSupported,
OptionNotSupported,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl ToGlib for RTSPStatusCode {
type GlibType = gst_rtsp_sys::GstRTSPStatusCode;
fn to_glib(&self) -> gst_rtsp_sys::GstRTSPStatusCode {
match *self {
RTSPStatusCode::Invalid => gst_rtsp_sys::GST_RTSP_STS_INVALID,
RTSPStatusCode::Continue => gst_rtsp_sys::GST_RTSP_STS_CONTINUE,
RTSPStatusCode::Ok => gst_rtsp_sys::GST_RTSP_STS_OK,
RTSPStatusCode::Created => gst_rtsp_sys::GST_RTSP_STS_CREATED,
RTSPStatusCode::LowOnStorage => gst_rtsp_sys::GST_RTSP_STS_LOW_ON_STORAGE,
RTSPStatusCode::MultipleChoices => gst_rtsp_sys::GST_RTSP_STS_MULTIPLE_CHOICES,
RTSPStatusCode::MovedPermanently => gst_rtsp_sys::GST_RTSP_STS_MOVED_PERMANENTLY,
RTSPStatusCode::MoveTemporarily => gst_rtsp_sys::GST_RTSP_STS_MOVE_TEMPORARILY,
RTSPStatusCode::SeeOther => gst_rtsp_sys::GST_RTSP_STS_SEE_OTHER,
RTSPStatusCode::NotModified => gst_rtsp_sys::GST_RTSP_STS_NOT_MODIFIED,
RTSPStatusCode::UseProxy => gst_rtsp_sys::GST_RTSP_STS_USE_PROXY,
RTSPStatusCode::BadRequest => gst_rtsp_sys::GST_RTSP_STS_BAD_REQUEST,
RTSPStatusCode::Unauthorized => gst_rtsp_sys::GST_RTSP_STS_UNAUTHORIZED,
RTSPStatusCode::PaymentRequired => gst_rtsp_sys::GST_RTSP_STS_PAYMENT_REQUIRED,
RTSPStatusCode::Forbidden => gst_rtsp_sys::GST_RTSP_STS_FORBIDDEN,
RTSPStatusCode::NotFound => gst_rtsp_sys::GST_RTSP_STS_NOT_FOUND,
RTSPStatusCode::MethodNotAllowed => gst_rtsp_sys::GST_RTSP_STS_METHOD_NOT_ALLOWED,
RTSPStatusCode::NotAcceptable => gst_rtsp_sys::GST_RTSP_STS_NOT_ACCEPTABLE,
RTSPStatusCode::ProxyAuthRequired => gst_rtsp_sys::GST_RTSP_STS_PROXY_AUTH_REQUIRED,
RTSPStatusCode::RequestTimeout => gst_rtsp_sys::GST_RTSP_STS_REQUEST_TIMEOUT,
RTSPStatusCode::Gone => gst_rtsp_sys::GST_RTSP_STS_GONE,
RTSPStatusCode::LengthRequired => gst_rtsp_sys::GST_RTSP_STS_LENGTH_REQUIRED,
RTSPStatusCode::PreconditionFailed => gst_rtsp_sys::GST_RTSP_STS_PRECONDITION_FAILED,
RTSPStatusCode::RequestEntityTooLarge => {
gst_rtsp_sys::GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE
}
RTSPStatusCode::RequestUriTooLarge => gst_rtsp_sys::GST_RTSP_STS_REQUEST_URI_TOO_LARGE,
RTSPStatusCode::UnsupportedMediaType => {
gst_rtsp_sys::GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE
}
RTSPStatusCode::ParameterNotUnderstood => {
gst_rtsp_sys::GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD
}
RTSPStatusCode::ConferenceNotFound => gst_rtsp_sys::GST_RTSP_STS_CONFERENCE_NOT_FOUND,
RTSPStatusCode::NotEnoughBandwidth => gst_rtsp_sys::GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH,
RTSPStatusCode::SessionNotFound => gst_rtsp_sys::GST_RTSP_STS_SESSION_NOT_FOUND,
RTSPStatusCode::MethodNotValidInThisState => {
gst_rtsp_sys::GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE
}
RTSPStatusCode::HeaderFieldNotValidForResource => {
gst_rtsp_sys::GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE
}
RTSPStatusCode::InvalidRange => gst_rtsp_sys::GST_RTSP_STS_INVALID_RANGE,
RTSPStatusCode::ParameterIsReadonly => gst_rtsp_sys::GST_RTSP_STS_PARAMETER_IS_READONLY,
RTSPStatusCode::AggregateOperationNotAllowed => {
gst_rtsp_sys::GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED
}
RTSPStatusCode::OnlyAggregateOperationAllowed => {
gst_rtsp_sys::GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED
}
RTSPStatusCode::UnsupportedTransport => {
gst_rtsp_sys::GST_RTSP_STS_UNSUPPORTED_TRANSPORT
}
RTSPStatusCode::DestinationUnreachable => {
gst_rtsp_sys::GST_RTSP_STS_DESTINATION_UNREACHABLE
}
RTSPStatusCode::KeyManagementFailure => {
gst_rtsp_sys::GST_RTSP_STS_KEY_MANAGEMENT_FAILURE
}
RTSPStatusCode::InternalServerError => gst_rtsp_sys::GST_RTSP_STS_INTERNAL_SERVER_ERROR,
RTSPStatusCode::NotImplemented => gst_rtsp_sys::GST_RTSP_STS_NOT_IMPLEMENTED,
RTSPStatusCode::BadGateway => gst_rtsp_sys::GST_RTSP_STS_BAD_GATEWAY,
RTSPStatusCode::ServiceUnavailable => gst_rtsp_sys::GST_RTSP_STS_SERVICE_UNAVAILABLE,
RTSPStatusCode::GatewayTimeout => gst_rtsp_sys::GST_RTSP_STS_GATEWAY_TIMEOUT,
RTSPStatusCode::RtspVersionNotSupported => {
gst_rtsp_sys::GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED
}
RTSPStatusCode::OptionNotSupported => gst_rtsp_sys::GST_RTSP_STS_OPTION_NOT_SUPPORTED,
RTSPStatusCode::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPStatusCode> for RTSPStatusCode {
fn from_glib(value: gst_rtsp_sys::GstRTSPStatusCode) -> Self {
skip_assert_initialized!();
match value {
0 => RTSPStatusCode::Invalid,
100 => RTSPStatusCode::Continue,
200 => RTSPStatusCode::Ok,
201 => RTSPStatusCode::Created,
250 => RTSPStatusCode::LowOnStorage,
300 => RTSPStatusCode::MultipleChoices,
301 => RTSPStatusCode::MovedPermanently,
302 => RTSPStatusCode::MoveTemporarily,
303 => RTSPStatusCode::SeeOther,
304 => RTSPStatusCode::NotModified,
305 => RTSPStatusCode::UseProxy,
400 => RTSPStatusCode::BadRequest,
401 => RTSPStatusCode::Unauthorized,
402 => RTSPStatusCode::PaymentRequired,
403 => RTSPStatusCode::Forbidden,
404 => RTSPStatusCode::NotFound,
405 => RTSPStatusCode::MethodNotAllowed,
406 => RTSPStatusCode::NotAcceptable,
407 => RTSPStatusCode::ProxyAuthRequired,
408 => RTSPStatusCode::RequestTimeout,
410 => RTSPStatusCode::Gone,
411 => RTSPStatusCode::LengthRequired,
412 => RTSPStatusCode::PreconditionFailed,
413 => RTSPStatusCode::RequestEntityTooLarge,
414 => RTSPStatusCode::RequestUriTooLarge,
415 => RTSPStatusCode::UnsupportedMediaType,
451 => RTSPStatusCode::ParameterNotUnderstood,
452 => RTSPStatusCode::ConferenceNotFound,
453 => RTSPStatusCode::NotEnoughBandwidth,
454 => RTSPStatusCode::SessionNotFound,
455 => RTSPStatusCode::MethodNotValidInThisState,
456 => RTSPStatusCode::HeaderFieldNotValidForResource,
457 => RTSPStatusCode::InvalidRange,
458 => RTSPStatusCode::ParameterIsReadonly,
459 => RTSPStatusCode::AggregateOperationNotAllowed,
460 => RTSPStatusCode::OnlyAggregateOperationAllowed,
461 => RTSPStatusCode::UnsupportedTransport,
462 => RTSPStatusCode::DestinationUnreachable,
463 => RTSPStatusCode::KeyManagementFailure,
500 => RTSPStatusCode::InternalServerError,
501 => RTSPStatusCode::NotImplemented,
502 => RTSPStatusCode::BadGateway,
503 => RTSPStatusCode::ServiceUnavailable,
504 => RTSPStatusCode::GatewayTimeout,
505 => RTSPStatusCode::RtspVersionNotSupported,
551 => RTSPStatusCode::OptionNotSupported,
value => RTSPStatusCode::__Unknown(value),
}
}
}
impl StaticType for RTSPStatusCode {
fn static_type() -> Type {
unsafe { from_glib(gst_rtsp_sys::gst_rtsp_status_code_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for RTSPStatusCode {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for RTSPStatusCode {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for RTSPStatusCode {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPTimeType {
Seconds,
Now,
End,
Frames,
Utc,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl ToGlib for RTSPTimeType {
type GlibType = gst_rtsp_sys::GstRTSPTimeType;
fn to_glib(&self) -> gst_rtsp_sys::GstRTSPTimeType {
match *self {
RTSPTimeType::Seconds => gst_rtsp_sys::GST_RTSP_TIME_SECONDS,
RTSPTimeType::Now => gst_rtsp_sys::GST_RTSP_TIME_NOW,
RTSPTimeType::End => gst_rtsp_sys::GST_RTSP_TIME_END,
RTSPTimeType::Frames => gst_rtsp_sys::GST_RTSP_TIME_FRAMES,
RTSPTimeType::Utc => gst_rtsp_sys::GST_RTSP_TIME_UTC,
RTSPTimeType::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPTimeType> for RTSPTimeType {
fn from_glib(value: gst_rtsp_sys::GstRTSPTimeType) -> Self {
skip_assert_initialized!();
match value {
0 => RTSPTimeType::Seconds,
1 => RTSPTimeType::Now,
2 => RTSPTimeType::End,
3 => RTSPTimeType::Frames,
4 => RTSPTimeType::Utc,
value => RTSPTimeType::__Unknown(value),
}
}
}
impl StaticType for RTSPTimeType {
fn static_type() -> Type {
unsafe { from_glib(gst_rtsp_sys::gst_rtsp_time_type_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for RTSPTimeType {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for RTSPTimeType {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for RTSPTimeType {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}