Setting up CVS GStreamer

Currently Jokosher requires CVS GStreamer to be installed to run it. This is because some critical bugs have been fixed that have not yet been released. This guide assumes you are already running a distribution with GStreamer 0.10 installed, and will show you how to parallel install them and run CVS GStreamer and your normal GStreamer side by side.

You first need to download the CVS code for GStreamer. First create a directory to put the code in - I use /sources/gstreamer. Before you download this code, create a directory inside this directory called ‘head’. As such, you do this:

mkdir /sources/gstreamer/head

Now go into that directory and use the following command to download the main gstreamer core module:

cvs -d:pserver:anoncvs@anoncvs.freedesktop.org:/cvs/gstreamer co gstreamer

Note that very recent versions of Gstreamer CVS will not configure or build. If you get an error similar to:

+ running automake -a -c...
automake: cannot open < common/coverage/lcov.mak: No such file or directory

automake failed

you’ll want to add -D 2006-07-01 at the end of your cvs command line, which will pull the CVS version from July 1.

You also need some other modules. Just run the above command and replace the ‘gstreamer’ at the end with the following, one by one:

  • gst-plugins-base
  • gst-plugins-good
  • gst-plugins-ugly
  • gst-python
  • gnonlin

NOTE that you can get all of them in one command with:

for f in gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-python gnonlin;
do cvs -d:pserver:anoncvs@anoncvs.freedesktop.org:/cvs/gstreamer co $f; done

Now, inside the gstreamer module is a special script we can use to run your existing gstreamer and this new fire-in-your-pants gstreamer side by side. The script basically sets a bunch of environmental variables to point at the CVS gstreamer.

First, make sure you have a ‘bin’ directory in your home directory:

mkdir ~/bin

Now copy the script to this bin directory:

cp /sources/gstreamer/head/gstreamer/docs/faq/gst-uninstalled ~/bin

Now, go to ~/bin and rename the script to gst-head:

mv gst-uninstalled gst-head

(the reason we do this is that the bit after the dash (head) refers to the sub-directory in /sources/gstreamer (in our case, head). Now edit this file and look for the MYGST line. Change it to this:

MYGST=/sources/gstreamer

Each time you want to use your CVS gstreamer, you will need to run this script. Run it like this:

~/bin/gst-head

Building GStreamer

Install thefollowing packages (Ubuntu):

  • build-essential
  • automake1.7
  • libtool
  • libglib2.0-dev
  • libxml2
  • liboil0.3-dev
  • python-dev
  • python-gtk2-dev (installs load of other stuff too)
  • bison
  • flex
  • libxml2-dev
  • libgnomevfs2-dev
  • libasound2-dev
  • libspeex-dev
  • libflac-dev
  • libtag1-dev
  • libhal-dev

Easiest way to do this on Ubuntu is

sudo apt-get install build-essential automake1.7 libtool libglib2.0-dev libxml2 liboil0.3-dev
python-dev python-gtk2-dev bison flex libxml2-dev libgnomevfs2-dev libasound2-dev
libspeex-dev libflac-dev libtag1-dev libhal-dev

Now first go to the ‘gstreamer’ module and run this:

./autogen.sh

This will check you have the right bits installed. If it fails, it will tell you what is not installed. If so, install the right things and re-run the script. When it succeeds, run make:

make

DO NOT RUN make install. THE SCRIPT THAT SETS ENVIRONMENTAL VARIABLES REFERS TO THE SOFTWARE IN THE CVS DIRECTORIES - IF YOU DO make install YOU WILL OVERWRITE YOUR EXISTING INSTALLATION, SO DON’T DO IT!

Now, repeat the steps for the other modules in any order. With the plugins modules, each time you run autogen.sh, at the end it will tell you which modules it is going to build, and which ones it it won’t. For the ones with external dependencies, you will need to install other stuff for the plugins to be built. This will mean install something like libvorbis-dev for Ogg Vorbis support. I didn’t note these dependencies down, so when someone does this, note it on this wiki page. Thanks.

You’ll definitely want the following, otherwise Jokosher won’t work at all:

  • libasound2-dev (ALSA)
  • libgnomevfs2-dev

Updating your CVS

If you want to update a module, go into the directory (such as the gst-plugins-base dir) and run:

rm -rf po/
cvs update -PAd

Then re-run autogen.sh and make, and the module is re-built. Again, don’t run ‘make install’!!

Remember!

When you want to use your CVS gstreamer, always run that script first, and you are ready to roll!