use crate::ffi;
use glib::{prelude::*, translate::*};
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstRTSPAuthMethod")]
pub enum RTSPAuthMethod {
#[doc(alias = "GST_RTSP_AUTH_NONE")]
None,
#[doc(alias = "GST_RTSP_AUTH_BASIC")]
Basic,
#[doc(alias = "GST_RTSP_AUTH_DIGEST")]
Digest,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for RTSPAuthMethod {
type GlibType = ffi::GstRTSPAuthMethod;
#[inline]
fn into_glib(self) -> ffi::GstRTSPAuthMethod {
match self {
Self::None => ffi::GST_RTSP_AUTH_NONE,
Self::Basic => ffi::GST_RTSP_AUTH_BASIC,
Self::Digest => ffi::GST_RTSP_AUTH_DIGEST,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstRTSPAuthMethod> for RTSPAuthMethod {
#[inline]
unsafe fn from_glib(value: ffi::GstRTSPAuthMethod) -> Self {
skip_assert_initialized!();
match value {
ffi::GST_RTSP_AUTH_NONE => Self::None,
ffi::GST_RTSP_AUTH_BASIC => Self::Basic,
ffi::GST_RTSP_AUTH_DIGEST => Self::Digest,
value => Self::__Unknown(value),
}
}
}
impl StaticType for RTSPAuthMethod {
#[inline]
#[doc(alias = "gst_rtsp_auth_method_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_rtsp_auth_method_get_type()) }
}
}
impl glib::HasParamSpec for RTSPAuthMethod {
type ParamSpec = glib::ParamSpecEnum;
type SetValue = Self;
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for RTSPAuthMethod {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for RTSPAuthMethod {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
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 RTSPAuthMethod {
#[inline]
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
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<RTSPAuthMethod> for glib::Value {
#[inline]
fn from(v: RTSPAuthMethod) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstRTSPFamily")]
pub enum RTSPFamily {
#[doc(alias = "GST_RTSP_FAM_NONE")]
None,
#[doc(alias = "GST_RTSP_FAM_INET")]
Inet,
#[doc(alias = "GST_RTSP_FAM_INET6")]
Inet6,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for RTSPFamily {
type GlibType = ffi::GstRTSPFamily;
#[inline]
fn into_glib(self) -> ffi::GstRTSPFamily {
match self {
Self::None => ffi::GST_RTSP_FAM_NONE,
Self::Inet => ffi::GST_RTSP_FAM_INET,
Self::Inet6 => ffi::GST_RTSP_FAM_INET6,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstRTSPFamily> for RTSPFamily {
#[inline]
unsafe fn from_glib(value: ffi::GstRTSPFamily) -> Self {
skip_assert_initialized!();
match value {
ffi::GST_RTSP_FAM_NONE => Self::None,
ffi::GST_RTSP_FAM_INET => Self::Inet,
ffi::GST_RTSP_FAM_INET6 => Self::Inet6,
value => Self::__Unknown(value),
}
}
}
impl StaticType for RTSPFamily {
#[inline]
#[doc(alias = "gst_rtsp_family_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_rtsp_family_get_type()) }
}
}
impl glib::HasParamSpec for RTSPFamily {
type ParamSpec = glib::ParamSpecEnum;
type SetValue = Self;
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for RTSPFamily {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for RTSPFamily {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
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 RTSPFamily {
#[inline]
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
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<RTSPFamily> for glib::Value {
#[inline]
fn from(v: RTSPFamily) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstRTSPHeaderField")]
pub enum RTSPHeaderField {
#[doc(alias = "GST_RTSP_HDR_INVALID")]
Invalid,
#[doc(alias = "GST_RTSP_HDR_ACCEPT")]
Accept,
#[doc(alias = "GST_RTSP_HDR_ACCEPT_ENCODING")]
AcceptEncoding,
#[doc(alias = "GST_RTSP_HDR_ACCEPT_LANGUAGE")]
AcceptLanguage,
#[doc(alias = "GST_RTSP_HDR_ALLOW")]
Allow,
#[doc(alias = "GST_RTSP_HDR_AUTHORIZATION")]
Authorization,
#[doc(alias = "GST_RTSP_HDR_BANDWIDTH")]
Bandwidth,
#[doc(alias = "GST_RTSP_HDR_BLOCKSIZE")]
Blocksize,
#[doc(alias = "GST_RTSP_HDR_CACHE_CONTROL")]
CacheControl,
#[doc(alias = "GST_RTSP_HDR_CONFERENCE")]
Conference,
#[doc(alias = "GST_RTSP_HDR_CONNECTION")]
Connection,
#[doc(alias = "GST_RTSP_HDR_CONTENT_BASE")]
ContentBase,
#[doc(alias = "GST_RTSP_HDR_CONTENT_ENCODING")]
ContentEncoding,
#[doc(alias = "GST_RTSP_HDR_CONTENT_LANGUAGE")]
ContentLanguage,
#[doc(alias = "GST_RTSP_HDR_CONTENT_LENGTH")]
ContentLength,
#[doc(alias = "GST_RTSP_HDR_CONTENT_LOCATION")]
ContentLocation,
#[doc(alias = "GST_RTSP_HDR_CONTENT_TYPE")]
ContentType,
#[doc(alias = "GST_RTSP_HDR_CSEQ")]
Cseq,
#[doc(alias = "GST_RTSP_HDR_DATE")]
Date,
#[doc(alias = "GST_RTSP_HDR_EXPIRES")]
Expires,
#[doc(alias = "GST_RTSP_HDR_FROM")]
From,
#[doc(alias = "GST_RTSP_HDR_IF_MODIFIED_SINCE")]
IfModifiedSince,
#[doc(alias = "GST_RTSP_HDR_LAST_MODIFIED")]
LastModified,
#[doc(alias = "GST_RTSP_HDR_PROXY_AUTHENTICATE")]
ProxyAuthenticate,
#[doc(alias = "GST_RTSP_HDR_PROXY_REQUIRE")]
ProxyRequire,
#[doc(alias = "GST_RTSP_HDR_PUBLIC")]
Public,
#[doc(alias = "GST_RTSP_HDR_RANGE")]
Range,
#[doc(alias = "GST_RTSP_HDR_REFERER")]
Referer,
#[doc(alias = "GST_RTSP_HDR_REQUIRE")]
Require,
#[doc(alias = "GST_RTSP_HDR_RETRY_AFTER")]
RetryAfter,
#[doc(alias = "GST_RTSP_HDR_RTP_INFO")]
RtpInfo,
#[doc(alias = "GST_RTSP_HDR_SCALE")]
Scale,
#[doc(alias = "GST_RTSP_HDR_SESSION")]
Session,
#[doc(alias = "GST_RTSP_HDR_SERVER")]
Server,
#[doc(alias = "GST_RTSP_HDR_SPEED")]
Speed,
#[doc(alias = "GST_RTSP_HDR_TRANSPORT")]
Transport,
#[doc(alias = "GST_RTSP_HDR_UNSUPPORTED")]
Unsupported,
#[doc(alias = "GST_RTSP_HDR_USER_AGENT")]
UserAgent,
#[doc(alias = "GST_RTSP_HDR_VIA")]
Via,
#[doc(alias = "GST_RTSP_HDR_WWW_AUTHENTICATE")]
WwwAuthenticate,
#[doc(alias = "GST_RTSP_HDR_CLIENT_CHALLENGE")]
ClientChallenge,
#[doc(alias = "GST_RTSP_HDR_REAL_CHALLENGE1")]
RealChallenge1,
#[doc(alias = "GST_RTSP_HDR_REAL_CHALLENGE2")]
RealChallenge2,
#[doc(alias = "GST_RTSP_HDR_REAL_CHALLENGE3")]
RealChallenge3,
#[doc(alias = "GST_RTSP_HDR_SUBSCRIBE")]
Subscribe,
#[doc(alias = "GST_RTSP_HDR_ALERT")]
Alert,
#[doc(alias = "GST_RTSP_HDR_CLIENT_ID")]
ClientId,
#[doc(alias = "GST_RTSP_HDR_COMPANY_ID")]
CompanyId,
#[doc(alias = "GST_RTSP_HDR_GUID")]
Guid,
#[doc(alias = "GST_RTSP_HDR_REGION_DATA")]
RegionData,
#[doc(alias = "GST_RTSP_HDR_MAX_ASM_WIDTH")]
MaxAsmWidth,
#[doc(alias = "GST_RTSP_HDR_LANGUAGE")]
Language,
#[doc(alias = "GST_RTSP_HDR_PLAYER_START_TIME")]
PlayerStartTime,
#[doc(alias = "GST_RTSP_HDR_LOCATION")]
Location,
#[doc(alias = "GST_RTSP_HDR_ETAG")]
Etag,
#[doc(alias = "GST_RTSP_HDR_IF_MATCH")]
IfMatch,
#[doc(alias = "GST_RTSP_HDR_ACCEPT_CHARSET")]
AcceptCharset,
#[doc(alias = "GST_RTSP_HDR_SUPPORTED")]
Supported,
#[doc(alias = "GST_RTSP_HDR_VARY")]
Vary,
#[doc(alias = "GST_RTSP_HDR_X_ACCELERATE_STREAMING")]
XAccelerateStreaming,
#[doc(alias = "GST_RTSP_HDR_X_ACCEPT_AUTHENT")]
XAcceptAuthent,
#[doc(alias = "GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT")]
XAcceptProxyAuthent,
#[doc(alias = "GST_RTSP_HDR_X_BROADCAST_ID")]
XBroadcastId,
#[doc(alias = "GST_RTSP_HDR_X_BURST_STREAMING")]
XBurstStreaming,
#[doc(alias = "GST_RTSP_HDR_X_NOTICE")]
XNotice,
#[doc(alias = "GST_RTSP_HDR_X_PLAYER_LAG_TIME")]
XPlayerLagTime,
#[doc(alias = "GST_RTSP_HDR_X_PLAYLIST")]
XPlaylist,
#[doc(alias = "GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE")]
XPlaylistChangeNotice,
#[doc(alias = "GST_RTSP_HDR_X_PLAYLIST_GEN_ID")]
XPlaylistGenId,
#[doc(alias = "GST_RTSP_HDR_X_PLAYLIST_SEEK_ID")]
XPlaylistSeekId,
#[doc(alias = "GST_RTSP_HDR_X_PROXY_CLIENT_AGENT")]
XProxyClientAgent,
#[doc(alias = "GST_RTSP_HDR_X_PROXY_CLIENT_VERB")]
XProxyClientVerb,
#[doc(alias = "GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE")]
XRecedingPlaylistchange,
#[doc(alias = "GST_RTSP_HDR_X_RTP_INFO")]
XRtpInfo,
#[doc(alias = "GST_RTSP_HDR_X_STARTUPPROFILE")]
XStartupprofile,
#[doc(alias = "GST_RTSP_HDR_TIMESTAMP")]
Timestamp,
#[doc(alias = "GST_RTSP_HDR_AUTHENTICATION_INFO")]
AuthenticationInfo,
#[doc(alias = "GST_RTSP_HDR_HOST")]
Host,
#[doc(alias = "GST_RTSP_HDR_PRAGMA")]
Pragma,
#[doc(alias = "GST_RTSP_HDR_X_SERVER_IP_ADDRESS")]
XServerIpAddress,
#[doc(alias = "GST_RTSP_HDR_X_SESSIONCOOKIE")]
XSessioncookie,
#[doc(alias = "GST_RTSP_HDR_RTCP_INTERVAL")]
RtcpInterval,
#[doc(alias = "GST_RTSP_HDR_KEYMGMT")]
Keymgmt,
#[doc(alias = "GST_RTSP_HDR_PIPELINED_REQUESTS")]
PipelinedRequests,
#[doc(alias = "GST_RTSP_HDR_MEDIA_PROPERTIES")]
MediaProperties,
#[doc(alias = "GST_RTSP_HDR_SEEK_STYLE")]
SeekStyle,
#[doc(alias = "GST_RTSP_HDR_ACCEPT_RANGES")]
AcceptRanges,
#[doc(alias = "GST_RTSP_HDR_FRAMES")]
Frames,
#[doc(alias = "GST_RTSP_HDR_RATE_CONTROL")]
RateControl,
#[doc(alias = "GST_RTSP_HDR_LAST")]
Last,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for RTSPHeaderField {
type GlibType = ffi::GstRTSPHeaderField;
fn into_glib(self) -> ffi::GstRTSPHeaderField {
match self {
Self::Invalid => ffi::GST_RTSP_HDR_INVALID,
Self::Accept => ffi::GST_RTSP_HDR_ACCEPT,
Self::AcceptEncoding => ffi::GST_RTSP_HDR_ACCEPT_ENCODING,
Self::AcceptLanguage => ffi::GST_RTSP_HDR_ACCEPT_LANGUAGE,
Self::Allow => ffi::GST_RTSP_HDR_ALLOW,
Self::Authorization => ffi::GST_RTSP_HDR_AUTHORIZATION,
Self::Bandwidth => ffi::GST_RTSP_HDR_BANDWIDTH,
Self::Blocksize => ffi::GST_RTSP_HDR_BLOCKSIZE,
Self::CacheControl => ffi::GST_RTSP_HDR_CACHE_CONTROL,
Self::Conference => ffi::GST_RTSP_HDR_CONFERENCE,
Self::Connection => ffi::GST_RTSP_HDR_CONNECTION,
Self::ContentBase => ffi::GST_RTSP_HDR_CONTENT_BASE,
Self::ContentEncoding => ffi::GST_RTSP_HDR_CONTENT_ENCODING,
Self::ContentLanguage => ffi::GST_RTSP_HDR_CONTENT_LANGUAGE,
Self::ContentLength => ffi::GST_RTSP_HDR_CONTENT_LENGTH,
Self::ContentLocation => ffi::GST_RTSP_HDR_CONTENT_LOCATION,
Self::ContentType => ffi::GST_RTSP_HDR_CONTENT_TYPE,
Self::Cseq => ffi::GST_RTSP_HDR_CSEQ,
Self::Date => ffi::GST_RTSP_HDR_DATE,
Self::Expires => ffi::GST_RTSP_HDR_EXPIRES,
Self::From => ffi::GST_RTSP_HDR_FROM,
Self::IfModifiedSince => ffi::GST_RTSP_HDR_IF_MODIFIED_SINCE,
Self::LastModified => ffi::GST_RTSP_HDR_LAST_MODIFIED,
Self::ProxyAuthenticate => ffi::GST_RTSP_HDR_PROXY_AUTHENTICATE,
Self::ProxyRequire => ffi::GST_RTSP_HDR_PROXY_REQUIRE,
Self::Public => ffi::GST_RTSP_HDR_PUBLIC,
Self::Range => ffi::GST_RTSP_HDR_RANGE,
Self::Referer => ffi::GST_RTSP_HDR_REFERER,
Self::Require => ffi::GST_RTSP_HDR_REQUIRE,
Self::RetryAfter => ffi::GST_RTSP_HDR_RETRY_AFTER,
Self::RtpInfo => ffi::GST_RTSP_HDR_RTP_INFO,
Self::Scale => ffi::GST_RTSP_HDR_SCALE,
Self::Session => ffi::GST_RTSP_HDR_SESSION,
Self::Server => ffi::GST_RTSP_HDR_SERVER,
Self::Speed => ffi::GST_RTSP_HDR_SPEED,
Self::Transport => ffi::GST_RTSP_HDR_TRANSPORT,
Self::Unsupported => ffi::GST_RTSP_HDR_UNSUPPORTED,
Self::UserAgent => ffi::GST_RTSP_HDR_USER_AGENT,
Self::Via => ffi::GST_RTSP_HDR_VIA,
Self::WwwAuthenticate => ffi::GST_RTSP_HDR_WWW_AUTHENTICATE,
Self::ClientChallenge => ffi::GST_RTSP_HDR_CLIENT_CHALLENGE,
Self::RealChallenge1 => ffi::GST_RTSP_HDR_REAL_CHALLENGE1,
Self::RealChallenge2 => ffi::GST_RTSP_HDR_REAL_CHALLENGE2,
Self::RealChallenge3 => ffi::GST_RTSP_HDR_REAL_CHALLENGE3,
Self::Subscribe => ffi::GST_RTSP_HDR_SUBSCRIBE,
Self::Alert => ffi::GST_RTSP_HDR_ALERT,
Self::ClientId => ffi::GST_RTSP_HDR_CLIENT_ID,
Self::CompanyId => ffi::GST_RTSP_HDR_COMPANY_ID,
Self::Guid => ffi::GST_RTSP_HDR_GUID,
Self::RegionData => ffi::GST_RTSP_HDR_REGION_DATA,
Self::MaxAsmWidth => ffi::GST_RTSP_HDR_MAX_ASM_WIDTH,
Self::Language => ffi::GST_RTSP_HDR_LANGUAGE,
Self::PlayerStartTime => ffi::GST_RTSP_HDR_PLAYER_START_TIME,
Self::Location => ffi::GST_RTSP_HDR_LOCATION,
Self::Etag => ffi::GST_RTSP_HDR_ETAG,
Self::IfMatch => ffi::GST_RTSP_HDR_IF_MATCH,
Self::AcceptCharset => ffi::GST_RTSP_HDR_ACCEPT_CHARSET,
Self::Supported => ffi::GST_RTSP_HDR_SUPPORTED,
Self::Vary => ffi::GST_RTSP_HDR_VARY,
Self::XAccelerateStreaming => ffi::GST_RTSP_HDR_X_ACCELERATE_STREAMING,
Self::XAcceptAuthent => ffi::GST_RTSP_HDR_X_ACCEPT_AUTHENT,
Self::XAcceptProxyAuthent => ffi::GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT,
Self::XBroadcastId => ffi::GST_RTSP_HDR_X_BROADCAST_ID,
Self::XBurstStreaming => ffi::GST_RTSP_HDR_X_BURST_STREAMING,
Self::XNotice => ffi::GST_RTSP_HDR_X_NOTICE,
Self::XPlayerLagTime => ffi::GST_RTSP_HDR_X_PLAYER_LAG_TIME,
Self::XPlaylist => ffi::GST_RTSP_HDR_X_PLAYLIST,
Self::XPlaylistChangeNotice => ffi::GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE,
Self::XPlaylistGenId => ffi::GST_RTSP_HDR_X_PLAYLIST_GEN_ID,
Self::XPlaylistSeekId => ffi::GST_RTSP_HDR_X_PLAYLIST_SEEK_ID,
Self::XProxyClientAgent => ffi::GST_RTSP_HDR_X_PROXY_CLIENT_AGENT,
Self::XProxyClientVerb => ffi::GST_RTSP_HDR_X_PROXY_CLIENT_VERB,
Self::XRecedingPlaylistchange => ffi::GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE,
Self::XRtpInfo => ffi::GST_RTSP_HDR_X_RTP_INFO,
Self::XStartupprofile => ffi::GST_RTSP_HDR_X_STARTUPPROFILE,
Self::Timestamp => ffi::GST_RTSP_HDR_TIMESTAMP,
Self::AuthenticationInfo => ffi::GST_RTSP_HDR_AUTHENTICATION_INFO,
Self::Host => ffi::GST_RTSP_HDR_HOST,
Self::Pragma => ffi::GST_RTSP_HDR_PRAGMA,
Self::XServerIpAddress => ffi::GST_RTSP_HDR_X_SERVER_IP_ADDRESS,
Self::XSessioncookie => ffi::GST_RTSP_HDR_X_SESSIONCOOKIE,
Self::RtcpInterval => ffi::GST_RTSP_HDR_RTCP_INTERVAL,
Self::Keymgmt => ffi::GST_RTSP_HDR_KEYMGMT,
Self::PipelinedRequests => ffi::GST_RTSP_HDR_PIPELINED_REQUESTS,
Self::MediaProperties => ffi::GST_RTSP_HDR_MEDIA_PROPERTIES,
Self::SeekStyle => ffi::GST_RTSP_HDR_SEEK_STYLE,
Self::AcceptRanges => ffi::GST_RTSP_HDR_ACCEPT_RANGES,
Self::Frames => ffi::GST_RTSP_HDR_FRAMES,
Self::RateControl => ffi::GST_RTSP_HDR_RATE_CONTROL,
Self::Last => ffi::GST_RTSP_HDR_LAST,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstRTSPHeaderField> for RTSPHeaderField {
unsafe fn from_glib(value: ffi::GstRTSPHeaderField) -> Self {
skip_assert_initialized!();
match value {
ffi::GST_RTSP_HDR_INVALID => Self::Invalid,
ffi::GST_RTSP_HDR_ACCEPT => Self::Accept,
ffi::GST_RTSP_HDR_ACCEPT_ENCODING => Self::AcceptEncoding,
ffi::GST_RTSP_HDR_ACCEPT_LANGUAGE => Self::AcceptLanguage,
ffi::GST_RTSP_HDR_ALLOW => Self::Allow,
ffi::GST_RTSP_HDR_AUTHORIZATION => Self::Authorization,
ffi::GST_RTSP_HDR_BANDWIDTH => Self::Bandwidth,
ffi::GST_RTSP_HDR_BLOCKSIZE => Self::Blocksize,
ffi::GST_RTSP_HDR_CACHE_CONTROL => Self::CacheControl,
ffi::GST_RTSP_HDR_CONFERENCE => Self::Conference,
ffi::GST_RTSP_HDR_CONNECTION => Self::Connection,
ffi::GST_RTSP_HDR_CONTENT_BASE => Self::ContentBase,
ffi::GST_RTSP_HDR_CONTENT_ENCODING => Self::ContentEncoding,
ffi::GST_RTSP_HDR_CONTENT_LANGUAGE => Self::ContentLanguage,
ffi::GST_RTSP_HDR_CONTENT_LENGTH => Self::ContentLength,
ffi::GST_RTSP_HDR_CONTENT_LOCATION => Self::ContentLocation,
ffi::GST_RTSP_HDR_CONTENT_TYPE => Self::ContentType,
ffi::GST_RTSP_HDR_CSEQ => Self::Cseq,
ffi::GST_RTSP_HDR_DATE => Self::Date,
ffi::GST_RTSP_HDR_EXPIRES => Self::Expires,
ffi::GST_RTSP_HDR_FROM => Self::From,
ffi::GST_RTSP_HDR_IF_MODIFIED_SINCE => Self::IfModifiedSince,
ffi::GST_RTSP_HDR_LAST_MODIFIED => Self::LastModified,
ffi::GST_RTSP_HDR_PROXY_AUTHENTICATE => Self::ProxyAuthenticate,
ffi::GST_RTSP_HDR_PROXY_REQUIRE => Self::ProxyRequire,
ffi::GST_RTSP_HDR_PUBLIC => Self::Public,
ffi::GST_RTSP_HDR_RANGE => Self::Range,
ffi::GST_RTSP_HDR_REFERER => Self::Referer,
ffi::GST_RTSP_HDR_REQUIRE => Self::Require,
ffi::GST_RTSP_HDR_RETRY_AFTER => Self::RetryAfter,
ffi::GST_RTSP_HDR_RTP_INFO => Self::RtpInfo,
ffi::GST_RTSP_HDR_SCALE => Self::Scale,
ffi::GST_RTSP_HDR_SESSION => Self::Session,
ffi::GST_RTSP_HDR_SERVER => Self::Server,
ffi::GST_RTSP_HDR_SPEED => Self::Speed,
ffi::GST_RTSP_HDR_TRANSPORT => Self::Transport,
ffi::GST_RTSP_HDR_UNSUPPORTED => Self::Unsupported,
ffi::GST_RTSP_HDR_USER_AGENT => Self::UserAgent,
ffi::GST_RTSP_HDR_VIA => Self::Via,
ffi::GST_RTSP_HDR_WWW_AUTHENTICATE => Self::WwwAuthenticate,
ffi::GST_RTSP_HDR_CLIENT_CHALLENGE => Self::ClientChallenge,
ffi::GST_RTSP_HDR_REAL_CHALLENGE1 => Self::RealChallenge1,
ffi::GST_RTSP_HDR_REAL_CHALLENGE2 => Self::RealChallenge2,
ffi::GST_RTSP_HDR_REAL_CHALLENGE3 => Self::RealChallenge3,
ffi::GST_RTSP_HDR_SUBSCRIBE => Self::Subscribe,
ffi::GST_RTSP_HDR_ALERT => Self::Alert,
ffi::GST_RTSP_HDR_CLIENT_ID => Self::ClientId,
ffi::GST_RTSP_HDR_COMPANY_ID => Self::CompanyId,
ffi::GST_RTSP_HDR_GUID => Self::Guid,
ffi::GST_RTSP_HDR_REGION_DATA => Self::RegionData,
ffi::GST_RTSP_HDR_MAX_ASM_WIDTH => Self::MaxAsmWidth,
ffi::GST_RTSP_HDR_LANGUAGE => Self::Language,
ffi::GST_RTSP_HDR_PLAYER_START_TIME => Self::PlayerStartTime,
ffi::GST_RTSP_HDR_LOCATION => Self::Location,
ffi::GST_RTSP_HDR_ETAG => Self::Etag,
ffi::GST_RTSP_HDR_IF_MATCH => Self::IfMatch,
ffi::GST_RTSP_HDR_ACCEPT_CHARSET => Self::AcceptCharset,
ffi::GST_RTSP_HDR_SUPPORTED => Self::Supported,
ffi::GST_RTSP_HDR_VARY => Self::Vary,
ffi::GST_RTSP_HDR_X_ACCELERATE_STREAMING => Self::XAccelerateStreaming,
ffi::GST_RTSP_HDR_X_ACCEPT_AUTHENT => Self::XAcceptAuthent,
ffi::GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT => Self::XAcceptProxyAuthent,
ffi::GST_RTSP_HDR_X_BROADCAST_ID => Self::XBroadcastId,
ffi::GST_RTSP_HDR_X_BURST_STREAMING => Self::XBurstStreaming,
ffi::GST_RTSP_HDR_X_NOTICE => Self::XNotice,
ffi::GST_RTSP_HDR_X_PLAYER_LAG_TIME => Self::XPlayerLagTime,
ffi::GST_RTSP_HDR_X_PLAYLIST => Self::XPlaylist,
ffi::GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE => Self::XPlaylistChangeNotice,
ffi::GST_RTSP_HDR_X_PLAYLIST_GEN_ID => Self::XPlaylistGenId,
ffi::GST_RTSP_HDR_X_PLAYLIST_SEEK_ID => Self::XPlaylistSeekId,
ffi::GST_RTSP_HDR_X_PROXY_CLIENT_AGENT => Self::XProxyClientAgent,
ffi::GST_RTSP_HDR_X_PROXY_CLIENT_VERB => Self::XProxyClientVerb,
ffi::GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE => Self::XRecedingPlaylistchange,
ffi::GST_RTSP_HDR_X_RTP_INFO => Self::XRtpInfo,
ffi::GST_RTSP_HDR_X_STARTUPPROFILE => Self::XStartupprofile,
ffi::GST_RTSP_HDR_TIMESTAMP => Self::Timestamp,
ffi::GST_RTSP_HDR_AUTHENTICATION_INFO => Self::AuthenticationInfo,
ffi::GST_RTSP_HDR_HOST => Self::Host,
ffi::GST_RTSP_HDR_PRAGMA => Self::Pragma,
ffi::GST_RTSP_HDR_X_SERVER_IP_ADDRESS => Self::XServerIpAddress,
ffi::GST_RTSP_HDR_X_SESSIONCOOKIE => Self::XSessioncookie,
ffi::GST_RTSP_HDR_RTCP_INTERVAL => Self::RtcpInterval,
ffi::GST_RTSP_HDR_KEYMGMT => Self::Keymgmt,
ffi::GST_RTSP_HDR_PIPELINED_REQUESTS => Self::PipelinedRequests,
ffi::GST_RTSP_HDR_MEDIA_PROPERTIES => Self::MediaProperties,
ffi::GST_RTSP_HDR_SEEK_STYLE => Self::SeekStyle,
ffi::GST_RTSP_HDR_ACCEPT_RANGES => Self::AcceptRanges,
ffi::GST_RTSP_HDR_FRAMES => Self::Frames,
ffi::GST_RTSP_HDR_RATE_CONTROL => Self::RateControl,
ffi::GST_RTSP_HDR_LAST => Self::Last,
value => Self::__Unknown(value),
}
}
}
impl StaticType for RTSPHeaderField {
#[inline]
#[doc(alias = "gst_rtsp_header_field_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_rtsp_header_field_get_type()) }
}
}
impl glib::HasParamSpec for RTSPHeaderField {
type ParamSpec = glib::ParamSpecEnum;
type SetValue = Self;
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for RTSPHeaderField {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for RTSPHeaderField {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
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 RTSPHeaderField {
#[inline]
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
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<RTSPHeaderField> for glib::Value {
#[inline]
fn from(v: RTSPHeaderField) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstRTSPMsgType")]
pub enum RTSPMsgType {
#[doc(alias = "GST_RTSP_MESSAGE_INVALID")]
Invalid,
#[doc(alias = "GST_RTSP_MESSAGE_REQUEST")]
Request,
#[doc(alias = "GST_RTSP_MESSAGE_RESPONSE")]
Response,
#[doc(alias = "GST_RTSP_MESSAGE_HTTP_REQUEST")]
HttpRequest,
#[doc(alias = "GST_RTSP_MESSAGE_HTTP_RESPONSE")]
HttpResponse,
#[doc(alias = "GST_RTSP_MESSAGE_DATA")]
Data,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for RTSPMsgType {
type GlibType = ffi::GstRTSPMsgType;
#[inline]
fn into_glib(self) -> ffi::GstRTSPMsgType {
match self {
Self::Invalid => ffi::GST_RTSP_MESSAGE_INVALID,
Self::Request => ffi::GST_RTSP_MESSAGE_REQUEST,
Self::Response => ffi::GST_RTSP_MESSAGE_RESPONSE,
Self::HttpRequest => ffi::GST_RTSP_MESSAGE_HTTP_REQUEST,
Self::HttpResponse => ffi::GST_RTSP_MESSAGE_HTTP_RESPONSE,
Self::Data => ffi::GST_RTSP_MESSAGE_DATA,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstRTSPMsgType> for RTSPMsgType {
#[inline]
unsafe fn from_glib(value: ffi::GstRTSPMsgType) -> Self {
skip_assert_initialized!();
match value {
ffi::GST_RTSP_MESSAGE_INVALID => Self::Invalid,
ffi::GST_RTSP_MESSAGE_REQUEST => Self::Request,
ffi::GST_RTSP_MESSAGE_RESPONSE => Self::Response,
ffi::GST_RTSP_MESSAGE_HTTP_REQUEST => Self::HttpRequest,
ffi::GST_RTSP_MESSAGE_HTTP_RESPONSE => Self::HttpResponse,
ffi::GST_RTSP_MESSAGE_DATA => Self::Data,
value => Self::__Unknown(value),
}
}
}
impl StaticType for RTSPMsgType {
#[inline]
#[doc(alias = "gst_rtsp_msg_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_rtsp_msg_type_get_type()) }
}
}
impl glib::HasParamSpec for RTSPMsgType {
type ParamSpec = glib::ParamSpecEnum;
type SetValue = Self;
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for RTSPMsgType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for RTSPMsgType {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
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 RTSPMsgType {
#[inline]
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
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<RTSPMsgType> for glib::Value {
#[inline]
fn from(v: RTSPMsgType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstRTSPRangeUnit")]
pub enum RTSPRangeUnit {
#[doc(alias = "GST_RTSP_RANGE_SMPTE")]
Smpte,
#[doc(alias = "GST_RTSP_RANGE_SMPTE_30_DROP")]
Smpte30Drop,
#[doc(alias = "GST_RTSP_RANGE_SMPTE_25")]
Smpte25,
#[doc(alias = "GST_RTSP_RANGE_NPT")]
Npt,
#[doc(alias = "GST_RTSP_RANGE_CLOCK")]
Clock,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for RTSPRangeUnit {
type GlibType = ffi::GstRTSPRangeUnit;
#[inline]
fn into_glib(self) -> ffi::GstRTSPRangeUnit {
match self {
Self::Smpte => ffi::GST_RTSP_RANGE_SMPTE,
Self::Smpte30Drop => ffi::GST_RTSP_RANGE_SMPTE_30_DROP,
Self::Smpte25 => ffi::GST_RTSP_RANGE_SMPTE_25,
Self::Npt => ffi::GST_RTSP_RANGE_NPT,
Self::Clock => ffi::GST_RTSP_RANGE_CLOCK,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstRTSPRangeUnit> for RTSPRangeUnit {
#[inline]
unsafe fn from_glib(value: ffi::GstRTSPRangeUnit) -> Self {
skip_assert_initialized!();
match value {
ffi::GST_RTSP_RANGE_SMPTE => Self::Smpte,
ffi::GST_RTSP_RANGE_SMPTE_30_DROP => Self::Smpte30Drop,
ffi::GST_RTSP_RANGE_SMPTE_25 => Self::Smpte25,
ffi::GST_RTSP_RANGE_NPT => Self::Npt,
ffi::GST_RTSP_RANGE_CLOCK => Self::Clock,
value => Self::__Unknown(value),
}
}
}
impl StaticType for RTSPRangeUnit {
#[inline]
#[doc(alias = "gst_rtsp_range_unit_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_rtsp_range_unit_get_type()) }
}
}
impl glib::HasParamSpec for RTSPRangeUnit {
type ParamSpec = glib::ParamSpecEnum;
type SetValue = Self;
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for RTSPRangeUnit {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for RTSPRangeUnit {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
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 RTSPRangeUnit {
#[inline]
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
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<RTSPRangeUnit> for glib::Value {
#[inline]
fn from(v: RTSPRangeUnit) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstRTSPResult")]
pub enum RTSPResult {
#[doc(alias = "GST_RTSP_OK")]
Ok,
#[cfg(feature = "v1_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
#[doc(alias = "GST_RTSP_OK_REDIRECT")]
OkRedirect,
#[doc(alias = "GST_RTSP_ERROR")]
Error,
#[doc(alias = "GST_RTSP_EINVAL")]
Einval,
#[doc(alias = "GST_RTSP_EINTR")]
Eintr,
#[doc(alias = "GST_RTSP_ENOMEM")]
Enomem,
#[doc(alias = "GST_RTSP_ERESOLV")]
Eresolv,
#[doc(alias = "GST_RTSP_ENOTIMPL")]
Enotimpl,
#[doc(alias = "GST_RTSP_ESYS")]
Esys,
#[doc(alias = "GST_RTSP_EPARSE")]
Eparse,
#[doc(alias = "GST_RTSP_EWSASTART")]
Ewsastart,
#[doc(alias = "GST_RTSP_EWSAVERSION")]
Ewsaversion,
#[doc(alias = "GST_RTSP_EEOF")]
Eeof,
#[doc(alias = "GST_RTSP_ENET")]
Enet,
#[doc(alias = "GST_RTSP_ENOTIP")]
Enotip,
#[doc(alias = "GST_RTSP_ETIMEOUT")]
Etimeout,
#[doc(alias = "GST_RTSP_ETGET")]
Etget,
#[doc(alias = "GST_RTSP_ETPOST")]
Etpost,
#[doc(alias = "GST_RTSP_ELAST")]
Elast,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for RTSPResult {
type GlibType = ffi::GstRTSPResult;
fn into_glib(self) -> ffi::GstRTSPResult {
match self {
Self::Ok => ffi::GST_RTSP_OK,
#[cfg(feature = "v1_24")]
Self::OkRedirect => ffi::GST_RTSP_OK_REDIRECT,
Self::Error => ffi::GST_RTSP_ERROR,
Self::Einval => ffi::GST_RTSP_EINVAL,
Self::Eintr => ffi::GST_RTSP_EINTR,
Self::Enomem => ffi::GST_RTSP_ENOMEM,
Self::Eresolv => ffi::GST_RTSP_ERESOLV,
Self::Enotimpl => ffi::GST_RTSP_ENOTIMPL,
Self::Esys => ffi::GST_RTSP_ESYS,
Self::Eparse => ffi::GST_RTSP_EPARSE,
Self::Ewsastart => ffi::GST_RTSP_EWSASTART,
Self::Ewsaversion => ffi::GST_RTSP_EWSAVERSION,
Self::Eeof => ffi::GST_RTSP_EEOF,
Self::Enet => ffi::GST_RTSP_ENET,
Self::Enotip => ffi::GST_RTSP_ENOTIP,
Self::Etimeout => ffi::GST_RTSP_ETIMEOUT,
Self::Etget => ffi::GST_RTSP_ETGET,
Self::Etpost => ffi::GST_RTSP_ETPOST,
Self::Elast => ffi::GST_RTSP_ELAST,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstRTSPResult> for RTSPResult {
unsafe fn from_glib(value: ffi::GstRTSPResult) -> Self {
skip_assert_initialized!();
match value {
ffi::GST_RTSP_OK => Self::Ok,
#[cfg(feature = "v1_24")]
ffi::GST_RTSP_OK_REDIRECT => Self::OkRedirect,
ffi::GST_RTSP_ERROR => Self::Error,
ffi::GST_RTSP_EINVAL => Self::Einval,
ffi::GST_RTSP_EINTR => Self::Eintr,
ffi::GST_RTSP_ENOMEM => Self::Enomem,
ffi::GST_RTSP_ERESOLV => Self::Eresolv,
ffi::GST_RTSP_ENOTIMPL => Self::Enotimpl,
ffi::GST_RTSP_ESYS => Self::Esys,
ffi::GST_RTSP_EPARSE => Self::Eparse,
ffi::GST_RTSP_EWSASTART => Self::Ewsastart,
ffi::GST_RTSP_EWSAVERSION => Self::Ewsaversion,
ffi::GST_RTSP_EEOF => Self::Eeof,
ffi::GST_RTSP_ENET => Self::Enet,
ffi::GST_RTSP_ENOTIP => Self::Enotip,
ffi::GST_RTSP_ETIMEOUT => Self::Etimeout,
ffi::GST_RTSP_ETGET => Self::Etget,
ffi::GST_RTSP_ETPOST => Self::Etpost,
ffi::GST_RTSP_ELAST => Self::Elast,
value => Self::__Unknown(value),
}
}
}
impl StaticType for RTSPResult {
#[inline]
#[doc(alias = "gst_rtsp_result_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_rtsp_result_get_type()) }
}
}
impl glib::HasParamSpec for RTSPResult {
type ParamSpec = glib::ParamSpecEnum;
type SetValue = Self;
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for RTSPResult {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for RTSPResult {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
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 RTSPResult {
#[inline]
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
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<RTSPResult> for glib::Value {
#[inline]
fn from(v: RTSPResult) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstRTSPState")]
pub enum RTSPState {
#[doc(alias = "GST_RTSP_STATE_INVALID")]
Invalid,
#[doc(alias = "GST_RTSP_STATE_INIT")]
Init,
#[doc(alias = "GST_RTSP_STATE_READY")]
Ready,
#[doc(alias = "GST_RTSP_STATE_SEEKING")]
Seeking,
#[doc(alias = "GST_RTSP_STATE_PLAYING")]
Playing,
#[doc(alias = "GST_RTSP_STATE_RECORDING")]
Recording,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for RTSPState {
type GlibType = ffi::GstRTSPState;
#[inline]
fn into_glib(self) -> ffi::GstRTSPState {
match self {
Self::Invalid => ffi::GST_RTSP_STATE_INVALID,
Self::Init => ffi::GST_RTSP_STATE_INIT,
Self::Ready => ffi::GST_RTSP_STATE_READY,
Self::Seeking => ffi::GST_RTSP_STATE_SEEKING,
Self::Playing => ffi::GST_RTSP_STATE_PLAYING,
Self::Recording => ffi::GST_RTSP_STATE_RECORDING,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstRTSPState> for RTSPState {
#[inline]
unsafe fn from_glib(value: ffi::GstRTSPState) -> Self {
skip_assert_initialized!();
match value {
ffi::GST_RTSP_STATE_INVALID => Self::Invalid,
ffi::GST_RTSP_STATE_INIT => Self::Init,
ffi::GST_RTSP_STATE_READY => Self::Ready,
ffi::GST_RTSP_STATE_SEEKING => Self::Seeking,
ffi::GST_RTSP_STATE_PLAYING => Self::Playing,
ffi::GST_RTSP_STATE_RECORDING => Self::Recording,
value => Self::__Unknown(value),
}
}
}
impl StaticType for RTSPState {
#[inline]
#[doc(alias = "gst_rtsp_state_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_rtsp_state_get_type()) }
}
}
impl glib::HasParamSpec for RTSPState {
type ParamSpec = glib::ParamSpecEnum;
type SetValue = Self;
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for RTSPState {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for RTSPState {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
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 RTSPState {
#[inline]
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
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<RTSPState> for glib::Value {
#[inline]
fn from(v: RTSPState) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstRTSPStatusCode")]
pub enum RTSPStatusCode {
#[doc(alias = "GST_RTSP_STS_INVALID")]
Invalid,
#[doc(alias = "GST_RTSP_STS_CONTINUE")]
Continue,
#[doc(alias = "GST_RTSP_STS_OK")]
Ok,
#[doc(alias = "GST_RTSP_STS_CREATED")]
Created,
#[doc(alias = "GST_RTSP_STS_LOW_ON_STORAGE")]
LowOnStorage,
#[doc(alias = "GST_RTSP_STS_MULTIPLE_CHOICES")]
MultipleChoices,
#[doc(alias = "GST_RTSP_STS_MOVED_PERMANENTLY")]
MovedPermanently,
#[doc(alias = "GST_RTSP_STS_MOVE_TEMPORARILY")]
MoveTemporarily,
#[doc(alias = "GST_RTSP_STS_SEE_OTHER")]
SeeOther,
#[doc(alias = "GST_RTSP_STS_NOT_MODIFIED")]
NotModified,
#[doc(alias = "GST_RTSP_STS_USE_PROXY")]
UseProxy,
#[cfg(feature = "v1_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
#[doc(alias = "GST_RTSP_STS_REDIRECT_TEMPORARILY")]
RedirectTemporarily,
#[cfg(feature = "v1_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
#[doc(alias = "GST_RTSP_STS_REDIRECT_PERMANENTLY")]
RedirectPermanently,
#[doc(alias = "GST_RTSP_STS_BAD_REQUEST")]
BadRequest,
#[doc(alias = "GST_RTSP_STS_UNAUTHORIZED")]
Unauthorized,
#[doc(alias = "GST_RTSP_STS_PAYMENT_REQUIRED")]
PaymentRequired,
#[doc(alias = "GST_RTSP_STS_FORBIDDEN")]
Forbidden,
#[doc(alias = "GST_RTSP_STS_NOT_FOUND")]
NotFound,
#[doc(alias = "GST_RTSP_STS_METHOD_NOT_ALLOWED")]
MethodNotAllowed,
#[doc(alias = "GST_RTSP_STS_NOT_ACCEPTABLE")]
NotAcceptable,
#[doc(alias = "GST_RTSP_STS_PROXY_AUTH_REQUIRED")]
ProxyAuthRequired,
#[doc(alias = "GST_RTSP_STS_REQUEST_TIMEOUT")]
RequestTimeout,
#[doc(alias = "GST_RTSP_STS_GONE")]
Gone,
#[doc(alias = "GST_RTSP_STS_LENGTH_REQUIRED")]
LengthRequired,
#[doc(alias = "GST_RTSP_STS_PRECONDITION_FAILED")]
PreconditionFailed,
#[doc(alias = "GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE")]
RequestEntityTooLarge,
#[doc(alias = "GST_RTSP_STS_REQUEST_URI_TOO_LARGE")]
RequestUriTooLarge,
#[doc(alias = "GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE")]
UnsupportedMediaType,
#[doc(alias = "GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD")]
ParameterNotUnderstood,
#[doc(alias = "GST_RTSP_STS_CONFERENCE_NOT_FOUND")]
ConferenceNotFound,
#[doc(alias = "GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH")]
NotEnoughBandwidth,
#[doc(alias = "GST_RTSP_STS_SESSION_NOT_FOUND")]
SessionNotFound,
#[doc(alias = "GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE")]
MethodNotValidInThisState,
#[doc(alias = "GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE")]
HeaderFieldNotValidForResource,
#[doc(alias = "GST_RTSP_STS_INVALID_RANGE")]
InvalidRange,
#[doc(alias = "GST_RTSP_STS_PARAMETER_IS_READONLY")]
ParameterIsReadonly,
#[doc(alias = "GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED")]
AggregateOperationNotAllowed,
#[doc(alias = "GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED")]
OnlyAggregateOperationAllowed,
#[doc(alias = "GST_RTSP_STS_UNSUPPORTED_TRANSPORT")]
UnsupportedTransport,
#[doc(alias = "GST_RTSP_STS_DESTINATION_UNREACHABLE")]
DestinationUnreachable,
#[doc(alias = "GST_RTSP_STS_KEY_MANAGEMENT_FAILURE")]
KeyManagementFailure,
#[doc(alias = "GST_RTSP_STS_INTERNAL_SERVER_ERROR")]
InternalServerError,
#[doc(alias = "GST_RTSP_STS_NOT_IMPLEMENTED")]
NotImplemented,
#[doc(alias = "GST_RTSP_STS_BAD_GATEWAY")]
BadGateway,
#[doc(alias = "GST_RTSP_STS_SERVICE_UNAVAILABLE")]
ServiceUnavailable,
#[doc(alias = "GST_RTSP_STS_GATEWAY_TIMEOUT")]
GatewayTimeout,
#[doc(alias = "GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED")]
RtspVersionNotSupported,
#[doc(alias = "GST_RTSP_STS_OPTION_NOT_SUPPORTED")]
OptionNotSupported,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for RTSPStatusCode {
type GlibType = ffi::GstRTSPStatusCode;
fn into_glib(self) -> ffi::GstRTSPStatusCode {
match self {
Self::Invalid => ffi::GST_RTSP_STS_INVALID,
Self::Continue => ffi::GST_RTSP_STS_CONTINUE,
Self::Ok => ffi::GST_RTSP_STS_OK,
Self::Created => ffi::GST_RTSP_STS_CREATED,
Self::LowOnStorage => ffi::GST_RTSP_STS_LOW_ON_STORAGE,
Self::MultipleChoices => ffi::GST_RTSP_STS_MULTIPLE_CHOICES,
Self::MovedPermanently => ffi::GST_RTSP_STS_MOVED_PERMANENTLY,
Self::MoveTemporarily => ffi::GST_RTSP_STS_MOVE_TEMPORARILY,
Self::SeeOther => ffi::GST_RTSP_STS_SEE_OTHER,
Self::NotModified => ffi::GST_RTSP_STS_NOT_MODIFIED,
Self::UseProxy => ffi::GST_RTSP_STS_USE_PROXY,
#[cfg(feature = "v1_24")]
Self::RedirectTemporarily => ffi::GST_RTSP_STS_REDIRECT_TEMPORARILY,
#[cfg(feature = "v1_24")]
Self::RedirectPermanently => ffi::GST_RTSP_STS_REDIRECT_PERMANENTLY,
Self::BadRequest => ffi::GST_RTSP_STS_BAD_REQUEST,
Self::Unauthorized => ffi::GST_RTSP_STS_UNAUTHORIZED,
Self::PaymentRequired => ffi::GST_RTSP_STS_PAYMENT_REQUIRED,
Self::Forbidden => ffi::GST_RTSP_STS_FORBIDDEN,
Self::NotFound => ffi::GST_RTSP_STS_NOT_FOUND,
Self::MethodNotAllowed => ffi::GST_RTSP_STS_METHOD_NOT_ALLOWED,
Self::NotAcceptable => ffi::GST_RTSP_STS_NOT_ACCEPTABLE,
Self::ProxyAuthRequired => ffi::GST_RTSP_STS_PROXY_AUTH_REQUIRED,
Self::RequestTimeout => ffi::GST_RTSP_STS_REQUEST_TIMEOUT,
Self::Gone => ffi::GST_RTSP_STS_GONE,
Self::LengthRequired => ffi::GST_RTSP_STS_LENGTH_REQUIRED,
Self::PreconditionFailed => ffi::GST_RTSP_STS_PRECONDITION_FAILED,
Self::RequestEntityTooLarge => ffi::GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE,
Self::RequestUriTooLarge => ffi::GST_RTSP_STS_REQUEST_URI_TOO_LARGE,
Self::UnsupportedMediaType => ffi::GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE,
Self::ParameterNotUnderstood => ffi::GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD,
Self::ConferenceNotFound => ffi::GST_RTSP_STS_CONFERENCE_NOT_FOUND,
Self::NotEnoughBandwidth => ffi::GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH,
Self::SessionNotFound => ffi::GST_RTSP_STS_SESSION_NOT_FOUND,
Self::MethodNotValidInThisState => ffi::GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE,
Self::HeaderFieldNotValidForResource => {
ffi::GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE
}
Self::InvalidRange => ffi::GST_RTSP_STS_INVALID_RANGE,
Self::ParameterIsReadonly => ffi::GST_RTSP_STS_PARAMETER_IS_READONLY,
Self::AggregateOperationNotAllowed => ffi::GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED,
Self::OnlyAggregateOperationAllowed => {
ffi::GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED
}
Self::UnsupportedTransport => ffi::GST_RTSP_STS_UNSUPPORTED_TRANSPORT,
Self::DestinationUnreachable => ffi::GST_RTSP_STS_DESTINATION_UNREACHABLE,
Self::KeyManagementFailure => ffi::GST_RTSP_STS_KEY_MANAGEMENT_FAILURE,
Self::InternalServerError => ffi::GST_RTSP_STS_INTERNAL_SERVER_ERROR,
Self::NotImplemented => ffi::GST_RTSP_STS_NOT_IMPLEMENTED,
Self::BadGateway => ffi::GST_RTSP_STS_BAD_GATEWAY,
Self::ServiceUnavailable => ffi::GST_RTSP_STS_SERVICE_UNAVAILABLE,
Self::GatewayTimeout => ffi::GST_RTSP_STS_GATEWAY_TIMEOUT,
Self::RtspVersionNotSupported => ffi::GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED,
Self::OptionNotSupported => ffi::GST_RTSP_STS_OPTION_NOT_SUPPORTED,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstRTSPStatusCode> for RTSPStatusCode {
unsafe fn from_glib(value: ffi::GstRTSPStatusCode) -> Self {
skip_assert_initialized!();
match value {
ffi::GST_RTSP_STS_INVALID => Self::Invalid,
ffi::GST_RTSP_STS_CONTINUE => Self::Continue,
ffi::GST_RTSP_STS_OK => Self::Ok,
ffi::GST_RTSP_STS_CREATED => Self::Created,
ffi::GST_RTSP_STS_LOW_ON_STORAGE => Self::LowOnStorage,
ffi::GST_RTSP_STS_MULTIPLE_CHOICES => Self::MultipleChoices,
ffi::GST_RTSP_STS_MOVED_PERMANENTLY => Self::MovedPermanently,
ffi::GST_RTSP_STS_MOVE_TEMPORARILY => Self::MoveTemporarily,
ffi::GST_RTSP_STS_SEE_OTHER => Self::SeeOther,
ffi::GST_RTSP_STS_NOT_MODIFIED => Self::NotModified,
ffi::GST_RTSP_STS_USE_PROXY => Self::UseProxy,
#[cfg(feature = "v1_24")]
ffi::GST_RTSP_STS_REDIRECT_TEMPORARILY => Self::RedirectTemporarily,
#[cfg(feature = "v1_24")]
ffi::GST_RTSP_STS_REDIRECT_PERMANENTLY => Self::RedirectPermanently,
ffi::GST_RTSP_STS_BAD_REQUEST => Self::BadRequest,
ffi::GST_RTSP_STS_UNAUTHORIZED => Self::Unauthorized,
ffi::GST_RTSP_STS_PAYMENT_REQUIRED => Self::PaymentRequired,
ffi::GST_RTSP_STS_FORBIDDEN => Self::Forbidden,
ffi::GST_RTSP_STS_NOT_FOUND => Self::NotFound,
ffi::GST_RTSP_STS_METHOD_NOT_ALLOWED => Self::MethodNotAllowed,
ffi::GST_RTSP_STS_NOT_ACCEPTABLE => Self::NotAcceptable,
ffi::GST_RTSP_STS_PROXY_AUTH_REQUIRED => Self::ProxyAuthRequired,
ffi::GST_RTSP_STS_REQUEST_TIMEOUT => Self::RequestTimeout,
ffi::GST_RTSP_STS_GONE => Self::Gone,
ffi::GST_RTSP_STS_LENGTH_REQUIRED => Self::LengthRequired,
ffi::GST_RTSP_STS_PRECONDITION_FAILED => Self::PreconditionFailed,
ffi::GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE => Self::RequestEntityTooLarge,
ffi::GST_RTSP_STS_REQUEST_URI_TOO_LARGE => Self::RequestUriTooLarge,
ffi::GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE => Self::UnsupportedMediaType,
ffi::GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD => Self::ParameterNotUnderstood,
ffi::GST_RTSP_STS_CONFERENCE_NOT_FOUND => Self::ConferenceNotFound,
ffi::GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH => Self::NotEnoughBandwidth,
ffi::GST_RTSP_STS_SESSION_NOT_FOUND => Self::SessionNotFound,
ffi::GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE => Self::MethodNotValidInThisState,
ffi::GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE => {
Self::HeaderFieldNotValidForResource
}
ffi::GST_RTSP_STS_INVALID_RANGE => Self::InvalidRange,
ffi::GST_RTSP_STS_PARAMETER_IS_READONLY => Self::ParameterIsReadonly,
ffi::GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED => Self::AggregateOperationNotAllowed,
ffi::GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED => {
Self::OnlyAggregateOperationAllowed
}
ffi::GST_RTSP_STS_UNSUPPORTED_TRANSPORT => Self::UnsupportedTransport,
ffi::GST_RTSP_STS_DESTINATION_UNREACHABLE => Self::DestinationUnreachable,
ffi::GST_RTSP_STS_KEY_MANAGEMENT_FAILURE => Self::KeyManagementFailure,
ffi::GST_RTSP_STS_INTERNAL_SERVER_ERROR => Self::InternalServerError,
ffi::GST_RTSP_STS_NOT_IMPLEMENTED => Self::NotImplemented,
ffi::GST_RTSP_STS_BAD_GATEWAY => Self::BadGateway,
ffi::GST_RTSP_STS_SERVICE_UNAVAILABLE => Self::ServiceUnavailable,
ffi::GST_RTSP_STS_GATEWAY_TIMEOUT => Self::GatewayTimeout,
ffi::GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED => Self::RtspVersionNotSupported,
ffi::GST_RTSP_STS_OPTION_NOT_SUPPORTED => Self::OptionNotSupported,
value => Self::__Unknown(value),
}
}
}
impl StaticType for RTSPStatusCode {
#[inline]
#[doc(alias = "gst_rtsp_status_code_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_rtsp_status_code_get_type()) }
}
}
impl glib::HasParamSpec for RTSPStatusCode {
type ParamSpec = glib::ParamSpecEnum;
type SetValue = Self;
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for RTSPStatusCode {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for RTSPStatusCode {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
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 RTSPStatusCode {
#[inline]
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
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<RTSPStatusCode> for glib::Value {
#[inline]
fn from(v: RTSPStatusCode) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "GstRTSPTimeType")]
pub enum RTSPTimeType {
#[doc(alias = "GST_RTSP_TIME_SECONDS")]
Seconds,
#[doc(alias = "GST_RTSP_TIME_NOW")]
Now,
#[doc(alias = "GST_RTSP_TIME_END")]
End,
#[doc(alias = "GST_RTSP_TIME_FRAMES")]
Frames,
#[doc(alias = "GST_RTSP_TIME_UTC")]
Utc,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for RTSPTimeType {
type GlibType = ffi::GstRTSPTimeType;
#[inline]
fn into_glib(self) -> ffi::GstRTSPTimeType {
match self {
Self::Seconds => ffi::GST_RTSP_TIME_SECONDS,
Self::Now => ffi::GST_RTSP_TIME_NOW,
Self::End => ffi::GST_RTSP_TIME_END,
Self::Frames => ffi::GST_RTSP_TIME_FRAMES,
Self::Utc => ffi::GST_RTSP_TIME_UTC,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstRTSPTimeType> for RTSPTimeType {
#[inline]
unsafe fn from_glib(value: ffi::GstRTSPTimeType) -> Self {
skip_assert_initialized!();
match value {
ffi::GST_RTSP_TIME_SECONDS => Self::Seconds,
ffi::GST_RTSP_TIME_NOW => Self::Now,
ffi::GST_RTSP_TIME_END => Self::End,
ffi::GST_RTSP_TIME_FRAMES => Self::Frames,
ffi::GST_RTSP_TIME_UTC => Self::Utc,
value => Self::__Unknown(value),
}
}
}
impl StaticType for RTSPTimeType {
#[inline]
#[doc(alias = "gst_rtsp_time_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_rtsp_time_type_get_type()) }
}
}
impl glib::HasParamSpec for RTSPTimeType {
type ParamSpec = glib::ParamSpecEnum;
type SetValue = Self;
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for RTSPTimeType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for RTSPTimeType {
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
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 RTSPTimeType {
#[inline]
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
}
#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<RTSPTimeType> for glib::Value {
#[inline]
fn from(v: RTSPTimeType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}