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-03-15 16:04:49 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
|
|
|
use glib::translate::*;
|
2018-05-21 08:41:37 +00:00
|
|
|
use glib::value::FromValue;
|
|
|
|
use glib::value::FromValueOptional;
|
|
|
|
use glib::value::SetValue;
|
2019-06-18 10:12:00 +00:00
|
|
|
use glib::StaticType;
|
|
|
|
use glib::Type;
|
2020-12-07 11:11:04 +00:00
|
|
|
use std::ffi::CStr;
|
|
|
|
use std::fmt;
|
2018-03-15 16:04:49 +00:00
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2019-06-25 16:20:37 +00:00
|
|
|
pub enum WebRTCBundlePolicy {
|
|
|
|
None,
|
|
|
|
Balanced,
|
|
|
|
MaxCompat,
|
|
|
|
MaxBundle,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCBundlePolicy {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCBundlePolicy;
|
2019-06-25 16:20:37 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCBundlePolicy {
|
2019-06-25 16:20:37 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCBundlePolicy::None => ffi::GST_WEBRTC_BUNDLE_POLICY_NONE,
|
|
|
|
WebRTCBundlePolicy::Balanced => ffi::GST_WEBRTC_BUNDLE_POLICY_BALANCED,
|
|
|
|
WebRTCBundlePolicy::MaxCompat => ffi::GST_WEBRTC_BUNDLE_POLICY_MAX_COMPAT,
|
|
|
|
WebRTCBundlePolicy::MaxBundle => ffi::GST_WEBRTC_BUNDLE_POLICY_MAX_BUNDLE,
|
2019-06-25 16:20:37 +00:00
|
|
|
WebRTCBundlePolicy::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCBundlePolicy> for WebRTCBundlePolicy {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCBundlePolicy) -> Self {
|
2019-06-25 16:20:37 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCBundlePolicy::None,
|
|
|
|
1 => WebRTCBundlePolicy::Balanced,
|
|
|
|
2 => WebRTCBundlePolicy::MaxCompat,
|
|
|
|
3 => WebRTCBundlePolicy::MaxBundle,
|
|
|
|
value => WebRTCBundlePolicy::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl StaticType for WebRTCBundlePolicy {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_bundle_policy_get_type()) }
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCBundlePolicy {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2019-06-25 16:20:37 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl<'a> FromValue<'a> for WebRTCBundlePolicy {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl SetValue for WebRTCBundlePolicy {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2019-06-25 16:20:37 +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-06-04 06:00:09 +00:00
|
|
|
pub enum WebRTCDTLSSetup {
|
|
|
|
None,
|
|
|
|
Actpass,
|
|
|
|
Active,
|
|
|
|
Passive,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCDTLSSetup {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCDTLSSetup;
|
2018-06-04 06:00:09 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCDTLSSetup {
|
2018-06-04 06:00:09 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCDTLSSetup::None => ffi::GST_WEBRTC_DTLS_SETUP_NONE,
|
|
|
|
WebRTCDTLSSetup::Actpass => ffi::GST_WEBRTC_DTLS_SETUP_ACTPASS,
|
|
|
|
WebRTCDTLSSetup::Active => ffi::GST_WEBRTC_DTLS_SETUP_ACTIVE,
|
|
|
|
WebRTCDTLSSetup::Passive => ffi::GST_WEBRTC_DTLS_SETUP_PASSIVE,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCDTLSSetup::__Unknown(value) => value,
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCDTLSSetup> for WebRTCDTLSSetup {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCDTLSSetup) -> Self {
|
2018-06-04 06:00:09 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCDTLSSetup::None,
|
|
|
|
1 => WebRTCDTLSSetup::Actpass,
|
|
|
|
2 => WebRTCDTLSSetup::Active,
|
|
|
|
3 => WebRTCDTLSSetup::Passive,
|
|
|
|
value => WebRTCDTLSSetup::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for WebRTCDTLSSetup {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_dtls_setup_get_type()) }
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCDTLSSetup {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2018-06-04 06:00:09 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for WebRTCDTLSSetup {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for WebRTCDTLSSetup {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-06-04 06:00:09 +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-03-15 16:04:49 +00:00
|
|
|
pub enum WebRTCDTLSTransportState {
|
|
|
|
New,
|
|
|
|
Closed,
|
|
|
|
Failed,
|
|
|
|
Connecting,
|
|
|
|
Connected,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCDTLSTransportState {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCDTLSTransportState;
|
2018-03-15 16:04:49 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCDTLSTransportState {
|
2018-03-15 16:04:49 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCDTLSTransportState::New => ffi::GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW,
|
|
|
|
WebRTCDTLSTransportState::Closed => ffi::GST_WEBRTC_DTLS_TRANSPORT_STATE_CLOSED,
|
|
|
|
WebRTCDTLSTransportState::Failed => ffi::GST_WEBRTC_DTLS_TRANSPORT_STATE_FAILED,
|
|
|
|
WebRTCDTLSTransportState::Connecting => ffi::GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTING,
|
|
|
|
WebRTCDTLSTransportState::Connected => ffi::GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCDTLSTransportState::__Unknown(value) => value,
|
2018-03-15 16:04:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCDTLSTransportState> for WebRTCDTLSTransportState {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCDTLSTransportState) -> Self {
|
2018-03-15 16:04:49 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCDTLSTransportState::New,
|
|
|
|
1 => WebRTCDTLSTransportState::Closed,
|
|
|
|
2 => WebRTCDTLSTransportState::Failed,
|
|
|
|
3 => WebRTCDTLSTransportState::Connecting,
|
|
|
|
4 => WebRTCDTLSTransportState::Connected,
|
|
|
|
value => WebRTCDTLSTransportState::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-21 08:41:37 +00:00
|
|
|
impl StaticType for WebRTCDTLSTransportState {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_dtls_transport_state_get_type()) }
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCDTLSTransportState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2018-05-21 08:41:37 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for WebRTCDTLSTransportState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for WebRTCDTLSTransportState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2019-06-25 16:20:37 +00:00
|
|
|
pub enum WebRTCDataChannelState {
|
|
|
|
New,
|
|
|
|
Connecting,
|
|
|
|
Open,
|
|
|
|
Closing,
|
|
|
|
Closed,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCDataChannelState {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCDataChannelState;
|
2019-06-25 16:20:37 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCDataChannelState {
|
2019-06-25 16:20:37 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCDataChannelState::New => ffi::GST_WEBRTC_DATA_CHANNEL_STATE_NEW,
|
|
|
|
WebRTCDataChannelState::Connecting => ffi::GST_WEBRTC_DATA_CHANNEL_STATE_CONNECTING,
|
|
|
|
WebRTCDataChannelState::Open => ffi::GST_WEBRTC_DATA_CHANNEL_STATE_OPEN,
|
|
|
|
WebRTCDataChannelState::Closing => ffi::GST_WEBRTC_DATA_CHANNEL_STATE_CLOSING,
|
|
|
|
WebRTCDataChannelState::Closed => ffi::GST_WEBRTC_DATA_CHANNEL_STATE_CLOSED,
|
2019-06-25 16:20:37 +00:00
|
|
|
WebRTCDataChannelState::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCDataChannelState> for WebRTCDataChannelState {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCDataChannelState) -> Self {
|
2019-06-25 16:20:37 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCDataChannelState::New,
|
|
|
|
1 => WebRTCDataChannelState::Connecting,
|
|
|
|
2 => WebRTCDataChannelState::Open,
|
|
|
|
3 => WebRTCDataChannelState::Closing,
|
|
|
|
4 => WebRTCDataChannelState::Closed,
|
|
|
|
value => WebRTCDataChannelState::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl StaticType for WebRTCDataChannelState {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_data_channel_state_get_type()) }
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCDataChannelState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2019-06-25 16:20:37 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl<'a> FromValue<'a> for WebRTCDataChannelState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl SetValue for WebRTCDataChannelState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_14_1", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_1")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2019-06-25 16:20:37 +00:00
|
|
|
pub enum WebRTCFECType {
|
|
|
|
None,
|
|
|
|
UlpRed,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_14_1", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_1")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCFECType {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCFECType;
|
2019-06-25 16:20:37 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCFECType {
|
2019-06-25 16:20:37 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCFECType::None => ffi::GST_WEBRTC_FEC_TYPE_NONE,
|
|
|
|
WebRTCFECType::UlpRed => ffi::GST_WEBRTC_FEC_TYPE_ULP_RED,
|
2019-06-25 16:20:37 +00:00
|
|
|
WebRTCFECType::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_14_1", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_1")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCFECType> for WebRTCFECType {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCFECType) -> Self {
|
2019-06-25 16:20:37 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCFECType::None,
|
|
|
|
1 => WebRTCFECType::UlpRed,
|
|
|
|
value => WebRTCFECType::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_14_1", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_1")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl StaticType for WebRTCFECType {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_fec_type_get_type()) }
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_14_1", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_1")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCFECType {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2019-06-25 16:20:37 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_14_1", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_1")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl<'a> FromValue<'a> for WebRTCFECType {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_14_1", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_1")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl SetValue for WebRTCFECType {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2019-06-25 16:20:37 +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-03-15 16:04:49 +00:00
|
|
|
pub enum WebRTCICEComponent {
|
|
|
|
Rtp,
|
|
|
|
Rtcp,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCICEComponent {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCICEComponent;
|
2018-03-15 16:04:49 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCICEComponent {
|
2018-03-15 16:04:49 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCICEComponent::Rtp => ffi::GST_WEBRTC_ICE_COMPONENT_RTP,
|
|
|
|
WebRTCICEComponent::Rtcp => ffi::GST_WEBRTC_ICE_COMPONENT_RTCP,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCICEComponent::__Unknown(value) => value,
|
2018-03-15 16:04:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCICEComponent> for WebRTCICEComponent {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCICEComponent) -> Self {
|
2018-03-15 16:04:49 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCICEComponent::Rtp,
|
|
|
|
1 => WebRTCICEComponent::Rtcp,
|
|
|
|
value => WebRTCICEComponent::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-21 08:41:37 +00:00
|
|
|
impl StaticType for WebRTCICEComponent {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_ice_component_get_type()) }
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCICEComponent {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2018-05-21 08:41:37 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for WebRTCICEComponent {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for WebRTCICEComponent {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-05-21 08:41:37 +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-03-15 16:04:49 +00:00
|
|
|
pub enum WebRTCICEConnectionState {
|
|
|
|
New,
|
|
|
|
Checking,
|
|
|
|
Connected,
|
|
|
|
Completed,
|
|
|
|
Failed,
|
|
|
|
Disconnected,
|
|
|
|
Closed,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCICEConnectionState {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCICEConnectionState;
|
2018-03-15 16:04:49 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCICEConnectionState {
|
2018-03-15 16:04:49 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCICEConnectionState::New => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_NEW,
|
|
|
|
WebRTCICEConnectionState::Checking => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING,
|
|
|
|
WebRTCICEConnectionState::Connected => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED,
|
|
|
|
WebRTCICEConnectionState::Completed => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED,
|
|
|
|
WebRTCICEConnectionState::Failed => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_FAILED,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCICEConnectionState::Disconnected => {
|
2020-11-22 10:46:23 +00:00
|
|
|
ffi::GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCICEConnectionState::Closed => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCICEConnectionState::__Unknown(value) => value,
|
2018-03-15 16:04:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCICEConnectionState> for WebRTCICEConnectionState {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCICEConnectionState) -> Self {
|
2018-03-15 16:04:49 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCICEConnectionState::New,
|
|
|
|
1 => WebRTCICEConnectionState::Checking,
|
|
|
|
2 => WebRTCICEConnectionState::Connected,
|
|
|
|
3 => WebRTCICEConnectionState::Completed,
|
|
|
|
4 => WebRTCICEConnectionState::Failed,
|
|
|
|
5 => WebRTCICEConnectionState::Disconnected,
|
|
|
|
6 => WebRTCICEConnectionState::Closed,
|
|
|
|
value => WebRTCICEConnectionState::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-21 08:41:37 +00:00
|
|
|
impl StaticType for WebRTCICEConnectionState {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_ice_connection_state_get_type()) }
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCICEConnectionState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2018-05-21 08:41:37 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for WebRTCICEConnectionState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for WebRTCICEConnectionState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-05-21 08:41:37 +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-03-15 16:04:49 +00:00
|
|
|
pub enum WebRTCICEGatheringState {
|
|
|
|
New,
|
|
|
|
Gathering,
|
|
|
|
Complete,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCICEGatheringState {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCICEGatheringState;
|
2018-03-15 16:04:49 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCICEGatheringState {
|
2018-03-15 16:04:49 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCICEGatheringState::New => ffi::GST_WEBRTC_ICE_GATHERING_STATE_NEW,
|
|
|
|
WebRTCICEGatheringState::Gathering => ffi::GST_WEBRTC_ICE_GATHERING_STATE_GATHERING,
|
|
|
|
WebRTCICEGatheringState::Complete => ffi::GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCICEGatheringState::__Unknown(value) => value,
|
2018-03-15 16:04:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCICEGatheringState> for WebRTCICEGatheringState {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCICEGatheringState) -> Self {
|
2018-03-15 16:04:49 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCICEGatheringState::New,
|
|
|
|
1 => WebRTCICEGatheringState::Gathering,
|
|
|
|
2 => WebRTCICEGatheringState::Complete,
|
|
|
|
value => WebRTCICEGatheringState::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-21 08:41:37 +00:00
|
|
|
impl StaticType for WebRTCICEGatheringState {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_ice_gathering_state_get_type()) }
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCICEGatheringState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2018-05-21 08:41:37 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for WebRTCICEGatheringState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for WebRTCICEGatheringState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-05-21 08:41:37 +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-03-15 16:04:49 +00:00
|
|
|
pub enum WebRTCICERole {
|
|
|
|
Controlled,
|
|
|
|
Controlling,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCICERole {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCICERole;
|
2018-03-15 16:04:49 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCICERole {
|
2018-03-15 16:04:49 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCICERole::Controlled => ffi::GST_WEBRTC_ICE_ROLE_CONTROLLED,
|
|
|
|
WebRTCICERole::Controlling => ffi::GST_WEBRTC_ICE_ROLE_CONTROLLING,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCICERole::__Unknown(value) => value,
|
2018-03-15 16:04:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCICERole> for WebRTCICERole {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCICERole) -> Self {
|
2018-03-15 16:04:49 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCICERole::Controlled,
|
|
|
|
1 => WebRTCICERole::Controlling,
|
|
|
|
value => WebRTCICERole::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-21 08:41:37 +00:00
|
|
|
impl StaticType for WebRTCICERole {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_ice_role_get_type()) }
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCICERole {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2018-05-21 08:41:37 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for WebRTCICERole {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for WebRTCICERole {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2019-06-25 16:20:37 +00:00
|
|
|
pub enum WebRTCICETransportPolicy {
|
|
|
|
All,
|
|
|
|
Relay,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCICETransportPolicy {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCICETransportPolicy;
|
2019-06-25 16:20:37 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCICETransportPolicy {
|
2019-06-25 16:20:37 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCICETransportPolicy::All => ffi::GST_WEBRTC_ICE_TRANSPORT_POLICY_ALL,
|
|
|
|
WebRTCICETransportPolicy::Relay => ffi::GST_WEBRTC_ICE_TRANSPORT_POLICY_RELAY,
|
2019-06-25 16:20:37 +00:00
|
|
|
WebRTCICETransportPolicy::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCICETransportPolicy> for WebRTCICETransportPolicy {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCICETransportPolicy) -> Self {
|
2019-06-25 16:20:37 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCICETransportPolicy::All,
|
|
|
|
1 => WebRTCICETransportPolicy::Relay,
|
|
|
|
value => WebRTCICETransportPolicy::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl StaticType for WebRTCICETransportPolicy {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_ice_transport_policy_get_type()) }
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCICETransportPolicy {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2019-06-25 16:20:37 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl<'a> FromValue<'a> for WebRTCICETransportPolicy {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl SetValue for WebRTCICETransportPolicy {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2019-06-25 16:20:37 +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-06-04 06:00:09 +00:00
|
|
|
pub enum WebRTCPeerConnectionState {
|
|
|
|
New,
|
|
|
|
Connecting,
|
|
|
|
Connected,
|
|
|
|
Disconnected,
|
|
|
|
Failed,
|
|
|
|
Closed,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCPeerConnectionState {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCPeerConnectionState;
|
2018-06-04 06:00:09 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCPeerConnectionState {
|
2018-06-04 06:00:09 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCPeerConnectionState::New => ffi::GST_WEBRTC_PEER_CONNECTION_STATE_NEW,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCPeerConnectionState::Connecting => {
|
2020-11-22 10:46:23 +00:00
|
|
|
ffi::GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCPeerConnectionState::Connected => ffi::GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCPeerConnectionState::Disconnected => {
|
2020-11-22 10:46:23 +00:00
|
|
|
ffi::GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCPeerConnectionState::Failed => ffi::GST_WEBRTC_PEER_CONNECTION_STATE_FAILED,
|
|
|
|
WebRTCPeerConnectionState::Closed => ffi::GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCPeerConnectionState::__Unknown(value) => value,
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCPeerConnectionState> for WebRTCPeerConnectionState {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCPeerConnectionState) -> Self {
|
2018-06-04 06:00:09 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCPeerConnectionState::New,
|
|
|
|
1 => WebRTCPeerConnectionState::Connecting,
|
|
|
|
2 => WebRTCPeerConnectionState::Connected,
|
|
|
|
3 => WebRTCPeerConnectionState::Disconnected,
|
|
|
|
4 => WebRTCPeerConnectionState::Failed,
|
|
|
|
5 => WebRTCPeerConnectionState::Closed,
|
|
|
|
value => WebRTCPeerConnectionState::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for WebRTCPeerConnectionState {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_peer_connection_state_get_type()) }
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCPeerConnectionState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2018-06-04 06:00:09 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for WebRTCPeerConnectionState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for WebRTCPeerConnectionState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2019-06-25 16:20:37 +00:00
|
|
|
pub enum WebRTCPriorityType {
|
|
|
|
VeryLow,
|
|
|
|
Low,
|
|
|
|
Medium,
|
|
|
|
High,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCPriorityType {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCPriorityType;
|
2019-06-25 16:20:37 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCPriorityType {
|
2019-06-25 16:20:37 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCPriorityType::VeryLow => ffi::GST_WEBRTC_PRIORITY_TYPE_VERY_LOW,
|
|
|
|
WebRTCPriorityType::Low => ffi::GST_WEBRTC_PRIORITY_TYPE_LOW,
|
|
|
|
WebRTCPriorityType::Medium => ffi::GST_WEBRTC_PRIORITY_TYPE_MEDIUM,
|
|
|
|
WebRTCPriorityType::High => ffi::GST_WEBRTC_PRIORITY_TYPE_HIGH,
|
2019-06-25 16:20:37 +00:00
|
|
|
WebRTCPriorityType::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCPriorityType> for WebRTCPriorityType {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCPriorityType) -> Self {
|
2019-06-25 16:20:37 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
1 => WebRTCPriorityType::VeryLow,
|
|
|
|
2 => WebRTCPriorityType::Low,
|
|
|
|
3 => WebRTCPriorityType::Medium,
|
|
|
|
4 => WebRTCPriorityType::High,
|
|
|
|
value => WebRTCPriorityType::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl StaticType for WebRTCPriorityType {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_priority_type_get_type()) }
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCPriorityType {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2019-06-25 16:20:37 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl<'a> FromValue<'a> for WebRTCPriorityType {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl SetValue for WebRTCPriorityType {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2019-06-25 16:20:37 +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-06-04 06:00:09 +00:00
|
|
|
pub enum WebRTCRTPTransceiverDirection {
|
|
|
|
None,
|
|
|
|
Inactive,
|
|
|
|
Sendonly,
|
|
|
|
Recvonly,
|
|
|
|
Sendrecv,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCRTPTransceiverDirection {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCRTPTransceiverDirection;
|
2018-06-04 06:00:09 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCRTPTransceiverDirection {
|
2018-06-04 06:00:09 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCRTPTransceiverDirection::None => ffi::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCRTPTransceiverDirection::Inactive => {
|
2020-11-22 10:46:23 +00:00
|
|
|
ffi::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
|
|
|
WebRTCRTPTransceiverDirection::Sendonly => {
|
2020-11-22 10:46:23 +00:00
|
|
|
ffi::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
|
|
|
WebRTCRTPTransceiverDirection::Recvonly => {
|
2020-11-22 10:46:23 +00:00
|
|
|
ffi::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
|
|
|
WebRTCRTPTransceiverDirection::Sendrecv => {
|
2020-11-22 10:46:23 +00:00
|
|
|
ffi::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
|
|
|
WebRTCRTPTransceiverDirection::__Unknown(value) => value,
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCRTPTransceiverDirection> for WebRTCRTPTransceiverDirection {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCRTPTransceiverDirection) -> Self {
|
2018-06-04 06:00:09 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCRTPTransceiverDirection::None,
|
|
|
|
1 => WebRTCRTPTransceiverDirection::Inactive,
|
|
|
|
2 => WebRTCRTPTransceiverDirection::Sendonly,
|
|
|
|
3 => WebRTCRTPTransceiverDirection::Recvonly,
|
|
|
|
4 => WebRTCRTPTransceiverDirection::Sendrecv,
|
|
|
|
value => WebRTCRTPTransceiverDirection::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for WebRTCRTPTransceiverDirection {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_rtp_transceiver_direction_get_type()) }
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCRTPTransceiverDirection {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2018-06-04 06:00:09 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for WebRTCRTPTransceiverDirection {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for WebRTCRTPTransceiverDirection {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2019-06-25 16:20:37 +00:00
|
|
|
pub enum WebRTCSCTPTransportState {
|
|
|
|
New,
|
|
|
|
Connecting,
|
|
|
|
Connected,
|
|
|
|
Closed,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCSCTPTransportState {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCSCTPTransportState;
|
2019-06-25 16:20:37 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCSCTPTransportState {
|
2019-06-25 16:20:37 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCSCTPTransportState::New => ffi::GST_WEBRTC_SCTP_TRANSPORT_STATE_NEW,
|
|
|
|
WebRTCSCTPTransportState::Connecting => ffi::GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTING,
|
|
|
|
WebRTCSCTPTransportState::Connected => ffi::GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTED,
|
|
|
|
WebRTCSCTPTransportState::Closed => ffi::GST_WEBRTC_SCTP_TRANSPORT_STATE_CLOSED,
|
2019-06-25 16:20:37 +00:00
|
|
|
WebRTCSCTPTransportState::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCSCTPTransportState> for WebRTCSCTPTransportState {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCSCTPTransportState) -> Self {
|
2019-06-25 16:20:37 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCSCTPTransportState::New,
|
|
|
|
1 => WebRTCSCTPTransportState::Connecting,
|
|
|
|
2 => WebRTCSCTPTransportState::Connected,
|
|
|
|
3 => WebRTCSCTPTransportState::Closed,
|
|
|
|
value => WebRTCSCTPTransportState::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl StaticType for WebRTCSCTPTransportState {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_sctp_transport_state_get_type()) }
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCSCTPTransportState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2019-06-25 16:20:37 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl<'a> FromValue<'a> for WebRTCSCTPTransportState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2019-06-25 16:20:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 13:37:24 +00:00
|
|
|
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))]
|
2019-06-25 16:20:37 +00:00
|
|
|
impl SetValue for WebRTCSCTPTransportState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2019-06-25 16:20:37 +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-03-15 16:04:49 +00:00
|
|
|
pub enum WebRTCSDPType {
|
|
|
|
Offer,
|
|
|
|
Pranswer,
|
|
|
|
Answer,
|
|
|
|
Rollback,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-12-07 11:11:04 +00:00
|
|
|
impl WebRTCSDPType {
|
|
|
|
pub fn to_str<'a>(self) -> &'a str {
|
|
|
|
unsafe {
|
|
|
|
CStr::from_ptr(
|
|
|
|
ffi::gst_webrtc_sdp_type_to_string(self.to_glib())
|
|
|
|
.as_ref()
|
|
|
|
.expect("gst_webrtc_sdp_type_to_string returned NULL"),
|
|
|
|
)
|
|
|
|
.to_str()
|
|
|
|
.expect("gst_webrtc_sdp_type_to_string returned an invalid string")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl fmt::Display for WebRTCSDPType {
|
|
|
|
#[inline]
|
|
|
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
|
|
f.write_str(&self.to_str())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-03-15 16:04:49 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCSDPType {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCSDPType;
|
2018-03-15 16:04:49 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCSDPType {
|
2018-03-15 16:04:49 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCSDPType::Offer => ffi::GST_WEBRTC_SDP_TYPE_OFFER,
|
|
|
|
WebRTCSDPType::Pranswer => ffi::GST_WEBRTC_SDP_TYPE_PRANSWER,
|
|
|
|
WebRTCSDPType::Answer => ffi::GST_WEBRTC_SDP_TYPE_ANSWER,
|
|
|
|
WebRTCSDPType::Rollback => ffi::GST_WEBRTC_SDP_TYPE_ROLLBACK,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCSDPType::__Unknown(value) => value,
|
2018-03-15 16:04:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCSDPType> for WebRTCSDPType {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCSDPType) -> Self {
|
2018-03-15 16:04:49 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
1 => WebRTCSDPType::Offer,
|
|
|
|
2 => WebRTCSDPType::Pranswer,
|
|
|
|
3 => WebRTCSDPType::Answer,
|
|
|
|
4 => WebRTCSDPType::Rollback,
|
|
|
|
value => WebRTCSDPType::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-21 08:41:37 +00:00
|
|
|
impl StaticType for WebRTCSDPType {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_sdp_type_get_type()) }
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCSDPType {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2018-05-21 08:41:37 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for WebRTCSDPType {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-05-21 08:41:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for WebRTCSDPType {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-05-21 08:41:37 +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-06-04 06:00:09 +00:00
|
|
|
pub enum WebRTCSignalingState {
|
|
|
|
Stable,
|
|
|
|
Closed,
|
|
|
|
HaveLocalOffer,
|
|
|
|
HaveRemoteOffer,
|
|
|
|
HaveLocalPranswer,
|
|
|
|
HaveRemotePranswer,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCSignalingState {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCSignalingState;
|
2018-06-04 06:00:09 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCSignalingState {
|
2018-06-04 06:00:09 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCSignalingState::Stable => ffi::GST_WEBRTC_SIGNALING_STATE_STABLE,
|
|
|
|
WebRTCSignalingState::Closed => ffi::GST_WEBRTC_SIGNALING_STATE_CLOSED,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCSignalingState::HaveLocalOffer => {
|
2020-11-22 10:46:23 +00:00
|
|
|
ffi::GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
|
|
|
WebRTCSignalingState::HaveRemoteOffer => {
|
2020-11-22 10:46:23 +00:00
|
|
|
ffi::GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
|
|
|
WebRTCSignalingState::HaveLocalPranswer => {
|
2020-11-22 10:46:23 +00:00
|
|
|
ffi::GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
|
|
|
WebRTCSignalingState::HaveRemotePranswer => {
|
2020-11-22 10:46:23 +00:00
|
|
|
ffi::GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
|
|
|
WebRTCSignalingState::__Unknown(value) => value,
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCSignalingState> for WebRTCSignalingState {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCSignalingState) -> Self {
|
2018-06-04 06:00:09 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
0 => WebRTCSignalingState::Stable,
|
|
|
|
1 => WebRTCSignalingState::Closed,
|
|
|
|
2 => WebRTCSignalingState::HaveLocalOffer,
|
|
|
|
3 => WebRTCSignalingState::HaveRemoteOffer,
|
|
|
|
4 => WebRTCSignalingState::HaveLocalPranswer,
|
|
|
|
5 => WebRTCSignalingState::HaveRemotePranswer,
|
|
|
|
value => WebRTCSignalingState::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for WebRTCSignalingState {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_signaling_state_get_type()) }
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCSignalingState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2018-06-04 06:00:09 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for WebRTCSignalingState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for WebRTCSignalingState {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-06-04 06:00:09 +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-06-04 06:00:09 +00:00
|
|
|
pub enum WebRTCStatsType {
|
|
|
|
Codec,
|
|
|
|
InboundRtp,
|
|
|
|
OutboundRtp,
|
|
|
|
RemoteInboundRtp,
|
|
|
|
RemoteOutboundRtp,
|
|
|
|
Csrc,
|
|
|
|
PeerConnection,
|
|
|
|
DataChannel,
|
|
|
|
Stream,
|
|
|
|
Transport,
|
|
|
|
CandidatePair,
|
|
|
|
LocalCandidate,
|
|
|
|
RemoteCandidate,
|
|
|
|
Certificate,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl ToGlib for WebRTCStatsType {
|
2020-11-22 10:46:23 +00:00
|
|
|
type GlibType = ffi::GstWebRTCStatsType;
|
2018-06-04 06:00:09 +00:00
|
|
|
|
2020-11-22 10:46:23 +00:00
|
|
|
fn to_glib(&self) -> ffi::GstWebRTCStatsType {
|
2018-06-04 06:00:09 +00:00
|
|
|
match *self {
|
2020-11-22 10:46:23 +00:00
|
|
|
WebRTCStatsType::Codec => ffi::GST_WEBRTC_STATS_CODEC,
|
|
|
|
WebRTCStatsType::InboundRtp => ffi::GST_WEBRTC_STATS_INBOUND_RTP,
|
|
|
|
WebRTCStatsType::OutboundRtp => ffi::GST_WEBRTC_STATS_OUTBOUND_RTP,
|
|
|
|
WebRTCStatsType::RemoteInboundRtp => ffi::GST_WEBRTC_STATS_REMOTE_INBOUND_RTP,
|
|
|
|
WebRTCStatsType::RemoteOutboundRtp => ffi::GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP,
|
|
|
|
WebRTCStatsType::Csrc => ffi::GST_WEBRTC_STATS_CSRC,
|
|
|
|
WebRTCStatsType::PeerConnection => ffi::GST_WEBRTC_STATS_PEER_CONNECTION,
|
|
|
|
WebRTCStatsType::DataChannel => ffi::GST_WEBRTC_STATS_DATA_CHANNEL,
|
|
|
|
WebRTCStatsType::Stream => ffi::GST_WEBRTC_STATS_STREAM,
|
|
|
|
WebRTCStatsType::Transport => ffi::GST_WEBRTC_STATS_TRANSPORT,
|
|
|
|
WebRTCStatsType::CandidatePair => ffi::GST_WEBRTC_STATS_CANDIDATE_PAIR,
|
|
|
|
WebRTCStatsType::LocalCandidate => ffi::GST_WEBRTC_STATS_LOCAL_CANDIDATE,
|
|
|
|
WebRTCStatsType::RemoteCandidate => ffi::GST_WEBRTC_STATS_REMOTE_CANDIDATE,
|
|
|
|
WebRTCStatsType::Certificate => ffi::GST_WEBRTC_STATS_CERTIFICATE,
|
2019-06-18 10:12:00 +00:00
|
|
|
WebRTCStatsType::__Unknown(value) => value,
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 10:46:23 +00:00
|
|
|
impl FromGlib<ffi::GstWebRTCStatsType> for WebRTCStatsType {
|
|
|
|
fn from_glib(value: ffi::GstWebRTCStatsType) -> Self {
|
2018-06-04 06:00:09 +00:00
|
|
|
skip_assert_initialized!();
|
|
|
|
match value {
|
|
|
|
1 => WebRTCStatsType::Codec,
|
|
|
|
2 => WebRTCStatsType::InboundRtp,
|
|
|
|
3 => WebRTCStatsType::OutboundRtp,
|
|
|
|
4 => WebRTCStatsType::RemoteInboundRtp,
|
|
|
|
5 => WebRTCStatsType::RemoteOutboundRtp,
|
|
|
|
6 => WebRTCStatsType::Csrc,
|
|
|
|
7 => WebRTCStatsType::PeerConnection,
|
|
|
|
8 => WebRTCStatsType::DataChannel,
|
|
|
|
9 => WebRTCStatsType::Stream,
|
|
|
|
10 => WebRTCStatsType::Transport,
|
|
|
|
11 => WebRTCStatsType::CandidatePair,
|
|
|
|
12 => WebRTCStatsType::LocalCandidate,
|
|
|
|
13 => WebRTCStatsType::RemoteCandidate,
|
|
|
|
14 => WebRTCStatsType::Certificate,
|
|
|
|
value => WebRTCStatsType::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for WebRTCStatsType {
|
|
|
|
fn static_type() -> Type {
|
2020-11-22 10:46:23 +00:00
|
|
|
unsafe { from_glib(ffi::gst_webrtc_stats_type_get_type()) }
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValueOptional<'a> for WebRTCStatsType {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
|
2018-06-04 06:00:09 +00:00
|
|
|
Some(FromValue::from_value(value))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> FromValue<'a> for WebRTCStatsType {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn from_value(value: &glib::Value) -> Self {
|
2020-11-22 10:46:23 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SetValue for WebRTCStatsType {
|
2020-11-27 13:37:24 +00:00
|
|
|
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
|
2020-11-22 10:46:23 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
2018-06-04 06:00:09 +00:00
|
|
|
}
|
|
|
|
}
|