webrtc
(from GStreamer Bad Plug-ins git)A bin for webrtc connections
Hierarchy
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBin ╰──webrtcbin
Factory details
Authors: – Matthew Waters
Classification: – Filter/Network/WebRTC
Rank – primary
Plugin – libgstwebrtc.so
Package – GStreamer Bad Plug-ins git
Pad Templates
sink_%u
application/x-rtp:
Presence – request
Direction – sink
src_%u
application/x-rtp:
Presence – sometimes
Direction – src
Signals
add-ice-candidate
add_ice_candidate_callback (GstElement * object, guint ice-candidate, gchararray param_2, gpointer udata)
def add_ice_candidate_callback (object, ice-candidate, param_2, udata):
#python callback for the 'add-ice-candidate' signal
function add_ice_candidate_callback(object: GstElement * object, ice-candidate: guint ice-candidate, param_2: gchararray param_2, udata: gpointer udata): {
// javascript callback for the 'add-ice-candidate' signal
}
Parameters:
object
–
the webrtcbin
ice-candidate
–
an ice candidate
param_2
–
udata
–
add-transceiver
GstWebRTCRTPTransceiver * add_transceiver_callback (GstElement * object, GstWebRTCRTPTransceiverDirection * direction, GstCaps * caps, gpointer udata)
def add_transceiver_callback (object, direction, caps, udata):
#python callback for the 'add-transceiver' signal
function add_transceiver_callback(object: GstElement * object, direction: GstWebRTCRTPTransceiverDirection * direction, caps: GstCaps * caps, udata: gpointer udata): {
// javascript callback for the 'add-transceiver' signal
}
Parameters:
object
–
the webrtcbin
direction
–
the direction of the new transceiver
caps
–
the codec preferences for this transceiver
udata
–
the new GstWebRTCRTPTransceiver
add-turn-server
gboolean add_turn_server_callback (GstElement * object, gchararray uri, gpointer udata)
def add_turn_server_callback (object, uri, udata):
#python callback for the 'add-turn-server' signal
function add_turn_server_callback(object: GstElement * object, uri: gchararray uri, udata: gpointer udata): {
// javascript callback for the 'add-turn-server' signal
}
Add a turn server to obtain ICE candidates from
Parameters:
object
–
the webrtcbin
uri
–
The uri of the server of the form turn(s)://username:password@host:port
udata
–
create-answer
create_answer_callback (GstElement * object, GstStructure * options, GstPromise * promise, gpointer udata)
def create_answer_callback (object, options, promise, udata):
#python callback for the 'create-answer' signal
function create_answer_callback(object: GstElement * object, options: GstStructure * options, promise: GstPromise * promise, udata: gpointer udata): {
// javascript callback for the 'create-answer' signal
}
Parameters:
object
–
the webrtcbin
options
–
create-answer options
promise
–
a GstPromise which will contain the answer
udata
–
create-data-channel
GstWebRTCDataChannel* create_data_channel_callback (GstElement * param_0, gchararray param_1, GstStructure * param_2, gpointer udata)
def create_data_channel_callback (param_0, param_1, param_2, udata):
#python callback for the 'create-data-channel' signal
function create_data_channel_callback(param_0: GstElement * param_0, param_1: gchararray param_1, param_2: GstStructure * param_2, udata: gpointer udata): {
// javascript callback for the 'create-data-channel' signal
}
Parameters:
param_0
–
param_1
–
param_2
–
udata
–
create-offer
create_offer_callback (GstElement * object, GstStructure * options, GstPromise * promise, gpointer udata)
def create_offer_callback (object, options, promise, udata):
#python callback for the 'create-offer' signal
function create_offer_callback(object: GstElement * object, options: GstStructure * options, promise: GstPromise * promise, udata: gpointer udata): {
// javascript callback for the 'create-offer' signal
}
Parameters:
object
–
the webrtcbin
options
–
create-offer options
promise
–
a GstPromise which will contain the offer
udata
–
get-stats
get_stats_callback (GstElement * object, GstPad * promise, GstPromise * param_2, gpointer udata)
def get_stats_callback (object, promise, param_2, udata):
#python callback for the 'get-stats' signal
function get_stats_callback(object: GstElement * object, promise: GstPad * promise, param_2: GstPromise * param_2, udata: gpointer udata): {
// javascript callback for the 'get-stats' signal
}
The promise will contain the result of retrieving the session statistics. The structure will be named 'application/x-webrtc-stats and contain the following based on the webrtc-stats spec available from https://www.w3.org/TR/webrtc-stats/. As the webrtc-stats spec is a draft and is constantly changing these statistics may be changed to fit with the latest spec.
Each field key is a unique identifer for each RTCStats (https://www.w3.org/TR/webrtc/#rtcstats-dictionary) value (another GstStructure) in the RTCStatsReport (https://www.w3.org/TR/webrtc/#rtcstatsreport-object). Each supported field in the RTCStats subclass is outlined below.
Each statistics structure contains the following values as defined by the RTCStats dictionary (https://www.w3.org/TR/webrtc/#rtcstats-dictionary).
"timestamp" G_TYPE_DOUBLE timestamp the statistics were generated "type" GST_TYPE_WEBRTC_STATS_TYPE the type of statistics reported "id" G_TYPE_STRING unique identifier
RTCCodecStats supported fields (https://w3c.github.io/webrtc-stats/#codec-dict*)
"payload-type" G_TYPE_UINT the rtp payload number in use "clock-rate" G_TYPE_UINT the rtp clock-rate
RTCRTPStreamStats supported fields (https://w3c.github.io/webrtc-stats/#streamstats-dict*)
"ssrc" G_TYPE_STRING the rtp sequence src in use "transport-id" G_TYPE_STRING identifier for the associated RTCTransportStats for this stream "codec-id" G_TYPE_STRING identifier for the associated RTCCodecStats for this stream "fir-count" G_TYPE_UINT FIR requests received by the sender (only for local statistics) "pli-count" G_TYPE_UINT PLI requests received by the sender (only for local statistics) "nack-count" G_TYPE_UINT NACK requests received by the sender (only for local statistics)
RTCReceivedStreamStats supported fields (https://w3c.github.io/webrtc-stats/#receivedrtpstats-dict*)
"packets-received" G_TYPE_UINT64 number of packets received (only for local inbound) "bytes-received" G_TYPE_UINT64 number of bytes received (only for local inbound) "packets-lost" G_TYPE_UINT number of packets lost "jitter" G_TYPE_DOUBLE packet jitter measured in secondss
RTCInboundRTPStreamStats supported fields (https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict*)
"remote-id" G_TYPE_STRING identifier for the associated RTCRemoteOutboundRTPStreamStats
RTCRemoteInboundRTPStreamStats supported fields (https://w3c.github.io/webrtc-stats/#remoteinboundrtpstats-dict*)
"local-id" G_TYPE_STRING identifier for the associated RTCOutboundRTPSTreamStats "round-trip-time" G_TYPE_DOUBLE round trip time of packets measured in seconds
RTCSentRTPStreamStats supported fields (https://w3c.github.io/webrtc-stats/#sentrtpstats-dict*)
"packets-sent" G_TYPE_UINT64 number of packets sent (only for local outbound) "bytes-sent" G_TYPE_UINT64 number of packets sent (only for local outbound)
RTCOutboundRTPStreamStats supported fields (https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict*)
"remote-id" G_TYPE_STRING identifier for the associated RTCRemoteInboundRTPSTreamStats
RTCRemoteOutboundRTPStreamStats supported fields (https://w3c.github.io/webrtc-stats/#remoteoutboundrtpstats-dict*)
"local-id" G_TYPE_STRING identifier for the associated RTCInboundRTPSTreamStats
Parameters:
object
–
the webrtcbin
promise
–
a GstPromise for the result
param_2
–
udata
–
get-transceivers
GArray * get_transceivers_callback (GstElement * object, gpointer udata)
def get_transceivers_callback (object, udata):
#python callback for the 'get-transceivers' signal
function get_transceivers_callback(object: GstElement * object, udata: gpointer udata): {
// javascript callback for the 'get-transceivers' signal
}
no-more-pads
no_more_pads_callback (GstElement * param_0, gpointer udata)
def no_more_pads_callback (param_0, udata):
#python callback for the 'no-more-pads' signal
function no_more_pads_callback(param_0: GstElement * param_0, udata: gpointer udata): {
// javascript callback for the 'no-more-pads' signal
}
Parameters:
param_0
–
udata
–
on-data-channel
on_data_channel_callback (GstElement * object, GstWebRTCDataChannel* candidate, gpointer udata)
def on_data_channel_callback (object, candidate, udata):
#python callback for the 'on-data-channel' signal
function on_data_channel_callback(object: GstElement * object, candidate: GstWebRTCDataChannel* candidate, udata: gpointer udata): {
// javascript callback for the 'on-data-channel' signal
}
Parameters:
object
–
the webrtcbin
candidate
–
the new GstWebRTCDataChannel
udata
–
on-ice-candidate
on_ice_candidate_callback (GstElement * object, guint candidate, gchararray param_2, gpointer udata)
def on_ice_candidate_callback (object, candidate, param_2, udata):
#python callback for the 'on-ice-candidate' signal
function on_ice_candidate_callback(object: GstElement * object, candidate: guint candidate, param_2: gchararray param_2, udata: gpointer udata): {
// javascript callback for the 'on-ice-candidate' signal
}
Parameters:
object
–
the webrtcbin
candidate
–
the ICE candidate
param_2
–
udata
–
on-negotiation-needed
on_negotiation_needed_callback (GstElement * object, gpointer udata)
def on_negotiation_needed_callback (object, udata):
#python callback for the 'on-negotiation-needed' signal
function on_negotiation_needed_callback(object: GstElement * object, udata: gpointer udata): {
// javascript callback for the 'on-negotiation-needed' signal
}
on-new-transceiver
on_new_transceiver_callback (GstElement * object, GstWebRTCRTPTransceiver * candidate, gpointer udata)
def on_new_transceiver_callback (object, candidate, udata):
#python callback for the 'on-new-transceiver' signal
function on_new_transceiver_callback(object: GstElement * object, candidate: GstWebRTCRTPTransceiver * candidate, udata: gpointer udata): {
// javascript callback for the 'on-new-transceiver' signal
}
Parameters:
object
–
the webrtcbin
candidate
–
the new GstWebRTCRTPTransceiver
udata
–
pad-added
pad_added_callback (GstElement * param_0, GstPad * param_1, gpointer udata)
def pad_added_callback (param_0, param_1, udata):
#python callback for the 'pad-added' signal
function pad_added_callback(param_0: GstElement * param_0, param_1: GstPad * param_1, udata: gpointer udata): {
// javascript callback for the 'pad-added' signal
}
Parameters:
param_0
–
param_1
–
udata
–
pad-removed
pad_removed_callback (GstElement * param_0, GstPad * param_1, gpointer udata)
def pad_removed_callback (param_0, param_1, udata):
#python callback for the 'pad-removed' signal
function pad_removed_callback(param_0: GstElement * param_0, param_1: GstPad * param_1, udata: gpointer udata): {
// javascript callback for the 'pad-removed' signal
}
Parameters:
param_0
–
param_1
–
udata
–
set-local-description
set_local_description_callback (GstElement * object, GstWebRTCSessionDescription * desc, GstPromise * param_2, gpointer udata)
def set_local_description_callback (object, desc, param_2, udata):
#python callback for the 'set-local-description' signal
function set_local_description_callback(object: GstElement * object, desc: GstWebRTCSessionDescription * desc, param_2: GstPromise * param_2, udata: gpointer udata): {
// javascript callback for the 'set-local-description' signal
}
Parameters:
object
–
the webrtcbin
desc
–
a GstWebRTCSessionDescription description promise (allow-none): a GstPromise to be notified when it's set
param_2
–
udata
–
set-remote-description
set_remote_description_callback (GstElement * object, GstWebRTCSessionDescription * desc, GstPromise * param_2, gpointer udata)
def set_remote_description_callback (object, desc, param_2, udata):
#python callback for the 'set-remote-description' signal
function set_remote_description_callback(object: GstElement * object, desc: GstWebRTCSessionDescription * desc, param_2: GstPromise * param_2, udata: gpointer udata): {
// javascript callback for the 'set-remote-description' signal
}
Parameters:
object
–
the webrtcbin
desc
–
a GstWebRTCSessionDescription description promise (allow-none): a GstPromise to be notified when it's set
param_2
–
udata
–
Properties
async-handling
“async-handling” gboolean
The bin will handle Asynchronous state changes
Flags : Read / Write
Default value : false
bundle-policy
“bundle-policy” Web-rtcbundle-policy
The policy to apply for bundling
Flags : Read / Write
Default value : none (0)
connection-state
“connection-state” Web-rtcpeer-connection-state
The overall connection state of this element
Flags : Read
Default value : new (0)
ice-connection-state
“ice-connection-state” Web-rtciceconnection-state
The collective connection state of all ICETransport's
Flags : Read
Default value : new (0)
ice-gathering-state
“ice-gathering-state” Web-rtcicegathering-state
The collective gathering state of all ICETransport's
Flags : Read
Default value : new (0)
local-description
“local-description” GstWebRTCSessionDescription *
The local SDP description to use for this connection
Flags : Read / Write
message-forward
“message-forward” gboolean
Forwards all children messages
Flags : Read / Write
Default value : false
remote-description
“remote-description” GstWebRTCSessionDescription *
The remote SDP description to use for this connection
Flags : Read / Write
signaling-state
“signaling-state” Web-rtcsignaling-state
The signaling state of this element
Flags : Read
Default value : stable (0)
stun-server
“stun-server” gchararray
The STUN server of the form stun://hostname:port
Flags : Read / Write
Default value : NULL
turn-server
“turn-server” gchararray
The TURN server of the form turn(s)://username:password@host:port. This is a convenience property, use add-turn-server if you wish to use multiple TURN servers
Flags : Read / Write
Default value : NULL
Named constants
Web-rtcbundle-policy
Members
none
(0) – GST_WEBRTC_BUNDLE_POLICY_NONE
balanced
(1) – GST_WEBRTC_BUNDLE_POLICY_BALANCED
max-compat
(2) – GST_WEBRTC_BUNDLE_POLICY_MAX_COMPAT
max-bundle
(3) – GST_WEBRTC_BUNDLE_POLICY_MAX_BUNDLE
Web-rtciceconnection-state
Members
new
(0) – GST_WEBRTC_ICE_CONNECTION_STATE_NEW
checking
(1) – GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING
connected
(2) – GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED
completed
(3) – GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED
failed
(4) – GST_WEBRTC_ICE_CONNECTION_STATE_FAILED
disconnected
(5) – GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED
closed
(6) – GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED
Web-rtcicegathering-state
Members
new
(0) – GST_WEBRTC_ICE_GATHERING_STATE_NEW
gathering
(1) – GST_WEBRTC_ICE_GATHERING_STATE_GATHERING
complete
(2) – GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE
Web-rtcpeer-connection-state
Members
new
(0) – GST_WEBRTC_PEER_CONNECTION_STATE_NEW
connecting
(1) – GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING
connected
(2) – GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED
disconnected
(3) – GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED
failed
(4) – GST_WEBRTC_PEER_CONNECTION_STATE_FAILED
closed
(5) – GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED
Web-rtcsignaling-state
Members
stable
(0) – GST_WEBRTC_SIGNALING_STATE_STABLE
closed
(1) – GST_WEBRTC_SIGNALING_STATE_CLOSED
have-local-offer
(2) – GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER
have-remote-offer
(3) – GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER
have-local-pranswer
(4) – GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER
have-remote-pranswer
(5) – GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER
The results of the search are