GStreamer Application Development Manual (1.2.3)

Wim Taymans

Steve Baker

Andy Wingo

Ronald S. Bultje

Stefan Kost

This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at

Table of Contents

Who should read this manual?
Preliminary reading
Structure of this manual
I. About GStreamer
1. What is GStreamer?
2. Design principles
Clean and powerful
Object oriented
Allow binary-only plugins
High performance
Clean core/plugins separation
Provide a framework for codec experimentation
3. Foundations
Bins and pipelines
II. Building an Application
4. Initializing GStreamer
Simple initialization
The GOption interface
5. Elements
What are elements?
Source elements
Filters, convertors, demuxers, muxers and codecs
Sink elements
Creating a GstElement
Using an element as a GObject
More about element factories
Getting information about an element using a factory
Finding out what pads an element can contain
Linking elements
Element States
6. Bins
What are bins
Creating a bin
Custom bins
Bins manage states of their children
7. Bus
How to use a bus
Message types
8. Pads and capabilities
Dynamic (or sometimes) pads
Request pads
Capabilities of a pad
Dissecting capabilities
Properties and values
What capabilities are used for
Using capabilities for metadata
Creating capabilities for filtering
Ghost pads
9. Buffers and Events
10. Your first application
Hello world
Compiling and Running helloworld.c
III. Advanced GStreamer concepts
11. Position tracking and seeking
Querying: getting the position or length of a stream
Events: seeking (and more)
12. Metadata
Metadata reading
Tag writing
13. Interfaces
The URI interface
The Color Balance interface
The Video Overlay interface
14. Clocks and synchronization in GStreamer
Clock running-time
Buffer running-time
Buffer stream-time
Time overview
Clock providers
Latency compensation
Dynamic Latency
15. Buffering
Stream buffering
Download buffering
Timeshift buffering
Live buffering
Buffering strategies
No-rebuffer strategy
16. Dynamic Controllable Parameters
Getting Started
Setting up parameter control
17. Threads
Scheduling in GStreamer
Configuring Threads in GStreamer
Boost priority of a thread
When would you want to force a thread?
18. Autoplugging
Media types as a way to identify streams
Media stream type detection
Dynamically autoplugging a pipeline
19. Pipeline manipulation
Using probes
Data probes
Play a region of a media file
Manually adding or removing data from/to a pipeline
Inserting data with appsrc
Grabbing data with appsink
Forcing a format
Changing format in a PLAYING pipeline
Dynamically changing the pipeline
Changing elements in a pipeline
IV. Higher-level interfaces for GStreamer applications
20. Playback Components
V. Appendices
21. Programs
Grammar Reference
22. Compiling
Embedding static elements in your application
23. Things to check when writing an application
Good programming habits
Conversion plugins
Utility applications provided with GStreamer
24. Porting 0.8 applications to 0.10
List of changes
25. Porting 0.10 applications to 1.0
List of changes
26. Integration
Linux and UNIX-like operating systems
GNOME desktop
KDE desktop
Building GStreamer under Win32
Installation on the system
27. Licensing advisory
How to license the applications you build with GStreamer
28. Quotes from the Developers

List of Figures

1.1. Gstreamer overview
3.1. GStreamer pipeline for a simple ogg player
3.2. GStreamer pipeline with different communication flows
5.1. Visualisation of a source element
5.2. Visualisation of a filter element
5.3. Visualisation of a filter element with more than one output pad
5.4. Visualisation of a sink element
5.5. Visualisation of three linked elements
6.1. Visualisation of a bin with some elements in it
8.1. Visualisation of a GstBin element without ghost pads
8.2. Visualisation of a GstBin element with a ghost pad
10.1. The "hello world" pipeline
14.1. GStreamer clock and various times
17.1. Data buffering, from a networked source
17.2. Synchronizing audio and video sinks
18.1. The Hello world pipeline with media types

List of Examples

4.1. Initializing GStreamer
4.2. Initialisation using the GOption interface