GstWebRTC - Data Channel Examples - x86

From RidgeRun Developer Connection
Revision as of 18:05, 3 September 2018 by Eramirez (talk | contribs)
Jump to: navigation, search

Error something wrong.jpg Problems running the pipelines shown on this page?
Please see our GStreamer Debugging guide for help.


OpenWebRTC Web Page


Home

IMX6 Examples



This page links to the GstWebRTC data channel examples using OpenWebRTC.

Pipeline - Browser

In the following examples you will need to access SimpleRTC web page and establish a WebRTC call with a pipeline. Find the web page here: http://webrtc.ridgerun.com:8080/

In the Web Page make sure you enable the correct streams. For example, if you will only use data channel, mark chat box. If you need audio and video check the required boxes.
When you have the correct setup press join button, run the pipeline and press call button to start the call.

In the following figure you will find the SimpleRTC web page with the chat enabled after the call with the pipeline was executed.

Establish a WebRTC call with http://webrtc.ridgerun.com:8080/



Note: If you need to do changes in the check-boxes to enable or disable streams, refresh the Web Page first.

Data Channel

Example

In this example we enable the WebRTC data channel between a web server and a pipeline.

Send+Receive Pipeline
gst-launch-1.0  rrwebrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
signaler::session_id=1234ridgerun name=web fdsrc ! 'meta/x-klv' ! web.data_sink web.data_src ! fdsink async=false

When executing the previous pipeline, you should be able to type and send messages between the web page and the pipeline.

Data Channel + Audio

Example

In this example we enable the WebRTC data and audio channel between a web server and a pipeline.

Send+Receive Pipeline
gst-launch-1.0  rrwebrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
signaler::session_id=1234ridgerun name=web fdsrc ! 'meta/x-klv' ! web.data_sink web.data_src ! fdsink async=false
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio_sink \
web.audio_src ! rtpopusdepay ! opusdec ! audioconvert ! alsasink async=false

When executing the previous pipeline, you should be able to type and send messages between the web page and the pipeline and also listen the audio streaming in both endpoints.

Data Channel + Video

Example

In this example we enable the WebRTC data and video channel between a web server and a pipeline.

Send+Receive Pipeline
gst-launch-1.0  rrwebrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
signaler::session_id=1234ridgerun name=web fdsrc ! 'meta/x-klv' ! web.data_sink web.data_src ! fdsink async=false
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
web.video_src ! rtpvp8depay ! vp8dec ! videoconvert ! ximagesink async=false \

When executing the previous pipeline, you should be able to type and send messages between the web page and the pipeline and also observe the video streaming in both endpoints.

Data Channel + Audio + Video

Example

In this example we enable the WebRTC data, audio and channel between a web server and a pipeline.

Send+Receive Pipeline
gst-launch-1.0  rrwebrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
signaler::session_id=1234ridgerun name=web fdsrc ! 'meta/x-klv' ! web.data_sink web.data_src ! fdsink async=false
videotestsrc is-live=true ! vp8enc ! rtpvp8pay ! web.video_sink \
web.video_src ! rtpvp8depay ! vp8dec ! videoconvert ! ximagesink async=false \
audiotestsrc is-live=true wave=8 ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! web.audio_sink \
web.audio_src ! rtpopusdepay ! opusdec ! audioconvert ! alsasink async=false

When executing the previous pipeline, you should be able to type and send messages between the web page and the pipeline. Also you should observe the video streaming and listen the audio streaming in both endpoints.

Pipeline - Pipeline

Data Channel

Example

In this example we enable the WebRTC data channel using 2 pipelines that send and receive data between them.

Send+Receive Pipeline
gst-launch-1.0  rrwebrtcbin start-call=true signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
signaler::session_id=1234ridgerun name=web fdsrc ! 'meta/x-klv' ! web.data_sink web.data_src ! fdsink async=false
Send+Receive Pipeline
gst-launch-1.0 rrwebrtcbin start-call=false signaler=GstOwrSignaler signaler::server_url=http://webrtc.ridgerun.com:8080 \
signaler::session_id=1234ridgerun name=web fdsrc ! 'meta/x-klv' ! web.data_sink web.data_src ! fdsink async=false

When executing the two previous pipelines, you should be able to type and send messages in any of the endpoints and receive them in the corresponding endpoint.




OpenWebRTC Web Page


Home

IMX6 Examples