Play ogg audio using the Hello World example of GStreamer


The source code of the example in C can be found in the GStreamer application development manual at chapter 10.

Dependencies

I am using Ubuntu 11.04. I installed the following packages. Get the equivalent packages for your distribution.

  • libgstreamer0.10-dev
  • libglib2.0-dev
  • libgtk2.0-dev

Build

Assuming your source code is located in hello_world.c, you can compile the source code thus

gcc hello_world.c `pkg-config --cflags --libs glib-2.0 gstreamer-0.10` -o hello_world

Execute

Execute as follows

./hello_world file.ogg

One thought on “Play ogg audio using the Hello World example of GStreamer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s