GStreamer Application Development Manual

Wim Taymans

Steve Baker

Andy Wingo

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 http://www.opencontent.org/openpub/ )


Table of Contents

I. Overview
1. Introduction
What is GStreamer?
2. Motivation
Current problems
Multitude of duplicate code
'One goal' media players/libraries
Non unified plugin mechanisms
Provision for network transparency
Catch up with the Windows(tm) world
3. Goals
The design goals
Clean and powerful
Object oriented
Extensible
Allow binary only plugins
High performance
Provide a framework for codec experimentation
II. Basic concepts
4. Initializing GStreamer
The popt interface
5. GstElement
What is a GstElement
Source elements
Filters and codecs
Sink elements
Creating a GstElement
GstElement properties
GstElement signals
More about GstElementFactory
Getting information about an element using the factory details
Finding out what pads an element can contain
Different ways of querying the factories
6. Plugins
7. GstPad
Getting pads from an element
Useful pad functions
Dynamic pads
Request pads
Capabilities of a GstPad
What is a capability
What are properties
What capabilities are used for
Getting the capabilities of a pad
Creating capability structures
8. Linking elements
Making simple links
Making filtered links
9. Bins
Creating a bin
Adding elements to a bin
Custom bins
Ghost pads
10. Buffers
11. Element states
The different element states
The NULL state
The READY state
The PLAYING state
The PAUSED state
III. Building an application
12. Your first application
Hello world
Compiling helloworld.c
Conclusion
13. More on factories
The problems with the helloworld example
More on MIME Types
GStreamer types
MIME type to id conversion
id to GstType conversion
extension to id conversion
Creating elements with the factory
GStreamer basic types
IV. Advanced GStreamer concepts
14. Threads
Constraints placed on the pipeline by the GstThread
When would you want to use a thread?
15. Queues
16. Cothreads
Chain-based elements
Loop-based elements
17. Understanding schedulers
18. Clocks in GStreamer
19. Dynamic pipelines
20. Typedetection
21. Autoplugging
Using autoplugging
Using the GstAutoplugCache element
Another approach to autoplugging
The spider element
Spider features
22. Your second application
Autoplugging helloworld
23. Dynamic Parameters
Getting Started
Creating and Attaching Dynamic Parameters
Changing Dynamic Parameter Values
Different Types of Dynamic Parameter
GstDParam - the base dparam type
GstDParamSmooth - smoothing real-time dparam
Timelined dparams
V. XML in GStreamer
24. XML in GStreamer
Turning GstElements into XML
Loading a GstElement from an XML file
Adding custom XML tags into the core XML data
VI. Appendices
25. Debugging
Command line options
Adding a custom debug handler
26. Programs
gst-register
gst-launch
Grammar Reference
gst-inspect
gst-play
27. Components
GstPlay
GstMediaPlay
GstEditor
28. Gnome integration
Command line options
29. Quotes from the Developers

List of Figures

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
8.1. Visualisation of three linked elements
9.1. Visualisation of a GstBin element with some elements in it
9.2. Visualisation of a GstBin element without ghost pads
9.3. Visualisation of a GstBin element with a ghost pad
12.1. The Hello world pipeline
13.1. The Hello world pipeline with MIME types
14.1. A thread
15.1. a two-threaded decoder with a queue