GStreamer different version installation

From RidgeRun Developer Connection
Jump to: navigation, search

This wiki indicates how to install GStreamer version into systems without modifying system binaries like /usr/lib/

GStreamer installation

  • NOTE: If you want to add debug symbols which is useful for debug, append at each configure command: CFLAGS="-O0 -ggdb3" or remove in case not needed

Commands for installing gst 1.6.3, non invasive way (no root permissions needed). All packages installed at: ~/devdirs/gst-1.8.3/local/

1. Create directory to download and install all gstreamer packages

  • These commands were tested with GStreamer-1.8.3 but GST_VERSION can be modified as required, testing has been done with GStreamer version 1.8.3 - 1.14.4
GST_VERSION=1.8.3
mkdir -p /home/$USER/devdirs/gst-$GST_VERSION
cd /home/$USER/devdirs/gst-$GST_VERSION

2. Install dependencies

ORC-0.4.24

wget http://gstreamer.freedesktop.org/src/orc/orc-0.4.24.tar.xz
tar -xvf orc-0.4.24.tar.xz
cd orc-0.4.24/
./configure --prefix /home/$USER/devdirs/gst-$GST_VERSION/local PKG_CONFIG_PATH=/home/$USER/devdirs/gst-$GST_VERSION/local/lib/pkgconfig CFLAGS="-O0 -ggdb3"
make
make install
cd ..


3. Download from GST Downloads official: http://gstreamer.freedesktop.org/src/

wget http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-$GST_VERSION.tar.xz
wget http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-$GST_VERSION.tar.xz 
wget http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-$GST_VERSION.tar.xz 
wget http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-$GST_VERSION.tar.xz 
wget http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-$GST_VERSION.tar.xz
wget http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-$GST_VERSION.tar.xz
wget http://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-$GST_VERSION.tar.xz  

4. Extract files

tar -xf gstreamer-$GST_VERSION.tar.xz
tar -xf gst-plugins-base-$GST_VERSION.tar.xz
tar -xf gst-plugins-good-$GST_VERSION.tar.xz
tar -xf gst-plugins-bad-$GST_VERSION.tar.xz
tar -xf gst-plugins-ugly-$GST_VERSION.tar.xz
tar -xf gst-libav-$GST_VERSION.tar.xz 
tar -xf gst-rtsp-server-$GST_VERSION.tar.xz 

5. Build gstreamer

Gstreamer-1.8.3

cd gstreamer-$GST_VERSION/
./configure --prefix /home/$USER/devdirs/gst-$GST_VERSION/local PKG_CONFIG_PATH=/home/$USER/devdirs/gst-$GST_VERSION/local/lib/pkgconfig CFLAGS="-O0 -ggdb3"
make
make install
cd ..

Gst-plugins-base-1.8.3

cd gst-plugins-base-$GST_VERSION/
./configure --prefix /home/$USER/devdirs/gst-$GST_VERSION/local PKG_CONFIG_PATH=/home/$USER/devdirs/gst-$GST_VERSION/local/lib/pkgconfig CFLAGS="-O0 -ggdb3"
make
make install
cd ..


Gst-plugins-good-1.8.3

cd gst-plugins-good-$GST_VERSION/
./configure --prefix /home/$USER/devdirs/gst-$GST_VERSION/local PKG_CONFIG_PATH=/home/$USER/devdirs/gst-$GST_VERSION/local/lib/pkgconfig CFLAGS="-O0 -ggdb3"
make
make install
cd ..


Gst-plugins-bad-1.8.3

cd gst-plugins-bad-$GST_VERSION/
./configure --prefix /home/$USER/devdirs/gst-$GST_VERSION/local PKG_CONFIG_PATH=/home/$USER/devdirs/gst-$GST_VERSION/local/lib/pkgconfig CFLAGS="-O0 -ggdb3"
make
make install
cd ..


Gst-plugins-ugly-1.8.3

cd gst-plugins-ugly-$GST_VERSION/
./configure --prefix /home/$USER/devdirs/gst-$GST_VERSION/local PKG_CONFIG_PATH=/home/$USER/devdirs/gst-$GST_VERSION/local/lib/pkgconfig CFLAGS="-O0 -ggdb3"
make
make install
cd ..


Gst-libav-1.8.3

cd gst-libav-$GST_VERSION/
./configure --prefix /home/$USER/devdirs/gst-$GST_VERSION/local PKG_CONFIG_PATH=/home/$USER/devdirs/gst-$GST_VERSION/local/lib/pkgconfig CFLAGS="-O0 -ggdb3"
make
make install
cd ..

Gst-rtsp-server-1.8.3

cd gst-rtsp-server-$GST_VERSION/
./configure --prefix /home/$USER/devdirs/gst-$GST_VERSION/local PKG_CONFIG_PATH=/home/$USER/devdirs/gst-$GST_VERSION/local/lib/pkgconfig CFLAGS="-O0 -ggdb3"
make
make install
cd ..

Gst-shark

git clone git@github.com:RidgeRun/gst-shark.git
cd gst-shark
PKG_CONFIG_PATH=/home/$USER/devdirs/gst-$GST_VERSION/local/lib/pkgconfig ./autogen.sh --prefix /home/$USER/devdirs/gst-$GST_VERSION/local
make
make install
cd ..

PATH Modification

At .bashrc file

export PATH=~/devdirs/gst-1.8.3/local/bin:$PATH

Configure the PKG_CONFIG_PATH, at .bashrc file

export PKG_CONFIG_PATH=~/devdirs/gst-1.8.3/local/lib/pkgconfig:$PKG_CONFIG_PATH

Core dump

  • unlimited size
ulimit -c unlimited
  • Core dump location at /tmp/
echo '/tmp/core.%e.%p.%t' | sudo tee /proc/sys/kernel/core_pattern 
  • Or with direct command line (pipeline causing back trace):
gdb --args  gst-launch-1.0 videotestsrc ! xvimagesink
  • G_DEBUG options are also possible:
G_DEBUG=fatal-warnings gdb --args your_program and its args
  • Setting breakpoints at gdb, need to run program from the beginning (in this case breakpoint at gst-launch.c line 1115):
break gst-launch.c:1115
run
n #to run one instruction
s #to execute next step, will go into instructions
finish # to step out of current function, abbreviated as fin
  • gdb stop on solib events (like loading shared library:
set stop-on-solib-events 0
set stop-on-solib-events 1
show stop-on-solib-events
  • Set breakpoints on shared libraries
apropos pending #not required, will print information about commands with pending
set breakpoint pending on #not required
break gstvideotestsrc.c:181
info locals    #for local variables
info args      #for arguments of current function / frame
info brake     #brake points list
info threads   #prints threads and thread in use
info registers #print registers info
frame number # to check one particular frame of the backtrace
print var_name # raplace var_name with one variable to check its value