Add gstreamer-webrtc-sys

This commit is contained in:
Sebastian Dröge 2018-03-15 12:18:06 +02:00
parent b488594eed
commit 9c390351c4
6 changed files with 1455 additions and 1 deletions

View file

@ -13,5 +13,6 @@ members = [
"gstreamer-net-sys",
"gstreamer-sdp-sys",
"gstreamer-rtsp-sys",
"gstreamer-rtsp-server-sys"
"gstreamer-rtsp-server-sys",
"gstreamer-webrtc-sys"
]

17
Gir_GstWebRTC.toml Normal file
View file

@ -0,0 +1,17 @@
[options]
girs_dir = "gir-files"
library = "GstWebRTC"
version = "1.0"
min_cfg_version = "1.0"
target_path = "gstreamer-webrtc-sys"
work_mode = "sys"
external_libraries = [
"GLib",
"GObject",
"Gst"
]
[external_libraries]
gstreamer="Gst"
gstreamer_sdp="GstSdp"

950
gir-files/GstWebRTC-1.0.gir Normal file
View file

@ -0,0 +1,950 @@
<?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">
<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 &lt;ulink url="http://w3c.github.io/webrtc-pc/#dom-rtciceconnectionstate"&gt;http://w3c.github.io/webrtc-pc/#dom-rtciceconnectionstate&lt;/ulink&gt;</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 &lt;ulink url="http://w3c.github.io/webrtc-pc/#dom-rtcicegatheringstate"&gt;http://w3c.github.io/webrtc-pc/#dom-rtcicegatheringstate&lt;/ulink&gt;</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>
<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="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>
<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 &lt;ulink url="http://w3c.github.io/webrtc-pc/#dom-rtcpeerconnectionstate"&gt;http://w3c.github.io/webrtc-pc/#dom-rtcpeerconnectionstate&lt;/ulink&gt;</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="get_parameters"
c:identifier="gst_webrtc_rtp_receiver_get_parameters">
<return-value transfer-ownership="full">
<type name="Gst.Structure" c:type="GstStructure*"/>
</return-value>
<parameters>
<instance-parameter name="receiver" transfer-ownership="none">
<type name="WebRTCRTPReceiver" c:type="GstWebRTCRTPReceiver*"/>
</instance-parameter>
<parameter name="kind" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</method>
<method name="set_parameters"
c:identifier="gst_webrtc_rtp_receiver_set_parameters">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="receiver" transfer-ownership="none">
<type name="WebRTCRTPReceiver" c:type="GstWebRTCRTPReceiver*"/>
</instance-parameter>
<parameter name="parameters" transfer-ownership="none">
<type name="Gst.Structure" c:type="GstStructure*"/>
</parameter>
</parameters>
</method>
<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"
introspectable="0">
<return-value transfer-ownership="none">
<type name="WebRTCRTPSender" c:type="GstWebRTCRTPSender*"/>
</return-value>
<parameters>
<parameter name="send_encodings" transfer-ownership="none">
<array name="GLib.Array" c:type="GArray*">
<type name="gpointer" c:type="gpointer"/>
</array>
</parameter>
</parameters>
</constructor>
<method name="get_parameters"
c:identifier="gst_webrtc_rtp_sender_get_parameters">
<return-value transfer-ownership="full">
<type name="Gst.Structure" c:type="GstStructure*"/>
</return-value>
<parameters>
<instance-parameter name="sender" transfer-ownership="none">
<type name="WebRTCRTPSender" c:type="GstWebRTCRTPSender*"/>
</instance-parameter>
<parameter name="kind" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</method>
<method name="set_parameters"
c:identifier="gst_webrtc_rtp_sender_set_parameters">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="sender" transfer-ownership="none">
<type name="WebRTCRTPSender" c:type="GstWebRTCRTPSender*"/>
</instance-parameter>
<parameter name="parameters" transfer-ownership="none">
<type name="Gst.Structure" c:type="GstStructure*"/>
</parameter>
</parameters>
</method>
<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">
<method name="stop" c:identifier="gst_webrtc_rtp_transceiver_stop">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="transceiver" transfer-ownership="none">
<type name="WebRTCRTPTransceiver"
c:type="GstWebRTCRTPTransceiver*"/>
</instance-parameter>
</parameters>
</method>
<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 &lt;ulink url="http://w3c.github.io/webrtc-pc/#rtcsdptype"&gt;http://w3c.github.io/webrtc-pc/#rtcsdptype&lt;/ulink&gt;</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 &lt;ulink url="https://www.w3.org/TR/webrtc/#rtcsessiondescription-class"&gt;https://www.w3.org/TR/webrtc/#rtcsessiondescription-class&lt;/ulink&gt;</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 &lt;ulink url="http://w3c.github.io/webrtc-pc/#dom-rtcsignalingstate"&gt;http://w3c.github.io/webrtc-pc/#dom-rtcsignalingstate&lt;/ulink&gt;</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>

