GstWebRTC - Data Channel: Difference between revisions
No edit summary |
mNo edit summary |
||
(21 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{GstWebRTC | {{GstWebRTC/Head|previous=GstWebRTCBin Features|next=Evaluating GstWebRTC|metakeywords=Gstreamer WebRTC Basics,Plugin Overview,WebRTC Basics,Gstreamer WebRTC Plugin Overview,GstRrWebRTCBin element,GstRrWebRTCBin,signaling}} | ||
Ridgerun's GstRrWebRTC provides data channel support. Data channel can be used for data transfer between endpoints by using the SCTP protocol, which allows flow and congestion control. The reliability and delivery order of data are configurable on the SCTP ptotocol. | Ridgerun's GstRrWebRTC provides data channel support. Data channel can be used for data transfer between endpoints by using the SCTP protocol, which allows flow and congestion control. The reliability and delivery order of data are configurable on the SCTP ptotocol. | ||
Line 8: | Line 6: | ||
Data channel in GstRrWebRTC works with a combination of elements that provide support for data transfer between multiple endpoints on a single session. Such elements are presented in the following image: | Data channel in GstRrWebRTC works with a combination of elements that provide support for data transfer between multiple endpoints on a single session. Such elements are presented in the following image: | ||
<br> | |||
[[File:data-flow.png|600px|thumbnail|center|Elements involved in data transfer]] | [[File:data-flow.png|600px|thumbnail|center|Elements involved in data transfer]] | ||
<br> | |||
==GstWebRTCBin Data Properties== | ==GstWebRTCBin Data Properties== | ||
Line 32: | Line 30: | ||
===Options=== | ===Options=== | ||
<pre> | |||
-c, --channel = C Channel to register (The session ID) | |||
-p, --peer-channel=P Peer channel | |||
-a, --no-audio Don't use audio in the WebRTC session | |||
-v, --no-video Don't use video in the WebRTC session | |||
-d, --no-data Don't use data in the WebRTC session | |||
-o, --owr-signaler Use OWR signaler (by default Pubnub signaler is used) | |||
-s, --start-call Start the call from this endpoint (Disabled by default) | |||
</pre> | |||
===Example=== | ===Example=== | ||
You can run the application as follows: | |||
<pre> | |||
./datachannel -c room0 -a -o -s | |||
</pre> | |||
Go to the browser on the https://webrtc.ridgerun.com:8443/ page and use '''room0''' as the '''Session ID'''. It is not necessary to press the '''Call''' button since the '''-s''' option is used. After the connection establishment you should be able to send messages from the pipeline to the browser and from the browser to the pipeline, as shown below. | Go to the browser on the https://webrtc.ridgerun.com:8443/ page and use '''room0''' as the '''Session ID'''. It is not necessary to press the '''Call''' button since the '''-s''' option is used. After the connection establishment you should be able to send messages from the pipeline to the browser and from the browser to the pipeline, as shown below. | ||
<br> | |||
[[File:dc-example.png|700px|thumbnail|center|Datachannel App Example]] | [[File:dc-example.png|700px|thumbnail|center|Datachannel App Example]] | ||
<br> | |||
| | {{GstWebRTC/Foot|previous=GstWebRTCBin Features|next=Evaluating GstWebRTC}} | ||
Latest revision as of 15:17, 9 March 2023
![]() |
GstWebRTC | ||||||||
---|---|---|---|---|---|---|---|---|
![]() | ||||||||
WebRTC Fundamentals | ||||||||
GstWebRTC Basics | ||||||||
|
||||||||
Evaluating GstWebRTC | ||||||||
Getting the code | ||||||||
Building GstWebRTC | ||||||||
Examples | ||||||||
|
||||||||
MCU Demo Application | ||||||||
Contact Us |
Ridgerun's GstRrWebRTC provides data channel support. Data channel can be used for data transfer between endpoints by using the SCTP protocol, which allows flow and congestion control. The reliability and delivery order of data are configurable on the SCTP ptotocol.
- Reliability means that an endpoint is able to know if the data was received or not by the other endpoint.
- Order means that data is received in the same order it was sent.
Data channel in GstRrWebRTC works with a combination of elements that provide support for data transfer between multiple endpoints on a single session. Such elements are presented in the following image:
![](/wiki/images/thumb/6/6e/Data-flow.png/600px-Data-flow.png)
GstWebRTCBin Data Properties
The GstWebRTCBin element exposes some properties that can be used to configure the endpoints functionality on data transfer:
- data-port:
Specify the desired SCTP port to use for data transfer. Its value must be defined in the range: [0 - 65535]. If not used, the port 5000 is assigned by default.
- data-channel-id:
Specify an identifier for each data channel stream. Default: Its value must be defined in the range: [0 - 65535]. If not used, a random port in that range is assigned by default.
- enable-data:
Used to enable the negotiation of the WebRTC data channel for an endpoint. It is required to use the new_data and on_new_data callbacks without data-pads. If not used, the data channel support wont be enabled (false by default).
- data-channel-status:
This property represents the connection status, which indicate if data channel is currently connected. If not used, such information wont be displayed (false by default).
Data Channel Usage
There is an application called datachannel inside the gst-webrtc/tests/examples/data_channel' folder. This application allows to establish communication between two endpoints in order to transfer audio, video and data.
Options
-c, --channel = C Channel to register (The session ID) -p, --peer-channel=P Peer channel -a, --no-audio Don't use audio in the WebRTC session -v, --no-video Don't use video in the WebRTC session -d, --no-data Don't use data in the WebRTC session -o, --owr-signaler Use OWR signaler (by default Pubnub signaler is used) -s, --start-call Start the call from this endpoint (Disabled by default)
Example
You can run the application as follows:
./datachannel -c room0 -a -o -s
Go to the browser on the https://webrtc.ridgerun.com:8443/ page and use room0 as the Session ID. It is not necessary to press the Call button since the -s option is used. After the connection establishment you should be able to send messages from the pipeline to the browser and from the browser to the pipeline, as shown below.
![](/wiki/images/thumb/8/86/Dc-example.png/700px-Dc-example.png)