GStreamer Creating C Code applications

From RidgeRun Developer Wiki
Revision as of 00:29, 18 June 2013 by Caguero (talk | contribs)

Gstreamer C Code Applications

This wiki documents how to create a Gstreamer C code application for Ridgerun's SDK. The applications will be created at $(DEVDIR)/myapps, will use Ridgerun classes for gstreamer, autotools and general sdk installation into target.


The demo was done on Turrialba SDK for a LeopardBoard DM368

Gstreamer documentation has information about creating applications at: gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-helloworld.html

Additionally Ridgerun provides an example that can be added at devdir: $DEVDIR/myapp, this application can be compiled for ARM and also for HOST


Git repository:

git clone https://github.com/RidgeRun/video-capture-application.git video-capture-application


Gstreamer applications can have parsers, callbacks according to signals, read values from command lines and many others, in this case this is just a simple application that runs the following pipeline:

videotestsrc num-buffers=300 ! 'video/x-raw-yuv,format=(fourcc)NV12,width=640, height=480' ! dmaiaccel ! dmaienc_h264 ! queue ! qtmux ! filesink location=<Specified as argv[1]>

Application structure

hello-gst/
├── Config
├── Makefile
└── src
         ├── autogen.sh
         ├── configure.ac
         ├── Makefile.am
         ├── README
         └── src
                  ├── gstreamer.c
                  └── Makefile.am

Compiling Application

ARM Compilation

In order to compile for ARM Ridgerun SDK will handle dependencies, just clone the repository into a directory at Ridgerun SDK's myapps directory, select it at make config and run make at SDK's root.

Running application

When the application is installed it can be run at the target with the following command:

 video_capture_application test_file.h264

x86 Compilation

After cloning the application run the autogen.sh script, configure and compile with following commands: It is highly suggested to not run these commands into a Devdir, that has modified the environment with `make env`

git clone https://github.com/RidgeRun/video-capture-application.git video-capture-application
cd hello-gst/src
./autogen.sh
./configure
make

After compiling the application can be executed as any regular binary, file name must be defined:

cd <Directory>/src/src
./hello_gst video_test.h264