View file

@ -0,0 +1,35 @@
[build-dependencies]
pkg-config = "0.3.7"
[dependencies]
libc = "0.2"
glib-sys = { git = "https://github.com/gtk-rs/sys" }
gobject-sys = { git = "https://github.com/gtk-rs/sys" }
[dependencies.gstreamer-sys]
path = "../gstreamer-sys"
[dependencies.gstreamer-sdp-sys]
path = "../gstreamer-sdp-sys"
[features]
dox = []
[lib]
name = "gstreamer_webrtc_sys"
[package]
build = "build.rs"
links = "gstwebrtc-1.0"
name = "gstreamer-webrtc-sys"
version = "0.5.0"
authors = ["Sebastian Dröge <sebastian@centricular.com>"]
description = "FFI bindings to libgstwebrtc-1.0"
homepage = "https://gstreamer.freedesktop.org"
keywords = ["ffi", "gstreamer", "gnome", "multimedia"]
repository = "https://github.com/sdroege/gstreamer-sys"
license = "MIT"
readme = "README.md"
[badges]
travis-ci = { repository = "sdroege/gstreamer-sys", branch = "master" }

View file

@ -0,0 +1,60 @@
extern crate pkg_config;
use pkg_config::{Config, Error};
use std::env;
use std::io::prelude::*;
use std::io;
use std::process;
fn main() {
if let Err(s) = find() {
let _ = writeln!(io::stderr(), "{}", s);
process::exit(1);
}
}
fn find() -> Result<(), Error> {
let package_name = "gstreamer-player-1.0";
let shared_libs = ["gstplayer-1.0"];
let version = "1.13.91";
if let Ok(lib_dir) = env::var("GTK_LIB_DIR") {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
println!("cargo:rustc-link-search=native={}", lib_dir);
return Ok(())
}
let target = env::var("TARGET").expect("TARGET environment variable doesn't exist");
let hardcode_shared_libs = target.contains("windows");
let mut config = Config::new();
config.atleast_version(version);
config.print_system_libs(false);
if hardcode_shared_libs {
config.cargo_metadata(false);
}
match config.probe(package_name) {
Ok(library) => {
if hardcode_shared_libs {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
for path in library.link_paths.iter() {
println!("cargo:rustc-link-search=native={}",
path.to_str().expect("library path doesn't exist"));
}
}
Ok(())
}
Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => {
for lib_ in shared_libs.iter() {
println!("cargo:rustc-link-lib=dylib={}", lib_);
}
Ok(())
}
Err(err) => Err(err),
}
}

View file

