GstKinesisWebRTC: Dependencies

From RidgeRun Developer Wiki


Previous: Building GstKinesisWebRTC Index Next: Building GstKinesisWebRTC/Building and Installing






GStreamer

The project needs gstreamer core, gstramer plugins base and gstreamer app. You can install it with:

sudo apt-get install libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 gstreamer1.0-plugins-base-apps

OpenSSL

Can be installed with:

sudo apt install libssl-dev

Quilt

Can be installed with:

sudo apt install quilt

Cmake

Can be installed with:

sudo apt install cmake

Websockets

WebSockets should be installed manually since the required version is newer than the Ubuntu package version. You can follow the next steps:

  • Download the code of both Libwebsockets and Amazon Kinesis WebRTC Stream SDK. The latter contains patches that need to be applied to libwebsockets:
git clone https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c.git
cd amazon-kinesis-video-streams-webrtc-sdk-c
git checkout v1.7.3
cd ..
git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets
git checkout v4.2.2
  • Apply patches included in amazon-kinesis-video-streams-webrtc-sdk-c
mkdir patches
cp ../amazon-kinesis-video-streams-webrtc-sdk-c/CMake/Dependencies/libwebsockets-old-gcc-fix-cast-cmakelists.patch patches/
cp ../amazon-kinesis-video-streams-webrtc-sdk-c/CMake/Dependencies/libwebsockets-leak-pipe-fix.patch patches/
echo libwebsockets-old-gcc-fix-cast-cmakelists.patch >> patches/series
echo libwebsockets-leak-pipe-fix.patch >> patches/series
quilt push -a
  • Configure
mkdir build 
cd  build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
  • Build
make
  • Install
sudo make install

SRTP

Can be installed with:

sudo apt install libsrtp2-dev

usrsctp

Fox x86 can be installed with:

sudo apt install libusrsctp-dev

But for jetson nano it is not found in the repositories, so you need to build it from code as follows:

git clone https://github.com/sctplab/usrsctp.git
cd  usrsctp/
git checkout 1ade45cbadfd19298d2c47dc538962d4425ad2dd
mkdir build
cd build/
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_FLAGS=-fPIC -Dsctp_werror=0
make
sudo make install

LibkvsCommonLws

This is a custom Amazon library part of the project Amazon Kinesis Video Streams C Producer. To build it follow the next instructions:

  • Download the code
git clone https://github.com/awslabs/amazon-kinesis-video-streams-producer-c.git
cd amazon-kinesis-video-streams-producer-c
git checkout  c7fce9e06021452ff3c42dc70c8360606b22ad53
  • Configure
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr .. -DBUILD_DEPENDENCIES=OFF -DBUILD_COMMON_LWS=ON -DBUILD_COMMON_CURL=OFF
  • Build
make
  • Install
sudo make install

Amazon Kinesis Video Streams C WebRTC SDK

The code is stored in a GitHub repository and you have already downloaded it for the Libwebsockets step:

AMAZON_SDK_DIR=<path where the amazon-kinesis-video-streams-webrtc-sdk-c was downloaded>
cd $AMAZON_SDK_DIR

This instruction were run for version v.1.7.3 To build the code run the following commands:

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr .. -DBUILD_DEPENDENCIES=OFF
make
sudo make install



Previous: Building GstKinesisWebRTC Index Next: Building GstKinesisWebRTC/Building and Installing