mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 11:01:10 +00:00
WebRTC/SDP WIP
This commit is contained in:
parent
9a3ef2e9f1
commit
3a0c972304
21 changed files with 2555 additions and 2 deletions
|
@ -12,6 +12,7 @@ members = [
|
|||
"gstreamer-sdp",
|
||||
"gstreamer-video",
|
||||
"gstreamer-pbutils",
|
||||
"gstreamer-webrtc",
|
||||
"examples",
|
||||
"tutorials",
|
||||
]
|
||||
|
|
|
@ -5,7 +5,7 @@ version = "1.0"
|
|||
min_cfg_version = "1.8"
|
||||
target_path = "gstreamer-sdp"
|
||||
work_mode = "normal"
|
||||
concurrency = "send+sync"
|
||||
concurrency = "send"
|
||||
generate_safety_asserts = true
|
||||
doc_target_path = "docs/gstreamer-sdp/docs.md"
|
||||
|
||||
|
@ -28,7 +28,7 @@ generate = [
|
|||
"GstSdp.MIKEYSecSRTP",
|
||||
"GstSdp.MIKEYTSType",
|
||||
"GstSdp.MIKEYType",
|
||||
"GstSdp.SDPResult"
|
||||
"GstSdp.SDPResult",
|
||||
]
|
||||
|
||||
manual = [
|
||||
|
@ -38,3 +38,23 @@ manual = [
|
|||
name = "Gst.Caps"
|
||||
status = "manual"
|
||||
ref_mode = "ref"
|
||||
|
||||
[[object]]
|
||||
name = "GstSdp.SDPMessage"
|
||||
status = "generate"
|
||||
use_boxed_functions = true
|
||||
|
||||
[[object.function]]
|
||||
name = "new"
|
||||
# special return type...
|
||||
ignore = true
|
||||
|
||||
[[object.function]]
|
||||
name = "uninit"
|
||||
# unsafe
|
||||
ignore = true
|
||||
|
||||
|
||||
[[object]]
|
||||
name = "GstSdp.SDPMedia"
|
||||
status = "generate"
|
||||
|
|
62
Gir_GstWebRTC.toml
Normal file
62
Gir_GstWebRTC.toml
Normal file
|
@ -0,0 +1,62 @@
|
|||
[options]
|
||||
girs_dir = "gir-files"
|
||||
library = "GstWebRTC"
|
||||
version = "1.0"
|
||||
min_cfg_version = "1.14"
|
||||
target_path = "gstreamer-webrtc"
|
||||
work_mode = "normal"
|
||||
concurrency = "send+sync"
|
||||
generate_safety_asserts = true
|
||||
|
||||
external_libraries = [
|
||||
"GLib",
|
||||
"GObject",
|
||||
"Gst",
|
||||
"GstSdp",
|
||||
]
|
||||
|
||||
generate = [
|
||||
"GstWebRTC.WebRTCDTLSTransportState",
|
||||
"GstWebRTC.WebRTCICEGatheringState",
|
||||
"GstWebRTC.WebRTCICEConnectionState",
|
||||
"GstWebRTC.WebRTCICERole",
|
||||
"GstWebRTC.WebRTCICEComponent",
|
||||
"GstWebRTC.WebRTCSDPType",
|
||||
]
|
||||
|
||||
manual = [
|
||||
"GObject.Object",
|
||||
"Gst.Structure",
|
||||
"GstSdp.SDPMessage",
|
||||
]
|
||||
|
||||
[[object]]
|
||||
name = "GstWebRTC.WebRTCDTLSTransport"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "GstWebRTC.WebRTCICETransport"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "GstWebRTC.WebRTCRTPReceiver"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "GstWebRTC.WebRTCRTPSender"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "GstWebRTC.WebRTCRTPTransceiver"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
||||
[[object]]
|
||||
name = "GstWebRTC.WebRTCSessionDescription"
|
||||
status = "generate"
|
||||
trait = false
|
||||
|
876
gir-files/GstWebRTC-1.0.gir
Normal file
876
gir-files/GstWebRTC-1.0.gir
Normal file
|
@ -0,0 +1,876 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file was automatically generated from C sources - DO NOT EDIT!
|
||||
To affect the contents of this file, edit the original C definitions,
|
||||
and/or use gtk-doc annotations. -->
|
||||
<repository version="1.2"
|
||||
xmlns="http://www.gtk.org/introspection/core/1.0"
|
||||
xmlns:c="http://www.gtk.org/introspection/c/1.0"
|
||||
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
|
||||
<include name="Gst" version="1.0"/>
|
||||
<include name="GstSdp" version="1.0"/>
|
||||
<package name="gstreamer-webrtc-1.0"/>
|
||||
<c:include name="gst/webrtc/webrtc.h"/>
|
||||
<namespace name="GstWebRTC"
|
||||
version="1.0"
|
||||
shared-library="libgstwebrtc-1.0.so.0"
|
||||
c:identifier-prefixes="Gst"
|
||||
c:symbol-prefixes="gst">
|
||||
<enumeration name="WebRTCDTLSSetup" c:type="GstWebRTCDTLSSetup">
|
||||
<doc xml:space="preserve">GST_WEBRTC_DTLS_SETUP_NONE: none
|
||||
GST_WEBRTC_DTLS_SETUP_ACTPASS: actpass
|
||||
GST_WEBRTC_DTLS_SETUP_ACTIVE: sendonly
|
||||
GST_WEBRTC_DTLS_SETUP_PASSIVE: recvonly</doc>
|
||||
<member name="none" value="0" c:identifier="GST_WEBRTC_DTLS_SETUP_NONE">
|
||||
</member>
|
||||
<member name="actpass"
|
||||
value="1"
|
||||
c:identifier="GST_WEBRTC_DTLS_SETUP_ACTPASS">
|
||||
</member>
|
||||
<member name="active"
|
||||
value="2"
|
||||
c:identifier="GST_WEBRTC_DTLS_SETUP_ACTIVE">
|
||||
</member>
|
||||
<member name="passive"
|
||||
value="3"
|
||||
c:identifier="GST_WEBRTC_DTLS_SETUP_PASSIVE">
|
||||
</member>
|
||||
</enumeration>
|
||||
<class name="WebRTCDTLSTransport"
|
||||
c:symbol-prefix="webrtc_dtls_transport"
|
||||
c:type="GstWebRTCDTLSTransport"
|
||||
parent="Gst.Object"
|
||||
glib:type-name="GstWebRTCDTLSTransport"
|
||||
glib:get-type="gst_webrtc_dtls_transport_get_type"
|
||||
glib:type-struct="WebRTCDTLSTransportClass">
|
||||
<constructor name="new" c:identifier="gst_webrtc_dtls_transport_new">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="WebRTCDTLSTransport" c:type="GstWebRTCDTLSTransport*"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<parameter name="session_id" transfer-ownership="none">
|
||||
<type name="guint" c:type="guint"/>
|
||||
</parameter>
|
||||
<parameter name="rtcp" transfer-ownership="none">
|
||||
<type name="gboolean" c:type="gboolean"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</constructor>
|
||||
<method name="set_transport"
|
||||
c:identifier="gst_webrtc_dtls_transport_set_transport">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="transport" transfer-ownership="none">
|
||||
<type name="WebRTCDTLSTransport" c:type="GstWebRTCDTLSTransport*"/>
|
||||
</instance-parameter>
|
||||
<parameter name="ice" transfer-ownership="none">
|
||||
<type name="WebRTCICETransport" c:type="GstWebRTCICETransport*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<property name="certificate" writable="1" transfer-ownership="none">
|
||||
<type name="utf8" c:type="gchar*"/>
|
||||
</property>
|
||||
<property name="client" writable="1" transfer-ownership="none">
|
||||
<type name="gboolean" c:type="gboolean"/>
|
||||
</property>
|
||||
<property name="remote-certificate" transfer-ownership="none">
|
||||
<type name="utf8" c:type="gchar*"/>
|
||||
</property>
|
||||
<property name="rtcp"
|
||||
writable="1"
|
||||
construct-only="1"
|
||||
transfer-ownership="none">
|
||||
<type name="gboolean" c:type="gboolean"/>
|
||||
</property>
|
||||
<property name="session-id"
|
||||
writable="1"
|
||||
construct-only="1"
|
||||
transfer-ownership="none">
|
||||
<type name="guint" c:type="guint"/>
|
||||
</property>
|
||||
<property name="state" introspectable="0" transfer-ownership="none">
|
||||
<type/>
|
||||
</property>
|
||||
<property name="transport" transfer-ownership="none">
|
||||
<type name="WebRTCICETransport"/>
|
||||
</property>
|
||||
<field name="parent">
|
||||
<type name="Gst.Object" c:type="GstObject"/>
|
||||
</field>
|
||||
<field name="transport">
|
||||
<type name="WebRTCICETransport" c:type="GstWebRTCICETransport*"/>
|
||||
</field>
|
||||
<field name="state">
|
||||
<type name="WebRTCDTLSTransportState"
|
||||
c:type="GstWebRTCDTLSTransportState"/>
|
||||
</field>
|
||||
<field name="is_rtcp">
|
||||
<type name="gboolean" c:type="gboolean"/>
|
||||
</field>
|
||||
<field name="client">
|
||||
<type name="gboolean" c:type="gboolean"/>
|
||||
</field>
|
||||
<field name="session_id">
|
||||
<type name="guint" c:type="guint"/>
|
||||
</field>
|
||||
<field name="dtlssrtpenc">
|
||||
<type name="Gst.Element" c:type="GstElement*"/>
|
||||
</field>
|
||||
<field name="dtlssrtpdec">
|
||||
<type name="Gst.Element" c:type="GstElement*"/>
|
||||
</field>
|
||||
<field name="_padding">
|
||||
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
|
||||
<type name="gpointer" c:type="gpointer"/>
|
||||
</array>
|
||||
</field>
|
||||
</class>
|
||||
<record name="WebRTCDTLSTransportClass"
|
||||
c:type="GstWebRTCDTLSTransportClass"
|
||||
glib:is-gtype-struct-for="WebRTCDTLSTransport">
|
||||
<field name="parent_class">
|
||||
<type name="Gst.BinClass" c:type="GstBinClass"/>
|
||||
</field>
|
||||
<field name="_padding">
|
||||
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
|
||||
<type name="gpointer" c:type="gpointer"/>
|
||||
</array>
|
||||
</field>
|
||||
</record>
|
||||
<enumeration name="WebRTCDTLSTransportState"
|
||||
c:type="GstWebRTCDTLSTransportState">
|
||||
<doc xml:space="preserve">GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW: new
|
||||
GST_WEBRTC_DTLS_TRANSPORT_STATE_CLOSED: closed
|
||||
GST_WEBRTC_DTLS_TRANSPORT_STATE_FAILED: failed
|
||||
GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTING: connecting
|
||||
GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED: connected</doc>
|
||||
<member name="new"
|
||||
value="0"
|
||||
c:identifier="GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW">
|
||||
</member>
|
||||
<member name="closed"
|
||||
value="1"
|
||||
c:identifier="GST_WEBRTC_DTLS_TRANSPORT_STATE_CLOSED">
|
||||
</member>
|
||||
<member name="failed"
|
||||
value="2"
|
||||
c:identifier="GST_WEBRTC_DTLS_TRANSPORT_STATE_FAILED">
|
||||
</member>
|
||||
<member name="connecting"
|
||||
value="3"
|
||||
c:identifier="GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTING">
|
||||
</member>
|
||||
<member name="connected"
|
||||
value="4"
|
||||
c:identifier="GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED">
|
||||
</member>
|
||||
</enumeration>
|
||||
<enumeration name="WebRTCICEComponent" c:type="GstWebRTCICEComponent">
|
||||
<doc xml:space="preserve">GST_WEBRTC_ICE_COMPONENT_RTP,
|
||||
GST_WEBRTC_ICE_COMPONENT_RTCP,</doc>
|
||||
<member name="rtp" value="0" c:identifier="GST_WEBRTC_ICE_COMPONENT_RTP">
|
||||
</member>
|
||||
<member name="rtcp"
|
||||
value="1"
|
||||
c:identifier="GST_WEBRTC_ICE_COMPONENT_RTCP">
|
||||
</member>
|
||||
</enumeration>
|
||||
<enumeration name="WebRTCICEConnectionState"
|
||||
c:type="GstWebRTCICEConnectionState">
|
||||
<doc xml:space="preserve">GST_WEBRTC_ICE_CONNECTION_STATE_NEW: new
|
||||
GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING: checking
|
||||
GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED: connected
|
||||
GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED: completed
|
||||
GST_WEBRTC_ICE_CONNECTION_STATE_FAILED: failed
|
||||
GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED: disconnected
|
||||
GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED: closed
|
||||
See <ulink url="http://w3c.github.io/webrtc-pc/#dom-rtciceconnectionstate">http://w3c.github.io/webrtc-pc/#dom-rtciceconnectionstate</ulink></doc>
|
||||
<member name="new"
|
||||
value="0"
|
||||
c:identifier="GST_WEBRTC_ICE_CONNECTION_STATE_NEW">
|
||||
</member>
|
||||
<member name="checking"
|
||||
value="1"
|
||||
c:identifier="GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING">
|
||||
</member>
|
||||
<member name="connected"
|
||||
value="2"
|
||||
c:identifier="GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED">
|
||||
</member>
|
||||
<member name="completed"
|
||||
value="3"
|
||||
c:identifier="GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED">
|
||||
</member>
|
||||
<member name="failed"
|
||||
value="4"
|
||||
c:identifier="GST_WEBRTC_ICE_CONNECTION_STATE_FAILED">
|
||||
</member>
|
||||
<member name="disconnected"
|
||||
value="5"
|
||||
c:identifier="GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED">
|
||||
</member>
|
||||
<member name="closed"
|
||||
value="6"
|
||||
c:identifier="GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED">
|
||||
</member>
|
||||
</enumeration>
|
||||
<enumeration name="WebRTCICEGatheringState"
|
||||
c:type="GstWebRTCICEGatheringState">
|
||||
<doc xml:space="preserve">GST_WEBRTC_ICE_GATHERING_STATE_NEW: new
|
||||
GST_WEBRTC_ICE_GATHERING_STATE_GATHERING: gathering
|
||||
GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE: complete
|
||||
See <ulink url="http://w3c.github.io/webrtc-pc/#dom-rtcicegatheringstate">http://w3c.github.io/webrtc-pc/#dom-rtcicegatheringstate</ulink></doc>
|
||||
<member name="new"
|
||||
value="0"
|
||||
c:identifier="GST_WEBRTC_ICE_GATHERING_STATE_NEW">
|
||||
</member>
|
||||
<member name="gathering"
|
||||
value="1"
|
||||
c:identifier="GST_WEBRTC_ICE_GATHERING_STATE_GATHERING">
|
||||
</member>
|
||||
<member name="complete"
|
||||
value="2"
|
||||
c:identifier="GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE">
|
||||
</member>
|
||||
</enumeration>
|
||||
<enumeration name="WebRTCICERole" c:type="GstWebRTCICERole">
|
||||
<doc xml:space="preserve">GST_WEBRTC_ICE_ROLE_CONTROLLED: controlled
|
||||
GST_WEBRTC_ICE_ROLE_CONTROLLING: controlling</doc>
|
||||
<member name="controlled"
|
||||
value="0"
|
||||
c:identifier="GST_WEBRTC_ICE_ROLE_CONTROLLED">
|
||||
</member>
|
||||
<member name="controlling"
|
||||
value="1"
|
||||
c:identifier="GST_WEBRTC_ICE_ROLE_CONTROLLING">
|
||||
</member>
|
||||
</enumeration>
|
||||
<class name="WebRTCICETransport"
|
||||
c:symbol-prefix="webrtc_ice_transport"
|
||||
c:type="GstWebRTCICETransport"
|
||||
parent="Gst.Object"
|
||||
abstract="1"
|
||||
glib:type-name="GstWebRTCICETransport"
|
||||
glib:get-type="gst_webrtc_ice_transport_get_type"
|
||||
glib:type-struct="WebRTCICETransportClass">
|
||||
<virtual-method name="gather_candidates">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="gboolean" c:type="gboolean"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="transport" transfer-ownership="none">
|
||||
<type name="WebRTCICETransport" c:type="GstWebRTCICETransport*"/>
|
||||
</instance-parameter>
|
||||
</parameters>
|
||||
</virtual-method>
|
||||
<method name="connection_state_change"
|
||||
c:identifier="gst_webrtc_ice_transport_connection_state_change">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="ice" transfer-ownership="none">
|
||||
<type name="WebRTCICETransport" c:type="GstWebRTCICETransport*"/>
|
||||
</instance-parameter>
|
||||
<parameter name="new_state" transfer-ownership="none">
|
||||
<type name="WebRTCICEConnectionState"
|
||||
c:type="GstWebRTCICEConnectionState"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="gathering_state_change"
|
||||
c:identifier="gst_webrtc_ice_transport_gathering_state_change">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="ice" transfer-ownership="none">
|
||||
<type name="WebRTCICETransport" c:type="GstWebRTCICETransport*"/>
|
||||
</instance-parameter>
|
||||
<parameter name="new_state" transfer-ownership="none">
|
||||
<type name="WebRTCICEGatheringState"
|
||||
c:type="GstWebRTCICEGatheringState"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="new_candidate"
|
||||
c:identifier="gst_webrtc_ice_transport_new_candidate">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="ice" transfer-ownership="none">
|
||||
<type name="WebRTCICETransport" c:type="GstWebRTCICETransport*"/>
|
||||
</instance-parameter>
|
||||
<parameter name="stream_id" transfer-ownership="none">
|
||||
<type name="guint" c:type="guint"/>
|
||||
</parameter>
|
||||
<parameter name="component" transfer-ownership="none">
|
||||
<type name="WebRTCICEComponent" c:type="GstWebRTCICEComponent"/>
|
||||
</parameter>
|
||||
<parameter name="attr" transfer-ownership="none">
|
||||
<type name="utf8" c:type="gchar*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="selected_pair_change"
|
||||
c:identifier="gst_webrtc_ice_transport_selected_pair_change">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="ice" transfer-ownership="none">
|
||||
<type name="WebRTCICETransport" c:type="GstWebRTCICETransport*"/>
|
||||
</instance-parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<property name="component"
|
||||
introspectable="0"
|
||||
writable="1"
|
||||
construct-only="1"
|
||||
transfer-ownership="none">
|
||||
<type/>
|
||||
</property>
|
||||
<property name="gathering-state"
|
||||
introspectable="0"
|
||||
transfer-ownership="none">
|
||||
<type/>
|
||||
</property>
|
||||
<property name="state" introspectable="0" transfer-ownership="none">
|
||||
<type/>
|
||||
</property>
|
||||
<field name="parent">
|
||||
<type name="Gst.Object" c:type="GstObject"/>
|
||||
</field>
|
||||
<field name="role">
|
||||
<type name="WebRTCICERole" c:type="GstWebRTCICERole"/>
|
||||
</field>
|
||||
<field name="component">
|
||||
<type name="WebRTCICEComponent" c:type="GstWebRTCICEComponent"/>
|
||||
</field>
|
||||
<field name="state">
|
||||
<type name="WebRTCICEConnectionState"
|
||||
c:type="GstWebRTCICEConnectionState"/>
|
||||
</field>
|
||||
<field name="gathering_state">
|
||||
<type name="WebRTCICEGatheringState"
|
||||
c:type="GstWebRTCICEGatheringState"/>
|
||||
</field>
|
||||
<field name="src">
|
||||
<type name="Gst.Element" c:type="GstElement*"/>
|
||||
</field>
|
||||
<field name="sink">
|
||||
<type name="Gst.Element" c:type="GstElement*"/>
|
||||
</field>
|
||||
<field name="_padding">
|
||||
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
|
||||
<type name="gpointer" c:type="gpointer"/>
|
||||
</array>
|
||||
</field>
|
||||
<glib:signal name="on-new-candidate" when="last">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<parameter name="object" transfer-ownership="none">
|
||||
<type name="utf8" c:type="gchar*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</glib:signal>
|
||||
<glib:signal name="on-selected-candidate-pair-change" when="last">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
</glib:signal>
|
||||
</class>
|
||||
<record name="WebRTCICETransportClass"
|
||||
c:type="GstWebRTCICETransportClass"
|
||||
glib:is-gtype-struct-for="WebRTCICETransport">
|
||||
<field name="parent_class">
|
||||
<type name="Gst.BinClass" c:type="GstBinClass"/>
|
||||
</field>
|
||||
<field name="gather_candidates">
|
||||
<callback name="gather_candidates">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="gboolean" c:type="gboolean"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<parameter name="transport" transfer-ownership="none">
|
||||
<type name="WebRTCICETransport" c:type="GstWebRTCICETransport*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</callback>
|
||||
</field>
|
||||
<field name="_padding">
|
||||
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
|
||||
<type name="gpointer" c:type="gpointer"/>
|
||||
</array>
|
||||
</field>
|
||||
</record>
|
||||
<enumeration name="WebRTCPeerConnectionState"
|
||||
c:type="GstWebRTCPeerConnectionState">
|
||||
<doc xml:space="preserve">GST_WEBRTC_PEER_CONNECTION_STATE_NEW: new
|
||||
GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING: connecting
|
||||
GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED: connected
|
||||
GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED: disconnected
|
||||
GST_WEBRTC_PEER_CONNECTION_STATE_FAILED: failed
|
||||
GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED: closed
|
||||
See <ulink url="http://w3c.github.io/webrtc-pc/#dom-rtcpeerconnectionstate">http://w3c.github.io/webrtc-pc/#dom-rtcpeerconnectionstate</ulink></doc>
|
||||
<member name="new"
|
||||
value="0"
|
||||
c:identifier="GST_WEBRTC_PEER_CONNECTION_STATE_NEW">
|
||||
</member>
|
||||
<member name="connecting"
|
||||
value="1"
|
||||
c:identifier="GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING">
|
||||
</member>
|
||||
<member name="connected"
|
||||
value="2"
|
||||
c:identifier="GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED">
|
||||
</member>
|
||||
<member name="disconnected"
|
||||
value="3"
|
||||
c:identifier="GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED">
|
||||
</member>
|
||||
<member name="failed"
|
||||
value="4"
|
||||
c:identifier="GST_WEBRTC_PEER_CONNECTION_STATE_FAILED">
|
||||
</member>
|
||||
<member name="closed"
|
||||
value="5"
|
||||
c:identifier="GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED">
|
||||
</member>
|
||||
</enumeration>
|
||||
<class name="WebRTCRTPReceiver"
|
||||
c:symbol-prefix="webrtc_rtp_receiver"
|
||||
c:type="GstWebRTCRTPReceiver"
|
||||
parent="Gst.Object"
|
||||
glib:type-name="GstWebRTCRTPReceiver"
|
||||
glib:get-type="gst_webrtc_rtp_receiver_get_type"
|
||||
glib:type-struct="WebRTCRTPReceiverClass">
|
||||
<constructor name="new" c:identifier="gst_webrtc_rtp_receiver_new">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="WebRTCRTPReceiver" c:type="GstWebRTCRTPReceiver*"/>
|
||||
</return-value>
|
||||
</constructor>
|
||||
<method name="set_rtcp_transport"
|
||||
c:identifier="gst_webrtc_rtp_receiver_set_rtcp_transport">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="receiver" transfer-ownership="none">
|
||||
<type name="WebRTCRTPReceiver" c:type="GstWebRTCRTPReceiver*"/>
|
||||
</instance-parameter>
|
||||
<parameter name="transport" transfer-ownership="none">
|
||||
<type name="WebRTCDTLSTransport" c:type="GstWebRTCDTLSTransport*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="set_transport"
|
||||
c:identifier="gst_webrtc_rtp_receiver_set_transport">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="receiver" transfer-ownership="none">
|
||||
<type name="WebRTCRTPReceiver" c:type="GstWebRTCRTPReceiver*"/>
|
||||
</instance-parameter>
|
||||
<parameter name="transport" transfer-ownership="none">
|
||||
<type name="WebRTCDTLSTransport" c:type="GstWebRTCDTLSTransport*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<field name="parent">
|
||||
<type name="Gst.Object" c:type="GstObject"/>
|
||||
</field>
|
||||
<field name="transport">
|
||||
<type name="WebRTCDTLSTransport" c:type="GstWebRTCDTLSTransport*"/>
|
||||
</field>
|
||||
<field name="rtcp_transport">
|
||||
<type name="WebRTCDTLSTransport" c:type="GstWebRTCDTLSTransport*"/>
|
||||
</field>
|
||||
<field name="_padding">
|
||||
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
|
||||
<type name="gpointer" c:type="gpointer"/>
|
||||
</array>
|
||||
</field>
|
||||
</class>
|
||||
<record name="WebRTCRTPReceiverClass"
|
||||
c:type="GstWebRTCRTPReceiverClass"
|
||||
glib:is-gtype-struct-for="WebRTCRTPReceiver">
|
||||
<field name="parent_class">
|
||||
<type name="Gst.ObjectClass" c:type="GstObjectClass"/>
|
||||
</field>
|
||||
<field name="_padding">
|
||||
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
|
||||
<type name="gpointer" c:type="gpointer"/>
|
||||
</array>
|
||||
</field>
|
||||
</record>
|
||||
<class name="WebRTCRTPSender"
|
||||
c:symbol-prefix="webrtc_rtp_sender"
|
||||
c:type="GstWebRTCRTPSender"
|
||||
parent="Gst.Object"
|
||||
glib:type-name="GstWebRTCRTPSender"
|
||||
glib:get-type="gst_webrtc_rtp_sender_get_type"
|
||||
glib:type-struct="WebRTCRTPSenderClass">
|
||||
<constructor name="new" c:identifier="gst_webrtc_rtp_sender_new">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="WebRTCRTPSender" c:type="GstWebRTCRTPSender*"/>
|
||||
</return-value>
|
||||
</constructor>
|
||||
<method name="set_rtcp_transport"
|
||||
c:identifier="gst_webrtc_rtp_sender_set_rtcp_transport">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="sender" transfer-ownership="none">
|
||||
<type name="WebRTCRTPSender" c:type="GstWebRTCRTPSender*"/>
|
||||
</instance-parameter>
|
||||
<parameter name="transport" transfer-ownership="none">
|
||||
<type name="WebRTCDTLSTransport" c:type="GstWebRTCDTLSTransport*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="set_transport"
|
||||
c:identifier="gst_webrtc_rtp_sender_set_transport">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="sender" transfer-ownership="none">
|
||||
<type name="WebRTCRTPSender" c:type="GstWebRTCRTPSender*"/>
|
||||
</instance-parameter>
|
||||
<parameter name="transport" transfer-ownership="none">
|
||||
<type name="WebRTCDTLSTransport" c:type="GstWebRTCDTLSTransport*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<field name="parent">
|
||||
<type name="Gst.Object" c:type="GstObject"/>
|
||||
</field>
|
||||
<field name="transport">
|
||||
<type name="WebRTCDTLSTransport" c:type="GstWebRTCDTLSTransport*"/>
|
||||
</field>
|
||||
<field name="rtcp_transport">
|
||||
<type name="WebRTCDTLSTransport" c:type="GstWebRTCDTLSTransport*"/>
|
||||
</field>
|
||||
<field name="send_encodings">
|
||||
<array name="GLib.Array" c:type="GArray*">
|
||||
<type name="gpointer" c:type="gpointer"/>
|
||||
</array>
|
||||
</field>
|
||||
<field name="_padding">
|
||||
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
|
||||
<type name="gpointer" c:type="gpointer"/>
|
||||
</array>
|
||||
</field>
|
||||
</class>
|
||||
<record name="WebRTCRTPSenderClass"
|
||||
c:type="GstWebRTCRTPSenderClass"
|
||||
glib:is-gtype-struct-for="WebRTCRTPSender">
|
||||
<field name="parent_class">
|
||||
<type name="Gst.ObjectClass" c:type="GstObjectClass"/>
|
||||
</field>
|
||||
<field name="_padding">
|
||||
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
|
||||
<type name="gpointer" c:type="gpointer"/>
|
||||
</array>
|
||||
</field>
|
||||
</record>
|
||||
<class name="WebRTCRTPTransceiver"
|
||||
c:symbol-prefix="webrtc_rtp_transceiver"
|
||||
c:type="GstWebRTCRTPTransceiver"
|
||||
parent="Gst.Object"
|
||||
abstract="1"
|
||||
glib:type-name="GstWebRTCRTPTransceiver"
|
||||
glib:get-type="gst_webrtc_rtp_transceiver_get_type"
|
||||
glib:type-struct="WebRTCRTPTransceiverClass">
|
||||
<property name="mlineindex"
|
||||
writable="1"
|
||||
construct-only="1"
|
||||
transfer-ownership="none">
|
||||
<type name="guint" c:type="guint"/>
|
||||
</property>
|
||||
<property name="receiver"
|
||||
writable="1"
|
||||
construct-only="1"
|
||||
transfer-ownership="none">
|
||||
<type name="WebRTCRTPReceiver"/>
|
||||
</property>
|
||||
<property name="sender"
|
||||
writable="1"
|
||||
construct-only="1"
|
||||
transfer-ownership="none">
|
||||
<type name="WebRTCRTPSender"/>
|
||||
</property>
|
||||
<field name="parent">
|
||||
<type name="Gst.Object" c:type="GstObject"/>
|
||||
</field>
|
||||
<field name="mline">
|
||||
<type name="guint" c:type="guint"/>
|
||||
</field>
|
||||
<field name="mid">
|
||||
<type name="utf8" c:type="gchar*"/>
|
||||
</field>
|
||||
<field name="stopped">
|
||||
<type name="gboolean" c:type="gboolean"/>
|
||||
</field>
|
||||
<field name="sender">
|
||||
<type name="WebRTCRTPSender" c:type="GstWebRTCRTPSender*"/>
|
||||
</field>
|
||||
<field name="receiver">
|
||||
<type name="WebRTCRTPReceiver" c:type="GstWebRTCRTPReceiver*"/>
|
||||
</field>
|
||||
<field name="direction">
|
||||
<type name="WebRTCRTPTransceiverDirection"
|
||||
c:type="GstWebRTCRTPTransceiverDirection"/>
|
||||
</field>
|
||||
<field name="current_direction">
|
||||
<type name="WebRTCRTPTransceiverDirection"
|
||||
c:type="GstWebRTCRTPTransceiverDirection"/>
|
||||
</field>
|
||||
<field name="codec_preferences">
|
||||
<type name="Gst.Caps" c:type="GstCaps*"/>
|
||||
</field>
|
||||
<field name="_padding">
|
||||
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
|
||||
<type name="gpointer" c:type="gpointer"/>
|
||||
</array>
|
||||
</field>
|
||||
</class>
|
||||
<record name="WebRTCRTPTransceiverClass"
|
||||
c:type="GstWebRTCRTPTransceiverClass"
|
||||
glib:is-gtype-struct-for="WebRTCRTPTransceiver">
|
||||
<field name="parent_class">
|
||||
<type name="Gst.ObjectClass" c:type="GstObjectClass"/>
|
||||
</field>
|
||||
<field name="_padding">
|
||||
<array zero-terminated="0" c:type="gpointer" fixed-size="4">
|
||||
<type name="gpointer" c:type="gpointer"/>
|
||||
</array>
|
||||
</field>
|
||||
</record>
|
||||
<enumeration name="WebRTCRTPTransceiverDirection"
|
||||
c:type="GstWebRTCRTPTransceiverDirection">
|
||||
<member name="none"
|
||||
value="0"
|
||||
c:identifier="GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE">
|
||||
</member>
|
||||
<member name="inactive"
|
||||
value="1"
|
||||
c:identifier="GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE">
|
||||
</member>
|
||||
<member name="sendonly"
|
||||
value="2"
|
||||
c:identifier="GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY">
|
||||
</member>
|
||||
<member name="recvonly"
|
||||
value="3"
|
||||
c:identifier="GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY">
|
||||
</member>
|
||||
<member name="sendrecv"
|
||||
value="4"
|
||||
c:identifier="GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV">
|
||||
</member>
|
||||
</enumeration>
|
||||
<enumeration name="WebRTCSDPType" c:type="GstWebRTCSDPType">
|
||||
<doc xml:space="preserve">GST_WEBRTC_SDP_TYPE_OFFER: offer
|
||||
GST_WEBRTC_SDP_TYPE_PRANSWER: pranswer
|
||||
GST_WEBRTC_SDP_TYPE_ANSWER: answer
|
||||
GST_WEBRTC_SDP_TYPE_ROLLBACK: rollback
|
||||
See <ulink url="http://w3c.github.io/webrtc-pc/#rtcsdptype">http://w3c.github.io/webrtc-pc/#rtcsdptype</ulink></doc>
|
||||
<member name="offer" value="1" c:identifier="GST_WEBRTC_SDP_TYPE_OFFER">
|
||||
</member>
|
||||
<member name="pranswer"
|
||||
value="2"
|
||||
c:identifier="GST_WEBRTC_SDP_TYPE_PRANSWER">
|
||||
</member>
|
||||
<member name="answer"
|
||||
value="3"
|
||||
c:identifier="GST_WEBRTC_SDP_TYPE_ANSWER">
|
||||
</member>
|
||||
<member name="rollback"
|
||||
value="4"
|
||||
c:identifier="GST_WEBRTC_SDP_TYPE_ROLLBACK">
|
||||
</member>
|
||||
</enumeration>
|
||||
<record name="WebRTCSessionDescription"
|
||||
c:type="GstWebRTCSessionDescription"
|
||||
glib:type-name="GstWebRTCSessionDescription"
|
||||
glib:get-type="gst_webrtc_session_description_get_type"
|
||||
c:symbol-prefix="webrtc_session_description">
|
||||
<doc xml:space="preserve">sdp: the #GstSDPMessage of the description
|
||||
See <ulink url="https://www.w3.org/TR/webrtc/#rtcsessiondescription-class">https://www.w3.org/TR/webrtc/#rtcsessiondescription-class</ulink></doc>
|
||||
<field name="type" writable="1">
|
||||
<type name="WebRTCSDPType" c:type="GstWebRTCSDPType"/>
|
||||
</field>
|
||||
<field name="sdp" writable="1">
|
||||
<type name="GstSdp.SDPMessage" c:type="GstSDPMessage*"/>
|
||||
</field>
|
||||
<constructor name="new"
|
||||
c:identifier="gst_webrtc_session_description_new">
|
||||
<return-value transfer-ownership="full">
|
||||
<doc xml:space="preserve">a new #GstWebRTCSessionDescription from @type
|
||||
and @sdp</doc>
|
||||
<type name="WebRTCSessionDescription"
|
||||
c:type="GstWebRTCSessionDescription*"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<parameter name="type" transfer-ownership="none">
|
||||
<doc xml:space="preserve">a #GstWebRTCSDPType</doc>
|
||||
<type name="WebRTCSDPType" c:type="GstWebRTCSDPType"/>
|
||||
</parameter>
|
||||
<parameter name="sdp" transfer-ownership="none">
|
||||
<doc xml:space="preserve">a #GstSDPMessage</doc>
|
||||
<type name="GstSdp.SDPMessage" c:type="GstSDPMessage*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</constructor>
|
||||
<method name="copy" c:identifier="gst_webrtc_session_description_copy">
|
||||
<return-value transfer-ownership="full">
|
||||
<doc xml:space="preserve">a new copy of @src</doc>
|
||||
<type name="WebRTCSessionDescription"
|
||||
c:type="GstWebRTCSessionDescription*"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="src" transfer-ownership="none">
|
||||
<doc xml:space="preserve">a #GstWebRTCSessionDescription</doc>
|
||||
<type name="WebRTCSessionDescription"
|
||||
c:type="const GstWebRTCSessionDescription*"/>
|
||||
</instance-parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="free" c:identifier="gst_webrtc_session_description_free">
|
||||
<doc xml:space="preserve">Free @desc and all associated resources</doc>
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="desc" transfer-ownership="full">
|
||||
<doc xml:space="preserve">a #GstWebRTCSessionDescription</doc>
|
||||
<type name="WebRTCSessionDescription"
|
||||
c:type="GstWebRTCSessionDescription*"/>
|
||||
</instance-parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
</record>
|
||||
<enumeration name="WebRTCSignalingState" c:type="GstWebRTCSignalingState">
|
||||
<doc xml:space="preserve">GST_WEBRTC_SIGNALING_STATE_STABLE: stable
|
||||
GST_WEBRTC_SIGNALING_STATE_CLOSED: closed
|
||||
GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER: have-local-offer
|
||||
GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER: have-remote-offer
|
||||
GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER: have-local-pranswer
|
||||
GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER: have-remote-pranswer
|
||||
See <ulink url="http://w3c.github.io/webrtc-pc/#dom-rtcsignalingstate">http://w3c.github.io/webrtc-pc/#dom-rtcsignalingstate</ulink></doc>
|
||||
<member name="stable"
|
||||
value="0"
|
||||
c:identifier="GST_WEBRTC_SIGNALING_STATE_STABLE">
|
||||
</member>
|
||||
<member name="closed"
|
||||
value="1"
|
||||
c:identifier="GST_WEBRTC_SIGNALING_STATE_CLOSED">
|
||||
</member>
|
||||
<member name="have_local_offer"
|
||||
value="2"
|
||||
c:identifier="GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER">
|
||||
</member>
|
||||
<member name="have_remote_offer"
|
||||
value="3"
|
||||
c:identifier="GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER">
|
||||
</member>
|
||||
<member name="have_local_pranswer"
|
||||
value="4"
|
||||
c:identifier="GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER">
|
||||
</member>
|
||||
<member name="have_remote_pranswer"
|
||||
value="5"
|
||||
c:identifier="GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER">
|
||||
</member>
|
||||
</enumeration>
|
||||
<enumeration name="WebRTCStatsType" c:type="GstWebRTCStatsType">
|
||||
<doc xml:space="preserve">GST_WEBRTC_STATS_CODEC: codec
|
||||
GST_WEBRTC_STATS_INBOUND_RTP: inbound-rtp
|
||||
GST_WEBRTC_STATS_OUTBOUND_RTP: outbound-rtp
|
||||
GST_WEBRTC_STATS_REMOTE_INBOUND_RTP: remote-inbound-rtp
|
||||
GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP: remote-outbound-rtp
|
||||
GST_WEBRTC_STATS_CSRC: csrc
|
||||
GST_WEBRTC_STATS_PEER_CONNECTION: peer-connectiion
|
||||
GST_WEBRTC_STATS_DATA_CHANNEL: data-channel
|
||||
GST_WEBRTC_STATS_STREAM: stream
|
||||
GST_WEBRTC_STATS_TRANSPORT: transport
|
||||
GST_WEBRTC_STATS_CANDIDATE_PAIR: candidate-pair
|
||||
GST_WEBRTC_STATS_LOCAL_CANDIDATE: local-candidate
|
||||
GST_WEBRTC_STATS_REMOTE_CANDIDATE: remote-candidate
|
||||
GST_WEBRTC_STATS_CERTIFICATE: certificate</doc>
|
||||
<member name="codec" value="1" c:identifier="GST_WEBRTC_STATS_CODEC">
|
||||
</member>
|
||||
<member name="inbound_rtp"
|
||||
value="2"
|
||||
c:identifier="GST_WEBRTC_STATS_INBOUND_RTP">
|
||||
</member>
|
||||
<member name="outbound_rtp"
|
||||
value="3"
|
||||
c:identifier="GST_WEBRTC_STATS_OUTBOUND_RTP">
|
||||
</member>
|
||||
<member name="remote_inbound_rtp"
|
||||
value="4"
|
||||
c:identifier="GST_WEBRTC_STATS_REMOTE_INBOUND_RTP">
|
||||
</member>
|
||||
<member name="remote_outbound_rtp"
|
||||
value="5"
|
||||
c:identifier="GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP">
|
||||
</member>
|
||||
<member name="csrc" value="6" c:identifier="GST_WEBRTC_STATS_CSRC">
|
||||
</member>
|
||||
<member name="peer_connection"
|
||||
value="7"
|
||||
c:identifier="GST_WEBRTC_STATS_PEER_CONNECTION">
|
||||
</member>
|
||||
<member name="data_channel"
|
||||
value="8"
|
||||
c:identifier="GST_WEBRTC_STATS_DATA_CHANNEL">
|
||||
</member>
|
||||
<member name="stream" value="9" c:identifier="GST_WEBRTC_STATS_STREAM">
|
||||
</member>
|
||||
<member name="transport"
|
||||
value="10"
|
||||
c:identifier="GST_WEBRTC_STATS_TRANSPORT">
|
||||
</member>
|
||||
<member name="candidate_pair"
|
||||
value="11"
|
||||
c:identifier="GST_WEBRTC_STATS_CANDIDATE_PAIR">
|
||||
</member>
|
||||
<member name="local_candidate"
|
||||
value="12"
|
||||
c:identifier="GST_WEBRTC_STATS_LOCAL_CANDIDATE">
|
||||
</member>
|
||||
<member name="remote_candidate"
|
||||
value="13"
|
||||
c:identifier="GST_WEBRTC_STATS_REMOTE_CANDIDATE">
|
||||
</member>
|
||||
<member name="certificate"
|
||||
value="14"
|
||||
c:identifier="GST_WEBRTC_STATS_CERTIFICATE">
|
||||
</member>
|
||||
</enumeration>
|
||||
<function name="webrtc_sdp_type_to_string"
|
||||
c:identifier="gst_webrtc_sdp_type_to_string">
|
||||
<return-value transfer-ownership="none">
|
||||
<doc xml:space="preserve">the string representation of @type or "unknown" when @type is not
|
||||
recognized.</doc>
|
||||
<type name="utf8" c:type="const gchar*"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<parameter name="type" transfer-ownership="none">
|
||||
<doc xml:space="preserve">a #GstWebRTCSDPType</doc>
|
||||
<type name="WebRTCSDPType" c:type="GstWebRTCSDPType"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</function>
|
||||
</namespace>
|
||||
</repository>
|
|
@ -2,6 +2,12 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
mod s_d_p_media;
|
||||
pub use self::s_d_p_media::SDPMedia;
|
||||
|
||||
mod s_d_p_message;
|
||||
pub use self::s_d_p_message::SDPMessage;
|
||||
|
||||
mod enums;
|
||||
pub use self::enums::MIKEYCacheType;
|
||||
pub use self::enums::MIKEYEncAlg;
|
||||
|
|
285
gstreamer-sdp/src/auto/s_d_p_media.rs
Normal file
285
gstreamer-sdp/src/auto/s_d_p_media.rs
Normal file
|
@ -0,0 +1,285 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use SDPResult;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gst;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct SDPMedia(Boxed<ffi::GstSDPMedia>);
|
||||
|
||||
match fn {
|
||||
copy => |ptr| ffi::gst_sdp_media_copy(mut_override(ptr)),
|
||||
free => |ptr| ffi::gst_sdp_media_free(ptr),
|
||||
}
|
||||
}
|
||||
|
||||
impl SDPMedia {
|
||||
pub fn add_attribute<'a, P: Into<Option<&'a str>>>(&mut self, key: &str, value: P) -> SDPResult {
|
||||
let value = value.into();
|
||||
let value = value.to_glib_none();
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_add_attribute(self.to_glib_none_mut().0, key.to_glib_none().0, value.0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_bandwidth(&mut self, bwtype: &str, bandwidth: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_add_bandwidth(self.to_glib_none_mut().0, bwtype.to_glib_none().0, bandwidth))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_connection(&mut self, nettype: &str, addrtype: &str, address: &str, ttl: u32, addr_number: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_add_connection(self.to_glib_none_mut().0, nettype.to_glib_none().0, addrtype.to_glib_none().0, address.to_glib_none().0, ttl, addr_number))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_format(&mut self, format: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_add_format(self.to_glib_none_mut().0, format.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_text(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_sdp_media_as_text(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn attributes_len(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_media_attributes_len(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn attributes_to_caps(&self, caps: &gst::Caps) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_attributes_to_caps(self.to_glib_none().0, caps.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn bandwidths_len(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_media_bandwidths_len(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connections_len(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_media_connections_len(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn formats_len(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_media_formats_len(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn get_attribute(&self, idx: u32) -> /*Ignored*/Option<SDPAttribute> {
|
||||
// unsafe { TODO: call ffi::gst_sdp_media_get_attribute() }
|
||||
//}
|
||||
|
||||
pub fn get_attribute_val(&self, key: &str) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_media_get_attribute_val(self.to_glib_none().0, key.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_attribute_val_n(&self, key: &str, nth: u32) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_media_get_attribute_val_n(self.to_glib_none().0, key.to_glib_none().0, nth))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn get_bandwidth(&self, idx: u32) -> /*Ignored*/Option<SDPBandwidth> {
|
||||
// unsafe { TODO: call ffi::gst_sdp_media_get_bandwidth() }
|
||||
//}
|
||||
|
||||
pub fn get_caps_from_media(&self, pt: i32) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_sdp_media_get_caps_from_media(self.to_glib_none().0, pt))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn get_connection(&self, idx: u32) -> /*Ignored*/Option<SDPConnection> {
|
||||
// unsafe { TODO: call ffi::gst_sdp_media_get_connection() }
|
||||
//}
|
||||
|
||||
pub fn get_format(&self, idx: u32) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_media_get_format(self.to_glib_none().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_information(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_media_get_information(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn get_key(&self) -> /*Ignored*/Option<SDPKey> {
|
||||
// unsafe { TODO: call ffi::gst_sdp_media_get_key() }
|
||||
//}
|
||||
|
||||
pub fn get_media(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_media_get_media(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_num_ports(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_media_get_num_ports(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_port(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_media_get_port(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_proto(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_media_get_proto(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn init(&mut self) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_init(self.to_glib_none_mut().0))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn insert_attribute(&mut self, idx: i32, attr: /*Ignored*/&mut SDPAttribute) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_media_insert_attribute() }
|
||||
//}
|
||||
|
||||
//pub fn insert_bandwidth(&mut self, idx: i32, bw: /*Ignored*/&mut SDPBandwidth) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_media_insert_bandwidth() }
|
||||
//}
|
||||
|
||||
//pub fn insert_connection(&mut self, idx: i32, conn: /*Ignored*/&mut SDPConnection) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_media_insert_connection() }
|
||||
//}
|
||||
|
||||
pub fn insert_format(&mut self, idx: i32, format: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_insert_format(self.to_glib_none_mut().0, idx, format.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//#[cfg(any(feature = "v1_8_1", feature = "dox"))]
|
||||
//pub fn parse_keymgmt(&self, mikey: /*Ignored*/MIKEYMessage) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_media_parse_keymgmt() }
|
||||
//}
|
||||
|
||||
pub fn remove_attribute(&mut self, idx: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_remove_attribute(self.to_glib_none_mut().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_bandwidth(&mut self, idx: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_remove_bandwidth(self.to_glib_none_mut().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_connection(&mut self, idx: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_remove_connection(self.to_glib_none_mut().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_format(&mut self, idx: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_remove_format(self.to_glib_none_mut().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn replace_attribute(&mut self, idx: u32, attr: /*Ignored*/&mut SDPAttribute) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_media_replace_attribute() }
|
||||
//}
|
||||
|
||||
//pub fn replace_bandwidth(&mut self, idx: u32, bw: /*Ignored*/&mut SDPBandwidth) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_media_replace_bandwidth() }
|
||||
//}
|
||||
|
||||
//pub fn replace_connection(&mut self, idx: u32, conn: /*Ignored*/&mut SDPConnection) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_media_replace_connection() }
|
||||
//}
|
||||
|
||||
pub fn replace_format(&mut self, idx: u32, format: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_replace_format(self.to_glib_none_mut().0, idx, format.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_information(&mut self, information: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_set_information(self.to_glib_none_mut().0, information.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_key(&mut self, type_: &str, data: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_set_key(self.to_glib_none_mut().0, type_.to_glib_none().0, data.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_media(&mut self, med: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_set_media(self.to_glib_none_mut().0, med.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_port_info(&mut self, port: u32, num_ports: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_set_port_info(self.to_glib_none_mut().0, port, num_ports))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_proto(&mut self, proto: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_set_proto(self.to_glib_none_mut().0, proto.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn uninit(&mut self) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_uninit(self.to_glib_none_mut().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new() -> (SDPResult, SDPMedia) {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
let mut media = ptr::null_mut();
|
||||
let ret = from_glib(ffi::gst_sdp_media_new(&mut media));
|
||||
(ret, from_glib_full(media))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_media_from_caps(caps: &gst::Caps, media: &mut SDPMedia) -> SDPResult {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_media_set_media_from_caps(caps.to_glib_none().0, media.to_glib_none_mut().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for SDPMedia {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for SDPMedia {}
|
380
gstreamer-sdp/src/auto/s_d_p_message.rs
Normal file
380
gstreamer-sdp/src/auto/s_d_p_message.rs
Normal file
|
@ -0,0 +1,380 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use SDPMedia;
|
||||
use SDPResult;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use gst;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct SDPMessage(Boxed<ffi::GstSDPMessage>);
|
||||
|
||||
match fn {
|
||||
copy => |ptr| gobject_ffi::g_boxed_copy(ffi::gst_sdp_message_get_type(), ptr as *mut _) as *mut ffi::GstSDPMessage,
|
||||
free => |ptr| gobject_ffi::g_boxed_free(ffi::gst_sdp_message_get_type(), ptr as *mut _),
|
||||
get_type => || ffi::gst_sdp_message_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl SDPMessage {
|
||||
pub fn add_attribute<'a, P: Into<Option<&'a str>>>(&mut self, key: &str, value: P) -> SDPResult {
|
||||
let value = value.into();
|
||||
let value = value.to_glib_none();
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_add_attribute(self.to_glib_none_mut().0, key.to_glib_none().0, value.0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_bandwidth(&mut self, bwtype: &str, bandwidth: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_add_bandwidth(self.to_glib_none_mut().0, bwtype.to_glib_none().0, bandwidth))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_email(&mut self, email: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_add_email(self.to_glib_none_mut().0, email.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_media(&mut self, media: &mut SDPMedia) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_add_media(self.to_glib_none_mut().0, media.to_glib_none_mut().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_phone(&mut self, phone: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_add_phone(self.to_glib_none_mut().0, phone.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_time(&mut self, start: &str, stop: &str, repeat: &[&str]) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_add_time(self.to_glib_none_mut().0, start.to_glib_none().0, stop.to_glib_none().0, repeat.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_zone(&mut self, adj_time: &str, typed_time: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_add_zone(self.to_glib_none_mut().0, adj_time.to_glib_none().0, typed_time.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_text(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_sdp_message_as_text(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn attributes_len(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_message_attributes_len(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn attributes_to_caps(&self, caps: &gst::Caps) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_attributes_to_caps(self.to_glib_none().0, caps.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn bandwidths_len(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_message_bandwidths_len(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn dump(&self) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_dump(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn emails_len(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_message_emails_len(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn get_attribute(&self, idx: u32) -> /*Ignored*/Option<SDPAttribute> {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_get_attribute() }
|
||||
//}
|
||||
|
||||
pub fn get_attribute_val(&self, key: &str) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_message_get_attribute_val(self.to_glib_none().0, key.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_attribute_val_n(&self, key: &str, nth: u32) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_message_get_attribute_val_n(self.to_glib_none().0, key.to_glib_none().0, nth))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn get_bandwidth(&self, idx: u32) -> /*Ignored*/Option<SDPBandwidth> {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_get_bandwidth() }
|
||||
//}
|
||||
|
||||
//pub fn get_connection(&self) -> /*Ignored*/Option<SDPConnection> {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_get_connection() }
|
||||
//}
|
||||
|
||||
pub fn get_email(&self, idx: u32) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_message_get_email(self.to_glib_none().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_information(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_message_get_information(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn get_key(&self) -> /*Ignored*/Option<SDPKey> {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_get_key() }
|
||||
//}
|
||||
|
||||
pub fn get_media(&self, idx: u32) -> Option<SDPMedia> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_message_get_media(self.to_glib_none().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn get_origin(&self) -> /*Ignored*/Option<SDPOrigin> {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_get_origin() }
|
||||
//}
|
||||
|
||||
pub fn get_phone(&self, idx: u32) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_message_get_phone(self.to_glib_none().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_session_name(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_message_get_session_name(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn get_time(&self, idx: u32) -> /*Ignored*/Option<SDPTime> {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_get_time() }
|
||||
//}
|
||||
|
||||
pub fn get_uri(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_message_get_uri(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_version(&self) -> Option<String> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_sdp_message_get_version(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn get_zone(&self, idx: u32) -> /*Ignored*/Option<SDPZone> {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_get_zone() }
|
||||
//}
|
||||
|
||||
pub fn init(&mut self) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_init(self.to_glib_none_mut().0))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn insert_attribute(&mut self, idx: i32, attr: /*Ignored*/&mut SDPAttribute) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_insert_attribute() }
|
||||
//}
|
||||
|
||||
//pub fn insert_bandwidth(&mut self, idx: i32, bw: /*Ignored*/&mut SDPBandwidth) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_insert_bandwidth() }
|
||||
//}
|
||||
|
||||
pub fn insert_email(&mut self, idx: i32, email: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_insert_email(self.to_glib_none_mut().0, idx, email.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn insert_phone(&mut self, idx: i32, phone: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_insert_phone(self.to_glib_none_mut().0, idx, phone.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn insert_time(&mut self, idx: i32, t: /*Ignored*/&mut SDPTime) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_insert_time() }
|
||||
//}
|
||||
|
||||
//pub fn insert_zone(&mut self, idx: i32, zone: /*Ignored*/&mut SDPZone) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_insert_zone() }
|
||||
//}
|
||||
|
||||
pub fn medias_len(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_message_medias_len(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
//#[cfg(any(feature = "v1_8_1", feature = "dox"))]
|
||||
//pub fn parse_keymgmt(&self, mikey: /*Ignored*/MIKEYMessage) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_parse_keymgmt() }
|
||||
//}
|
||||
|
||||
pub fn phones_len(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_message_phones_len(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_attribute(&mut self, idx: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_remove_attribute(self.to_glib_none_mut().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_bandwidth(&mut self, idx: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_remove_bandwidth(self.to_glib_none_mut().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_email(&mut self, idx: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_remove_email(self.to_glib_none_mut().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_phone(&mut self, idx: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_remove_phone(self.to_glib_none_mut().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_time(&mut self, idx: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_remove_time(self.to_glib_none_mut().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn remove_zone(&mut self, idx: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_remove_zone(self.to_glib_none_mut().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn replace_attribute(&mut self, idx: u32, attr: /*Ignored*/&mut SDPAttribute) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_replace_attribute() }
|
||||
//}
|
||||
|
||||
//pub fn replace_bandwidth(&mut self, idx: u32, bw: /*Ignored*/&mut SDPBandwidth) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_replace_bandwidth() }
|
||||
//}
|
||||
|
||||
pub fn replace_email(&mut self, idx: u32, email: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_replace_email(self.to_glib_none_mut().0, idx, email.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn replace_phone(&mut self, idx: u32, phone: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_replace_phone(self.to_glib_none_mut().0, idx, phone.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn replace_time(&mut self, idx: u32, t: /*Ignored*/&mut SDPTime) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_replace_time() }
|
||||
//}
|
||||
|
||||
//pub fn replace_zone(&mut self, idx: u32, zone: /*Ignored*/&mut SDPZone) -> SDPResult {
|
||||
// unsafe { TODO: call ffi::gst_sdp_message_replace_zone() }
|
||||
//}
|
||||
|
||||
pub fn set_connection(&mut self, nettype: &str, addrtype: &str, address: &str, ttl: u32, addr_number: u32) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_set_connection(self.to_glib_none_mut().0, nettype.to_glib_none().0, addrtype.to_glib_none().0, address.to_glib_none().0, ttl, addr_number))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_information(&mut self, information: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_set_information(self.to_glib_none_mut().0, information.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_key(&mut self, type_: &str, data: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_set_key(self.to_glib_none_mut().0, type_.to_glib_none().0, data.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_origin(&mut self, username: &str, sess_id: &str, sess_version: &str, nettype: &str, addrtype: &str, addr: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_set_origin(self.to_glib_none_mut().0, username.to_glib_none().0, sess_id.to_glib_none().0, sess_version.to_glib_none().0, nettype.to_glib_none().0, addrtype.to_glib_none().0, addr.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_session_name(&mut self, session_name: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_set_session_name(self.to_glib_none_mut().0, session_name.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uri(&mut self, uri: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_set_uri(self.to_glib_none_mut().0, uri.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_version(&mut self, version: &str) -> SDPResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_set_version(self.to_glib_none_mut().0, version.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn times_len(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_message_times_len(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn zones_len(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_sdp_message_zones_len(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_uri(scheme: &str, msg: &SDPMessage) -> Option<String> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_sdp_message_as_uri(scheme.to_glib_none().0, msg.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parse_buffer(data: &[u8], msg: &mut SDPMessage) -> SDPResult {
|
||||
assert_initialized_main_thread!();
|
||||
let size = data.len() as u32;
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_parse_buffer(data.to_glib_none().0, size, msg.to_glib_none_mut().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parse_uri(uri: &str, msg: &mut SDPMessage) -> SDPResult {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib(ffi::gst_sdp_message_parse_uri(uri.to_glib_none().0, msg.to_glib_none_mut().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for SDPMessage {}
|
10
gstreamer-sdp/src/auto/s_d_p_time.rs
Normal file
10
gstreamer-sdp/src/auto/s_d_p_time.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use SDPResult;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use std::mem;
|
||||
use std::ptr;
|
11
gstreamer-sdp/src/s_d_p_message.rs
Normal file
11
gstreamer-sdp/src/s_d_p_message.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
impl SDPMessage {
|
||||
pub fn new() -> SDPMessage {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
let msg = glib_ffi::g_malloc(mem::size_of::<ffi::GstSDPMessage>());
|
||||
let _ = ffi::gst_sdp_message_new(msg);
|
||||
from_glib_full(msg)
|
||||
}
|
||||
}
|
||||
}
|
36
gstreamer-webrtc/Cargo.toml
Normal file
36
gstreamer-webrtc/Cargo.toml
Normal file
|
@ -0,0 +1,36 @@
|
|||
[package]
|
||||
name = "gstreamer-webrtc"
|
||||
version = "0.11.0"
|
||||
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
|
||||
categories = ["api-bindings", "multimedia"]
|
||||
description = "Rust bindings for GStreamer WebRTC library"
|
||||
repository = "https://github.com/sdroege/gstreamer-rs"
|
||||
license = "MIT/Apache-2.0"
|
||||
readme = "README.md"
|
||||
homepage = "https://gstreamer.freedesktop.org"
|
||||
documentation = "https://sdroege.github.io/rustdoc/gstreamer/gstreamer_webrtc"
|
||||
keywords = ["gstreamer", "multimedia", "audio", "video", "gnome"]
|
||||
build = "build.rs"
|
||||
|
||||
[dependencies]
|
||||
libc = "0.2"
|
||||
glib-sys = { git = "https://github.com/gtk-rs/sys" }
|
||||
gobject-sys = { git = "https://github.com/gtk-rs/sys" }
|
||||
gstreamer-sys = { git = "https://github.com/sdroege/gstreamer-sys", branch = "1.14" }
|
||||
gstreamer-webrtc-sys = { git = "https://github.com/sdroege/gstreamer-sys", branch = "1.14" }
|
||||
glib = { git = "https://github.com/gtk-rs/glib" }
|
||||
gstreamer = { path = "../gstreamer", features = ["v1_14"] }
|
||||
gstreamer-sdp = { path = "../gstreamer-sdp" }
|
||||
|
||||
[build-dependencies.rustdoc-stripper]
|
||||
version = "0.1"
|
||||
optional = true
|
||||
|
||||
[features]
|
||||
embed-lgpl-docs = ["rustdoc-stripper"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-webrtc-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||
default-features = []
|
||||
|
||||
[badges]
|
||||
travis-ci = { repository = "sdroege/gstreamer-rs", branch = "master" }
|
34
gstreamer-webrtc/build.rs
Normal file
34
gstreamer-webrtc/build.rs
Normal file
|
@ -0,0 +1,34 @@
|
|||
fn main() {
|
||||
manage_docs();
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs"))]
|
||||
fn manage_docs() {
|
||||
extern crate stripper_lib;
|
||||
use std::io;
|
||||
|
||||
let path = "src";
|
||||
let ignores: &[&str] = &[];
|
||||
|
||||
stripper_lib::loop_over_files(
|
||||
path.as_ref(),
|
||||
&mut |w, s| stripper_lib::strip_comments(w, s, &mut io::sink(), true),
|
||||
&ignores,
|
||||
false,
|
||||
);
|
||||
|
||||
#[cfg(feature = "embed-lgpl-docs")]
|
||||
{
|
||||
let docs = include_str!("../docs/gstreamer-webrtc/docs.md");
|
||||
let mut infos = stripper_lib::parse_cmts(docs.lines(), true);
|
||||
stripper_lib::loop_over_files(
|
||||
path.as_ref(),
|
||||
&mut |w, s| stripper_lib::regenerate_comments(w, s, &mut infos, true, true),
|
||||
&ignores,
|
||||
false,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(any(feature = "embed-lgpl-docs", feature = "purge-lgpl-docs")))]
|
||||
fn manage_docs() {}
|
238
gstreamer-webrtc/src/auto/enums.rs
Normal file
238
gstreamer-webrtc/src/auto/enums.rs
Normal file
|
@ -0,0 +1,238 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||
pub enum WebRTCDTLSTransportState {
|
||||
New,
|
||||
Closed,
|
||||
Failed,
|
||||
Connecting,
|
||||
Connected,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for WebRTCDTLSTransportState {
|
||||
type GlibType = ffi::GstWebRTCDTLSTransportState;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstWebRTCDTLSTransportState {
|
||||
match *self {
|
||||
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,
|
||||
WebRTCDTLSTransportState::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstWebRTCDTLSTransportState> for WebRTCDTLSTransportState {
|
||||
fn from_glib(value: ffi::GstWebRTCDTLSTransportState) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => WebRTCDTLSTransportState::New,
|
||||
1 => WebRTCDTLSTransportState::Closed,
|
||||
2 => WebRTCDTLSTransportState::Failed,
|
||||
3 => WebRTCDTLSTransportState::Connecting,
|
||||
4 => WebRTCDTLSTransportState::Connected,
|
||||
value => WebRTCDTLSTransportState::__Unknown(value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||
pub enum WebRTCICEComponent {
|
||||
Rtp,
|
||||
Rtcp,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for WebRTCICEComponent {
|
||||
type GlibType = ffi::GstWebRTCICEComponent;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstWebRTCICEComponent {
|
||||
match *self {
|
||||
WebRTCICEComponent::Rtp => ffi::GST_WEBRTC_ICE_COMPONENT_RTP,
|
||||
WebRTCICEComponent::Rtcp => ffi::GST_WEBRTC_ICE_COMPONENT_RTCP,
|
||||
WebRTCICEComponent::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstWebRTCICEComponent> for WebRTCICEComponent {
|
||||
fn from_glib(value: ffi::GstWebRTCICEComponent) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => WebRTCICEComponent::Rtp,
|
||||
1 => WebRTCICEComponent::Rtcp,
|
||||
value => WebRTCICEComponent::__Unknown(value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||
pub enum WebRTCICEConnectionState {
|
||||
New,
|
||||
Checking,
|
||||
Connected,
|
||||
Completed,
|
||||
Failed,
|
||||
Disconnected,
|
||||
Closed,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for WebRTCICEConnectionState {
|
||||
type GlibType = ffi::GstWebRTCICEConnectionState;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstWebRTCICEConnectionState {
|
||||
match *self {
|
||||
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,
|
||||
WebRTCICEConnectionState::Disconnected => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED,
|
||||
WebRTCICEConnectionState::Closed => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED,
|
||||
WebRTCICEConnectionState::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstWebRTCICEConnectionState> for WebRTCICEConnectionState {
|
||||
fn from_glib(value: ffi::GstWebRTCICEConnectionState) -> Self {
|
||||
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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||
pub enum WebRTCICEGatheringState {
|
||||
New,
|
||||
Gathering,
|
||||
Complete,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for WebRTCICEGatheringState {
|
||||
type GlibType = ffi::GstWebRTCICEGatheringState;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstWebRTCICEGatheringState {
|
||||
match *self {
|
||||
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,
|
||||
WebRTCICEGatheringState::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstWebRTCICEGatheringState> for WebRTCICEGatheringState {
|
||||
fn from_glib(value: ffi::GstWebRTCICEGatheringState) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => WebRTCICEGatheringState::New,
|
||||
1 => WebRTCICEGatheringState::Gathering,
|
||||
2 => WebRTCICEGatheringState::Complete,
|
||||
value => WebRTCICEGatheringState::__Unknown(value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||
pub enum WebRTCICERole {
|
||||
Controlled,
|
||||
Controlling,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for WebRTCICERole {
|
||||
type GlibType = ffi::GstWebRTCICERole;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstWebRTCICERole {
|
||||
match *self {
|
||||
WebRTCICERole::Controlled => ffi::GST_WEBRTC_ICE_ROLE_CONTROLLED,
|
||||
WebRTCICERole::Controlling => ffi::GST_WEBRTC_ICE_ROLE_CONTROLLING,
|
||||
WebRTCICERole::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstWebRTCICERole> for WebRTCICERole {
|
||||
fn from_glib(value: ffi::GstWebRTCICERole) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => WebRTCICERole::Controlled,
|
||||
1 => WebRTCICERole::Controlling,
|
||||
value => WebRTCICERole::__Unknown(value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
|
||||
pub enum WebRTCSDPType {
|
||||
Offer,
|
||||
Pranswer,
|
||||
Answer,
|
||||
Rollback,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for WebRTCSDPType {
|
||||
type GlibType = ffi::GstWebRTCSDPType;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstWebRTCSDPType {
|
||||
match *self {
|
||||
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,
|
||||
WebRTCSDPType::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstWebRTCSDPType> for WebRTCSDPType {
|
||||
fn from_glib(value: ffi::GstWebRTCSDPType) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
1 => WebRTCSDPType::Offer,
|
||||
2 => WebRTCSDPType::Pranswer,
|
||||
3 => WebRTCSDPType::Answer,
|
||||
4 => WebRTCSDPType::Rollback,
|
||||
value => WebRTCSDPType::__Unknown(value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
7
gstreamer-webrtc/src/auto/flags.rs
Normal file
7
gstreamer-webrtc/src/auto/flags.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
|
33
gstreamer-webrtc/src/auto/mod.rs
Normal file
33
gstreamer-webrtc/src/auto/mod.rs
Normal file
|
@ -0,0 +1,33 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
mod web_r_t_c_d_t_l_s_transport;
|
||||
pub use self::web_r_t_c_d_t_l_s_transport::WebRTCDTLSTransport;
|
||||
|
||||
mod web_r_t_c_i_c_e_transport;
|
||||
pub use self::web_r_t_c_i_c_e_transport::WebRTCICETransport;
|
||||
|
||||
mod web_r_t_c_r_t_p_receiver;
|
||||
pub use self::web_r_t_c_r_t_p_receiver::WebRTCRTPReceiver;
|
||||
|
||||
mod web_r_t_c_r_t_p_sender;
|
||||
pub use self::web_r_t_c_r_t_p_sender::WebRTCRTPSender;
|
||||
|
||||
mod web_r_t_c_r_t_p_transceiver;
|
||||
pub use self::web_r_t_c_r_t_p_transceiver::WebRTCRTPTransceiver;
|
||||
|
||||
mod web_r_t_c_session_description;
|
||||
pub use self::web_r_t_c_session_description::WebRTCSessionDescription;
|
||||
|
||||
mod enums;
|
||||
pub use self::enums::WebRTCDTLSTransportState;
|
||||
pub use self::enums::WebRTCICEComponent;
|
||||
pub use self::enums::WebRTCICEConnectionState;
|
||||
pub use self::enums::WebRTCICEGatheringState;
|
||||
pub use self::enums::WebRTCICERole;
|
||||
pub use self::enums::WebRTCSDPType;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub mod traits {
|
||||
}
|
187
gstreamer-webrtc/src/auto/web_r_t_c_d_t_l_s_transport.rs
Normal file
187
gstreamer-webrtc/src/auto/web_r_t_c_d_t_l_s_transport.rs
Normal file
|
@ -0,0 +1,187 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use WebRTCICETransport;
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCDTLSTransport(Object<ffi::GstWebRTCDTLSTransport, ffi::GstWebRTCDTLSTransportClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_webrtc_dtls_transport_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl WebRTCDTLSTransport {
|
||||
pub fn new(session_id: u32, rtcp: bool) -> WebRTCDTLSTransport {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_webrtc_dtls_transport_new(session_id, rtcp.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_transport(&self, ice: &WebRTCICETransport) {
|
||||
unsafe {
|
||||
ffi::gst_webrtc_dtls_transport_set_transport(self.to_glib_none().0, ice.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_certificate(&self) -> Option<String> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<String as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "certificate".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_certificate(&self, certificate: Option<&str>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "certificate".to_glib_none().0, Value::from(certificate).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_client(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "client".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_client(&self, client: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0, "client".to_glib_none().0, Value::from(&client).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_remote_certificate(&self) -> Option<String> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<String as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "remote-certificate".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_rtcp(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "rtcp".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_session_id(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "session-id".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_transport(&self) -> Option<WebRTCICETransport> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<WebRTCICETransport as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "transport".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_certificate_notify<F: Fn(&WebRTCDTLSTransport) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&WebRTCDTLSTransport) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::certificate",
|
||||
transmute(notify_certificate_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_client_notify<F: Fn(&WebRTCDTLSTransport) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&WebRTCDTLSTransport) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::client",
|
||||
transmute(notify_client_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_remote_certificate_notify<F: Fn(&WebRTCDTLSTransport) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&WebRTCDTLSTransport) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::remote-certificate",
|
||||
transmute(notify_remote_certificate_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_rtcp_notify<F: Fn(&WebRTCDTLSTransport) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&WebRTCDTLSTransport) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::rtcp",
|
||||
transmute(notify_rtcp_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_session_id_notify<F: Fn(&WebRTCDTLSTransport) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&WebRTCDTLSTransport) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::session-id",
|
||||
transmute(notify_session_id_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_transport_notify<F: Fn(&WebRTCDTLSTransport) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&WebRTCDTLSTransport) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::transport",
|
||||
transmute(notify_transport_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for WebRTCDTLSTransport {}
|
||||
unsafe impl Sync for WebRTCDTLSTransport {}
|
||||
|
||||
unsafe extern "C" fn notify_certificate_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_client_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_remote_certificate_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_rtcp_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_session_id_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_transport_trampoline(this: *mut ffi::GstWebRTCDTLSTransport, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&WebRTCDTLSTransport) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
83
gstreamer-webrtc/src/auto/web_r_t_c_i_c_e_transport.rs
Normal file
83
gstreamer-webrtc/src/auto/web_r_t_c_i_c_e_transport.rs
Normal file
|
@ -0,0 +1,83 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use WebRTCICEComponent;
|
||||
use WebRTCICEConnectionState;
|
||||
use WebRTCICEGatheringState;
|
||||
use ffi;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use libc;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCICETransport(Object<ffi::GstWebRTCICETransport, ffi::GstWebRTCICETransportClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_webrtc_ice_transport_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl WebRTCICETransport {
|
||||
pub fn connection_state_change(&self, new_state: WebRTCICEConnectionState) {
|
||||
unsafe {
|
||||
ffi::gst_webrtc_ice_transport_connection_state_change(self.to_glib_none().0, new_state.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn gathering_state_change(&self, new_state: WebRTCICEGatheringState) {
|
||||
unsafe {
|
||||
ffi::gst_webrtc_ice_transport_gathering_state_change(self.to_glib_none().0, new_state.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_candidate(&self, stream_id: u32, component: WebRTCICEComponent, attr: &str) {
|
||||
unsafe {
|
||||
ffi::gst_webrtc_ice_transport_new_candidate(self.to_glib_none().0, stream_id, component.to_glib(), attr.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn selected_pair_change(&self) {
|
||||
unsafe {
|
||||
ffi::gst_webrtc_ice_transport_selected_pair_change(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_on_new_candidate<F: Fn(&WebRTCICETransport, &str) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&WebRTCICETransport, &str) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "on-new-candidate",
|
||||
transmute(on_new_candidate_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_on_selected_candidate_pair_change<F: Fn(&WebRTCICETransport) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&WebRTCICETransport) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "on-selected-candidate-pair-change",
|
||||
transmute(on_selected_candidate_pair_change_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for WebRTCICETransport {}
|
||||
unsafe impl Sync for WebRTCICETransport {}
|
||||
|
||||
unsafe extern "C" fn on_new_candidate_trampoline(this: *mut ffi::GstWebRTCICETransport, object: *mut libc::c_char, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&WebRTCICETransport, &str) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_borrow(this), &String::from_glib_none(object))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn on_selected_candidate_pair_change_trampoline(this: *mut ffi::GstWebRTCICETransport, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&WebRTCICETransport) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
49
gstreamer-webrtc/src/auto/web_r_t_c_r_t_p_receiver.rs
Normal file
49
gstreamer-webrtc/src/auto/web_r_t_c_r_t_p_receiver.rs
Normal file
|
@ -0,0 +1,49 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use WebRTCDTLSTransport;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCRTPReceiver(Object<ffi::GstWebRTCRTPReceiver, ffi::GstWebRTCRTPReceiverClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_webrtc_rtp_receiver_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl WebRTCRTPReceiver {
|
||||
pub fn new() -> WebRTCRTPReceiver {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_webrtc_rtp_receiver_new())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_rtcp_transport(&self, transport: &WebRTCDTLSTransport) {
|
||||
unsafe {
|
||||
ffi::gst_webrtc_rtp_receiver_set_rtcp_transport(self.to_glib_none().0, transport.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_transport(&self, transport: &WebRTCDTLSTransport) {
|
||||
unsafe {
|
||||
ffi::gst_webrtc_rtp_receiver_set_transport(self.to_glib_none().0, transport.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for WebRTCRTPReceiver {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for WebRTCRTPReceiver {}
|
||||
unsafe impl Sync for WebRTCRTPReceiver {}
|
49
gstreamer-webrtc/src/auto/web_r_t_c_r_t_p_sender.rs
Normal file
49
gstreamer-webrtc/src/auto/web_r_t_c_r_t_p_sender.rs
Normal file
|
@ -0,0 +1,49 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use WebRTCDTLSTransport;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCRTPSender(Object<ffi::GstWebRTCRTPSender, ffi::GstWebRTCRTPSenderClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_webrtc_rtp_sender_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl WebRTCRTPSender {
|
||||
pub fn new() -> WebRTCRTPSender {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_webrtc_rtp_sender_new())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_rtcp_transport(&self, transport: &WebRTCDTLSTransport) {
|
||||
unsafe {
|
||||
ffi::gst_webrtc_rtp_sender_set_rtcp_transport(self.to_glib_none().0, transport.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_transport(&self, transport: &WebRTCDTLSTransport) {
|
||||
unsafe {
|
||||
ffi::gst_webrtc_rtp_sender_set_transport(self.to_glib_none().0, transport.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for WebRTCRTPSender {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for WebRTCRTPSender {}
|
||||
unsafe impl Sync for WebRTCRTPSender {}
|
97
gstreamer-webrtc/src/auto/web_r_t_c_r_t_p_transceiver.rs
Normal file
97
gstreamer-webrtc/src/auto/web_r_t_c_r_t_p_transceiver.rs
Normal file
|
@ -0,0 +1,97 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use WebRTCRTPReceiver;
|
||||
use WebRTCRTPSender;
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCRTPTransceiver(Object<ffi::GstWebRTCRTPTransceiver, ffi::GstWebRTCRTPTransceiverClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_webrtc_rtp_transceiver_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl WebRTCRTPTransceiver {
|
||||
pub fn get_property_mlineindex(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "mlineindex".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_receiver(&self) -> Option<WebRTCRTPReceiver> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<WebRTCRTPReceiver as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "receiver".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_sender(&self) -> Option<WebRTCRTPSender> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<WebRTCRTPSender as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0, "sender".to_glib_none().0, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_mlineindex_notify<F: Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::mlineindex",
|
||||
transmute(notify_mlineindex_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_receiver_notify<F: Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::receiver",
|
||||
transmute(notify_receiver_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connect_property_sender_notify<F: Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe {
|
||||
let f: Box_<Box_<Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static>> = Box_::new(Box_::new(f));
|
||||
connect(self.to_glib_none().0, "notify::sender",
|
||||
transmute(notify_sender_trampoline as usize), Box_::into_raw(f) as *mut _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for WebRTCRTPTransceiver {}
|
||||
unsafe impl Sync for WebRTCRTPTransceiver {}
|
||||
|
||||
unsafe extern "C" fn notify_mlineindex_trampoline(this: *mut ffi::GstWebRTCRTPTransceiver, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_receiver_trampoline(this: *mut ffi::GstWebRTCRTPTransceiver, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_sender_trampoline(this: *mut ffi::GstWebRTCRTPTransceiver, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
callback_guard!();
|
||||
let f: &&(Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static) = transmute(f);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
34
gstreamer-webrtc/src/auto/web_r_t_c_session_description.rs
Normal file
34
gstreamer-webrtc/src/auto/web_r_t_c_session_description.rs
Normal file
|
@ -0,0 +1,34 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir @ d1e0127)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
// DO NOT EDIT
|
||||
|
||||
use WebRTCSDPType;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use gst_sdp;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCSessionDescription(Boxed<ffi::GstWebRTCSessionDescription>);
|
||||
|
||||
match fn {
|
||||
copy => |ptr| ffi::gst_webrtc_session_description_copy(mut_override(ptr)),
|
||||
free => |ptr| ffi::gst_webrtc_session_description_free(ptr),
|
||||
get_type => || ffi::gst_webrtc_session_description_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl WebRTCSessionDescription {
|
||||
pub fn new(type_: WebRTCSDPType, sdp: &mut gst_sdp::SDPMessage) -> WebRTCSessionDescription {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_webrtc_session_description_new(type_.to_glib(), sdp.to_glib_none_mut().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for WebRTCSessionDescription {}
|
||||
unsafe impl Sync for WebRTCSessionDescription {}
|
55
gstreamer-webrtc/src/lib.rs
Normal file
55
gstreamer-webrtc/src/lib.rs
Normal file
|
@ -0,0 +1,55 @@
|
|||
// Copyright (C) 2018 Sebastian Dröge <sebastian@centricular.com>
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
extern crate libc;
|
||||
|
||||
#[macro_use]
|
||||
extern crate glib;
|
||||
extern crate glib_sys as glib_ffi;
|
||||
extern crate gobject_sys as gobject_ffi;
|
||||
extern crate gstreamer_sys as gst_ffi;
|
||||
extern crate gstreamer_webrtc_sys as ffi;
|
||||
extern crate gstreamer as gst;
|
||||
extern crate gstreamer_sdp as gst_sdp;
|
||||
|
||||
macro_rules! assert_initialized_main_thread {
|
||||
() => (
|
||||
if unsafe {::gst_ffi::gst_is_initialized()} != ::glib_ffi::GTRUE {
|
||||
panic!("GStreamer has not been initialized. Call `gst::init` first.");
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
macro_rules! skip_assert_initialized {
|
||||
() => (
|
||||
)
|
||||
}
|
||||
|
||||
macro_rules! callback_guard {
|
||||
() => (
|
||||
let _guard = ::glib::CallbackGuard::new();
|
||||
)
|
||||
}
|
||||
|
||||
pub use glib::{Cast, Continue, Error, IsA, StaticType, ToValue, Type, TypedValue, Value};
|
||||
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(unreadable_literal))]
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(transmute_ptr_to_ref))]
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))]
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(match_same_arms))]
|
||||
mod auto;
|
||||
pub use auto::*;
|
||||
|
||||
// Re-export all the traits in a prelude module, so that applications
|
||||
// can always "use gst::prelude::*" without getting conflicts
|
||||
pub mod prelude {
|
||||
pub use glib::prelude::*;
|
||||
pub use gst::prelude::*;
|
||||
|
||||
pub use auto::traits::*;
|
||||
}
|
Loading…
Reference in a new issue