@ -0,0 +1,391 @@
// 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
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
extern crate libc;
extern crate glib_sys as glib;
extern crate gobject_sys as gobject;
extern crate gstreamer_sys as gst;
extern crate gstreamer_sdp_sys as gst_sdp;
#[allow(unused_imports)]
use libc::{c_int, c_char, c_uchar, c_float, c_uint, c_double,
c_short, c_ushort, c_long, c_ulong,
c_void, size_t, ssize_t, intptr_t, uintptr_t, time_t, FILE};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType, Volatile};
// Enums
pub type GstWebRTCDTLSSetup = c_int;
pub const GST_WEBRTC_DTLS_SETUP_NONE: GstWebRTCDTLSSetup = 0;
pub const GST_WEBRTC_DTLS_SETUP_ACTPASS: GstWebRTCDTLSSetup = 1;
pub const GST_WEBRTC_DTLS_SETUP_ACTIVE: GstWebRTCDTLSSetup = 2;
pub const GST_WEBRTC_DTLS_SETUP_PASSIVE: GstWebRTCDTLSSetup = 3;
pub type GstWebRTCDTLSTransportState = c_int;
pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW: GstWebRTCDTLSTransportState = 0;
pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_CLOSED: GstWebRTCDTLSTransportState = 1;
pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_FAILED: GstWebRTCDTLSTransportState = 2;
pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTING: GstWebRTCDTLSTransportState = 3;
pub const GST_WEBRTC_DTLS_TRANSPORT_STATE_CONNECTED: GstWebRTCDTLSTransportState = 4;
pub type GstWebRTCICEComponent = c_int;
pub const GST_WEBRTC_ICE_COMPONENT_RTP: GstWebRTCICEComponent = 0;
pub const GST_WEBRTC_ICE_COMPONENT_RTCP: GstWebRTCICEComponent = 1;
pub type GstWebRTCICEConnectionState = c_int;
pub const GST_WEBRTC_ICE_CONNECTION_STATE_NEW: GstWebRTCICEConnectionState = 0;
pub const GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING: GstWebRTCICEConnectionState = 1;
pub const GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED: GstWebRTCICEConnectionState = 2;
pub const GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED: GstWebRTCICEConnectionState = 3;
pub const GST_WEBRTC_ICE_CONNECTION_STATE_FAILED: GstWebRTCICEConnectionState = 4;
pub const GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED: GstWebRTCICEConnectionState = 5;
pub const GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED: GstWebRTCICEConnectionState = 6;
pub type GstWebRTCICEGatheringState = c_int;
pub const GST_WEBRTC_ICE_GATHERING_STATE_NEW: GstWebRTCICEGatheringState = 0;
pub const GST_WEBRTC_ICE_GATHERING_STATE_GATHERING: GstWebRTCICEGatheringState = 1;
pub const GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE: GstWebRTCICEGatheringState = 2;
pub type GstWebRTCIceRole = c_int;
pub const GST_WEBRTC_ICE_ROLE_CONTROLLED: GstWebRTCIceRole = 0;
pub const GST_WEBRTC_ICE_ROLE_CONTROLLING: GstWebRTCIceRole = 1;
pub type GstWebRTCPeerConnectionState = c_int;
pub const GST_WEBRTC_PEER_CONNECTION_STATE_NEW: GstWebRTCPeerConnectionState = 0;
pub const GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING: GstWebRTCPeerConnectionState = 1;
pub const GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED: GstWebRTCPeerConnectionState = 2;
pub const GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED: GstWebRTCPeerConnectionState = 3;
pub const GST_WEBRTC_PEER_CONNECTION_STATE_FAILED: GstWebRTCPeerConnectionState = 4;
pub const GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED: GstWebRTCPeerConnectionState = 5;
pub type GstWebRTCRTPTransceiverDirection = c_int;
pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE: GstWebRTCRTPTransceiverDirection = 0;
pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_INACTIVE: GstWebRTCRTPTransceiverDirection = 1;
pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDONLY: GstWebRTCRTPTransceiverDirection = 2;
pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY: GstWebRTCRTPTransceiverDirection = 3;
pub const GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV: GstWebRTCRTPTransceiverDirection = 4;
pub type GstWebRTCSDPType = c_int;
pub const GST_WEBRTC_SDP_TYPE_OFFER: GstWebRTCSDPType = 1;
pub const GST_WEBRTC_SDP_TYPE_PRANSWER: GstWebRTCSDPType = 2;
pub const GST_WEBRTC_SDP_TYPE_ANSWER: GstWebRTCSDPType = 3;
pub const GST_WEBRTC_SDP_TYPE_ROLLBACK: GstWebRTCSDPType = 4;
pub type GstWebRTCSignalingState = c_int;
pub const GST_WEBRTC_SIGNALING_STATE_STABLE: GstWebRTCSignalingState = 0;
pub const GST_WEBRTC_SIGNALING_STATE_CLOSED: GstWebRTCSignalingState = 1;
pub const GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER: GstWebRTCSignalingState = 2;
pub const GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER: GstWebRTCSignalingState = 3;
pub const GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER: GstWebRTCSignalingState = 4;
pub const GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER: GstWebRTCSignalingState = 5;
pub type GstWebRTCStatsType = c_int;
pub const GST_WEBRTC_STATS_CODEC: GstWebRTCStatsType = 1;
pub const GST_WEBRTC_STATS_INBOUND_RTP: GstWebRTCStatsType = 2;
pub const GST_WEBRTC_STATS_OUTBOUND_RTP: GstWebRTCStatsType = 3;
pub const GST_WEBRTC_STATS_REMOTE_INBOUND_RTP: GstWebRTCStatsType = 4;
pub const GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP: GstWebRTCStatsType = 5;
pub const GST_WEBRTC_STATS_CSRC: GstWebRTCStatsType = 6;
pub const GST_WEBRTC_STATS_PEER_CONNECTION: GstWebRTCStatsType = 7;
pub const GST_WEBRTC_STATS_DATA_CHANNEL: GstWebRTCStatsType = 8;
pub const GST_WEBRTC_STATS_STREAM: GstWebRTCStatsType = 9;
pub const GST_WEBRTC_STATS_TRANSPORT: GstWebRTCStatsType = 10;
pub const GST_WEBRTC_STATS_CANDIDATE_PAIR: GstWebRTCStatsType = 11;
pub const GST_WEBRTC_STATS_LOCAL_CANDIDATE: GstWebRTCStatsType = 12;
pub const GST_WEBRTC_STATS_REMOTE_CANDIDATE: GstWebRTCStatsType = 13;
pub const GST_WEBRTC_STATS_CERTIFICATE: GstWebRTCStatsType = 14;
// Records
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstWebRTCDTLSTransportClass {
pub parent_class: gst::GstBinClass,
pub _padding: [gpointer; 4],
}
impl ::std::fmt::Debug for GstWebRTCDTLSTransportClass {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstWebRTCDTLSTransportClass @ {:?}", self as *const _))
.field("parent_class", &self.parent_class)
.field("_padding", &self._padding)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstWebRTCICETransportClass {
pub parent_class: gst::GstBinClass,
pub gather_candidates: Option<unsafe extern "C" fn(*mut GstWebRTCICETransport) -> gboolean>,
pub _padding: [gpointer; 4],
}
impl ::std::fmt::Debug for GstWebRTCICETransportClass {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstWebRTCICETransportClass @ {:?}", self as *const _))
.field("parent_class", &self.parent_class)
.field("gather_candidates", &self.gather_candidates)
.field("_padding", &self._padding)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstWebRTCRTPReceiverClass {
pub parent_class: gst::GstObjectClass,
pub _padding: [gpointer; 4],
}
impl ::std::fmt::Debug for GstWebRTCRTPReceiverClass {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstWebRTCRTPReceiverClass @ {:?}", self as *const _))
.field("parent_class", &self.parent_class)
.field("_padding", &self._padding)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstWebRTCRTPSenderClass {
pub parent_class: gst::GstObjectClass,
pub _padding: [gpointer; 4],
}
impl ::std::fmt::Debug for GstWebRTCRTPSenderClass {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstWebRTCRTPSenderClass @ {:?}", self as *const _))
.field("parent_class", &self.parent_class)
.field("_padding", &self._padding)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstWebRTCRTPTransceiverClass {
pub parent_class: gst::GstObjectClass,
pub _padding: [gpointer; 4],
}
impl ::std::fmt::Debug for GstWebRTCRTPTransceiverClass {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstWebRTCRTPTransceiverClass @ {:?}", self as *const _))
.field("parent_class", &self.parent_class)
.field("_padding", &self._padding)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstWebRTCSessionDescription {
pub type_: GstWebRTCSDPType,
pub sdp: *mut gst_sdp::GstSDPMessage,
}
impl ::std::fmt::Debug for GstWebRTCSessionDescription {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstWebRTCSessionDescription @ {:?}", self as *const _))
.field("type_", &self.type_)
.field("sdp", &self.sdp)
.finish()
}
}
// Classes
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstWebRTCDTLSTransport {
pub parent: gst::GstObject,
pub transport: *mut GstWebRTCICETransport,
pub state: GstWebRTCDTLSTransportState,
pub is_rtcp: gboolean,
pub client: gboolean,
pub session_id: c_uint,
pub dtlssrtpenc: *mut gst::GstElement,
pub dtlssrtpdec: *mut gst::GstElement,
pub _padding: [gpointer; 4],
}
impl ::std::fmt::Debug for GstWebRTCDTLSTransport {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstWebRTCDTLSTransport @ {:?}", self as *const _))
.field("parent", &self.parent)
.field("transport", &self.transport)
.field("state", &self.state)
.field("is_rtcp", &self.is_rtcp)
.field("client", &self.client)
.field("session_id", &self.session_id)
.field("dtlssrtpenc", &self.dtlssrtpenc)
.field("dtlssrtpdec", &self.dtlssrtpdec)
.field("_padding", &self._padding)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstWebRTCICETransport {
pub parent: gst::GstObject,
pub role: GstWebRTCIceRole,
pub component: GstWebRTCICEComponent,
pub state: GstWebRTCICEConnectionState,
pub gathering_state: GstWebRTCICEGatheringState,
pub src: *mut gst::GstElement,
pub sink: *mut gst::GstElement,
pub _padding: [gpointer; 4],
}
impl ::std::fmt::Debug for GstWebRTCICETransport {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstWebRTCICETransport @ {:?}", self as *const _))
.field("parent", &self.parent)
.field("role", &self.role)
.field("component", &self.component)
.field("state", &self.state)
.field("gathering_state", &self.gathering_state)
.field("src", &self.src)
.field("sink", &self.sink)
.field("_padding", &self._padding)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstWebRTCRTPReceiver {
pub parent: gst::GstObject,
pub transport: *mut GstWebRTCDTLSTransport,
pub rtcp_transport: *mut GstWebRTCDTLSTransport,
pub _padding: [gpointer; 4],
}
impl ::std::fmt::Debug for GstWebRTCRTPReceiver {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstWebRTCRTPReceiver @ {:?}", self as *const _))
.field("parent", &self.parent)
.field("transport", &self.transport)
.field("rtcp_transport", &self.rtcp_transport)
.field("_padding", &self._padding)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstWebRTCRTPSender {
pub parent: gst::GstObject,
pub transport: *mut GstWebRTCDTLSTransport,
pub rtcp_transport: *mut GstWebRTCDTLSTransport,
pub send_encodings: *mut glib::GArray,
pub _padding: [gpointer; 4],
}
impl ::std::fmt::Debug for GstWebRTCRTPSender {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstWebRTCRTPSender @ {:?}", self as *const _))
.field("parent", &self.parent)
.field("transport", &self.transport)
.field("rtcp_transport", &self.rtcp_transport)
.field("send_encodings", &self.send_encodings)
.field("_padding", &self._padding)
.finish()
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstWebRTCRTPTransceiver {
pub parent: gst::GstObject,
pub mline: c_uint,
pub mid: *mut c_char,
pub stopped: gboolean,
pub sender: *mut GstWebRTCRTPSender,
pub receiver: *mut GstWebRTCRTPReceiver,
pub direction: GstWebRTCRTPTransceiverDirection,
pub current_direction: GstWebRTCRTPTransceiverDirection,
pub codec_preferences: *mut gst::GstCaps,
pub _padding: [gpointer; 4],
}
impl ::std::fmt::Debug for GstWebRTCRTPTransceiver {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstWebRTCRTPTransceiver @ {:?}", self as *const _))
.field("parent", &self.parent)
.field("mline", &self.mline)
.field("mid", &self.mid)
.field("stopped", &self.stopped)
.field("sender", &self.sender)
.field("receiver", &self.receiver)
.field("direction", &self.direction)
.field("current_direction", &self.current_direction)
.field("codec_preferences", &self.codec_preferences)
.field("_padding", &self._padding)
.finish()
}
}
extern "C" {
//=========================================================================
// GstWebRTCSessionDescription
//=========================================================================
pub fn gst_webrtc_session_description_get_type() -> GType;
pub fn gst_webrtc_session_description_new(type_: GstWebRTCSDPType, sdp: *mut gst_sdp::GstSDPMessage) -> *mut GstWebRTCSessionDescription;
pub fn gst_webrtc_session_description_copy(src: *const GstWebRTCSessionDescription) -> *mut GstWebRTCSessionDescription;
pub fn gst_webrtc_session_description_free(desc: *mut GstWebRTCSessionDescription);
//=========================================================================
// GstWebRTCDTLSTransport
//=========================================================================
pub fn gst_webrtc_dtls_transport_get_type() -> GType;
pub fn gst_webrtc_dtls_transport_new(session_id: c_uint, rtcp: gboolean) -> *mut GstWebRTCDTLSTransport;
pub fn gst_webrtc_dtls_transport_set_transport(transport: *mut GstWebRTCDTLSTransport, ice: *mut GstWebRTCICETransport);
//=========================================================================
// GstWebRTCICETransport
//=========================================================================
pub fn gst_webrtc_ice_transport_get_type() -> GType;
pub fn gst_webrtc_ice_transport_connection_state_change(ice: *mut GstWebRTCICETransport, new_state: GstWebRTCICEConnectionState);
pub fn gst_webrtc_ice_transport_gathering_state_change(ice: *mut GstWebRTCICETransport, new_state: GstWebRTCICEGatheringState);
pub fn gst_webrtc_ice_transport_new_candidate(ice: *mut GstWebRTCICETransport, stream_id: c_uint, component: GstWebRTCICEComponent, attr: *mut c_char);
pub fn gst_webrtc_ice_transport_selected_pair_change(ice: *mut GstWebRTCICETransport);
//=========================================================================
// GstWebRTCRTPReceiver
//=========================================================================
pub fn gst_webrtc_rtp_receiver_get_type() -> GType;
pub fn gst_webrtc_rtp_receiver_new() -> *mut GstWebRTCRTPReceiver;
pub fn gst_webrtc_rtp_receiver_get_parameters(receiver: *mut GstWebRTCRTPReceiver, kind: *mut c_char) -> *mut gst::GstStructure;
pub fn gst_webrtc_rtp_receiver_set_parameters(receiver: *mut GstWebRTCRTPReceiver, parameters: *mut gst::GstStructure) -> gboolean;
pub fn gst_webrtc_rtp_receiver_set_rtcp_transport(receiver: *mut GstWebRTCRTPReceiver, transport: *mut GstWebRTCDTLSTransport);
pub fn gst_webrtc_rtp_receiver_set_transport(receiver: *mut GstWebRTCRTPReceiver, transport: *mut GstWebRTCDTLSTransport);
//=========================================================================
// GstWebRTCRTPSender
//=========================================================================
pub fn gst_webrtc_rtp_sender_get_type() -> GType;
pub fn gst_webrtc_rtp_sender_new(send_encodings: *mut glib::GArray) -> *mut GstWebRTCRTPSender;
pub fn gst_webrtc_rtp_sender_get_parameters(sender: *mut GstWebRTCRTPSender, kind: *mut c_char) -> *mut gst::GstStructure;
pub fn gst_webrtc_rtp_sender_set_parameters(sender: *mut GstWebRTCRTPSender, parameters: *mut gst::GstStructure) -> gboolean;
pub fn gst_webrtc_rtp_sender_set_rtcp_transport(sender: *mut GstWebRTCRTPSender, transport: *mut GstWebRTCDTLSTransport);
pub fn gst_webrtc_rtp_sender_set_transport(sender: *mut GstWebRTCRTPSender, transport: *mut GstWebRTCDTLSTransport);
//=========================================================================
// GstWebRTCRTPTransceiver
//=========================================================================
pub fn gst_webrtc_rtp_transceiver_get_type() -> GType;
pub fn gst_webrtc_rtp_transceiver_stop(transceiver: *mut GstWebRTCRTPTransceiver);
//=========================================================================
// Other functions
//=========================================================================
pub fn gst_webrtc_sdp_type_to_string(type_: GstWebRTCSDPType) -> *const c_char;
}