Getting Started with GstWebRTC
⬅ GstWebRTC Release Notes | ⬆ Contents | GstWebRTC Pipelines ➡ |
Dependencies
GstWebRTC has the following dependencies:
- Gstreamer 1.0
- GStreamer 1.0 Development Package
- Gstreamer 1.0 Base Plug-ins Development Package
- Gstreamer 1.0 Bad Plug-ins
- Gstreamer 1.0 Good Plug-ins
- LibSoup Development Package (libsoup2.4-dev)
- JSON-GLib Development Package (libjson-glib-dev)
- OpenSSL Development Package (libssl-dev)
- LibNice Development Package (libnice-dev)
- GTK-Doc Tools (Optional) (gtk-doc-tools)
Make sure you have the following GStreamer elements:
- gst-inspect rtp-manager
- gst-inspect dtls
- gst-inspect nice
- gst-inspect srtp
In Debian based systems, you may install them with the following command:
sudo apt install \ gstreamer1.0 \ libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev \ gstreamer1.0-plugins-bad \ libsoup2.4-dev \ libjson-glib-dev \ libnice-dev \ autoconf \ libtool \ gtk-doc-tools \ libglib2.0-dev \ gstreamer1.0-nice \ libssl-dev \ libreadline-dev \ libx264-dev \ gstreamer1.0-plugins-ugly
Optional you can install nodejs to raise up a local-server:
sudo apt-get install nodejs
RidgeRun's professional SDK should have all of these dependencies fulfilled. Builds based on other systems should find the appropriate, equivalent dependencies.
Setting up the Project
RidgeRun distributes the source code of the project for the user to read, extend and customize it as needed. The project is packaged as an Autotools compliant tarball and, hence, leverages all the portability features inherent of GNU's build system. In order to use GstWebRTC, it must be configured, built, optionally verified, and installed.
- Configure
The most common way to configure GstWebRTC is to deploy the project libraries at GStreamer's default location. This will vary depending on the system. Table 1 summarizes some of the most popular OS and their typical configuration
System | Configure Option |
---|---|
Ubuntu 64 bits | --prefix /usr/ --libdir /usr/lib/x86_64-linux-gnu/ |
RidgeRun's Embedded FS | --prefix /usr/ |
Mac OSX (macports) | --prefix /opt/local/ |
Based on Table 1, the project is configured by running the autogen.sh script with the appropriate libdir switch. For example, to configure the project on an Ubuntu based system you should run:
./autogen.sh --prefix /usr/ --libdir /usr/lib/x86_64-linux-gnu/
This will configure the project in its basic, out of the box form. Advanced users may further customize the project by tweaking the configure script options. Run the following command for an exhaustive list of configuration options:
./configure --help
- Build
After the project is properly configured, it is ready to be built. Running make at the project top level will build the whole project.
make
Additionally, if something goes wrong, additional build log can be obtained by enabling Verbose output.
make V=1
- Verify (Optional)
After the project is built, the integrity of the project on the specific project may be verified. Although not required, its is a good idea. This can be achieved by running the project set of tests:
make check
None of the tests should fail. If this is not the case, please report to support@ridgerun.com
- Install
Finally, GstWebRTC is ready to be installed.
sudo make install
You may verify proper installation by running
gst-inspect-1.0 webrtc
A textual description of the plugin should display showing the two elements.
⬅ GstWebRTC Release Notes | ⬆ Contents | GstWebRTC Pipelines ➡ |