GStreamer build on Ubuntu 16.04
Background
GStreamer is used in several RidgeRun training videos. RidgeRun focuses on supporting customers developing embedded products that use GStreamer for their audio/video streaming infrastructure. For the GStreamer training videos it is easier for viewers, when installing GStreamer on Ubuntu, to try out the steps in the video if the viewer can perform the same steps using a Ubuntu development workstation.
Since the training videos typically involve GStreamer plug-ins that are not part of the Ubuntu distribution, all GStreamer code is built from source and kept isolated from the Ubuntu supplied packages to avoid any possible contamination with software based on different versions of the code.
As of May 17, 2016 the master branch of the GStreamer modules were updated to match the recently released Ubuntu 16.04. You can checkout a branch instead of master if you are having trouble building due to the GStreamer modules expecting packages newer than what is available via Ubuntu packages.
References
Required packages
After a fresh install of 16.04, you need to install the following packages before building GStreamer.
sudo apt install git autoconf autopoint libtool bison flex gtk-doc-tools sudo apt install libglib2.0-dev freeglut3 freeglut3-dev yasm libreadline-dev sudo apt install libgvc6 graphviz-dev # for GstShark
This is the minimal list of required packages. There is also the full list of Ubuntu packages installed by RidgeRun developers.
Build shell environment setup
A prefix is used when installing packages so that your Ubuntu development workstation is not contaminated with mixed versions of incompatible packages.
BUILDDIR=$HOME/projects/gst PREFIX=$BUILDDIR/local mkdir -p $PREFIX
GStreamer module build instructions
GST_MODULES="gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad gst-libav gst-rtsp-server" for MODULE in $GST_MODULES ; do cd $BUILDDIR git clone git://anongit.freedesktop.org/gstreamer/$MODULE cd $BUILDDIR/$MODULE git checkout master PATH=$PREFIX/bin:$PATH PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig ./autogen.sh --prefix $PREFIX && \ make && \ make install done
GStreamer interpipe build instructions
cd $BUILDDIR git clone git@github.com:RidgeRun/gst-interpipe.git cd $BUILDDIR/gst-interpipe git checkout master PATH=$PREFIX/bin:$PATH PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig ./autogen.sh --prefix $PREFIX && \ make && \ make install
GStreamer Daemon build instructions
cd $BUILDDIR git clone git@github.com:RidgeRun/gstd-1.x.git gstd cd $BUILDDIR/gstd git checkout master PATH=$PREFIX/bin:$PATH PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig ./autogen.sh && \ PATH=$PREFIX/bin:$PATH PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig ./configure --prefix $PREFIX && \ make && \ make install
GStreamer RTSP Sink build instructions
Sink is a GStreamer plug-in available from RidgeRun.
cd $BUILDDIR git clone git@github.com:RidgeRun/gst-rtsp-sink.git cd gst-rtsp-sink/src git checkout master PATH=$PREFIX/bin:$PATH PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig ./autogen.sh --prefix $PREFIX && \ PATH=$PREFIX/bin:$PATH PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig GST_LIBS=$PREFIX/lib/gstreamer-1.0 ./configure --prefix $PREFIX && \ make && \ make install
GStreamer Shark instructions
GStreamer Shark is a performance and latency analysis tool available from RidgeRun.
cd $BUILDDIR git clone git@github.com:RidgeRun/gst-shark.git cd $BUILDDIR/gst-shark git checkout feature/add-support-GStreamer-1.8.1 # change to master after release occurs PATH=$PREFIX/bin:$PATH PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig ./autogen.sh --prefix $PREFIX && \ PATH=$PREFIX/bin:$PATH PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig ./configure --prefix $PREFIX && \ make && \ make install
Verifying build outcome
You need to set the path to the sandbox GStreamer you just built.
export PATH=$PREFIX/bin:$PATH gst-inspect-1.0 --version gst-inspect-1.0 interpipesrc
If the above commands run without error, you are good to go.