How to add gstreamer support to Disko

Preface

Disko was and is using libxine for media playback for good reason for years now. In the last 2 years GStreamer developed into a very serious alternative on embedded devices. Now that TI is going to support GStreamer for their Davinci and OMAP platforms there is way but to add GSreamer support to Disko

Actually thats a bit tricky, because a little bootstrapping needs to be done here. This tutorial will create a basic GSTreamer instance from scratch, not using any distribution GStreamer packages.

Prerequisites

To compile and install gstreamer sucessfully, following Debian/Ubuntu packages need to be installed in advance:

Disko > 1.5.x has to be already compiled and installed for this stage as well. We have to compile and install it again after GStreamer with Disko support is compiled and ready.

As we plan to install GStreamer into the users home directory, set the PKG_CONFIG_PATH to the $HOME/gstreamer/lib/pkgconfig

 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/gstreamer/lib/pkgconfig

GStreamer engine

First step ist to download and install GStreamer:

 wget http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.23.tar.bz2
 tar jxf gstreamer-0.10.23.tar.bz2
 cd gstreamer-0.10.23
 ./configure --prefix=$HOME/gstreamer && make && make install;

GStreamer base plugins

Second step in the installation process are the base plugins.

 wget http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.23.tar.bz2
 tar jxf gst-plugins-base-0.10.23.tar.bz2
 cd gst-plugins-base-0.10.23
 ./configure --prefix=$HOME/gstreamer && make && make install;

GStreamer bad plugins

Second step in the installation process are the bad plugins. Naturally the Disko output plugin resides here, as we plan to propose Disko to be added to the GStreamer upstream.

 wget http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.12.tar.bz2
 tar jxf gst-plugins-bad-0.10.12.tar.bz2

Before the bad plugins are installed the disko patch has to be applied. The patch can be found in the disko source tree as ext/gst-plugins-bad-0.10.12_diskovideosink.diff

 cd gst-plugins-bad-0.10.12 
 patch -Np1 -i gst-plugins-bad-0.10.12_diskovideosink.diff
After that compile and install the plugins the usual way. Make sure that the PKG_CONFIG_PATH includes the current disko installation.
 ./configure --prefix=$HOME/gstreamer && make && make install;

Rebuild Disko

After gstreameer is installed Disko needs to be rebuilt. This is necessary to compile the now provided GStreamer support into the Disko installation. This process is needed because disko is a single package within the SCons build system. This should be fixed somewhen, but today this seems to be sufficent for testing.

If the PKG_CONFIG_PATH is set correctly and scons is invoked with the parameter media=gstreamer the build should result in a Disko installation supporting GStreamer.

How it works

Multimedia playback is done using the mmsmedia component. Using xine as backed made the handling of different content fairly easy, by using MRLs to identify sources. GStreamer does not support this by its engine. Therefor we are using the GSTreamer playbin plugin to achieve this result.

To cut a long story short, from the application point of view there are no changes to be made. An application like Morphine.TV is working without any change on GStreamer.

If there are any flaws or mistakes in this article. Just feel free to report this at our Forum