Table of Contents
I. Introduction...........................................................................................................................................vi
1. Preface
............................................................................................................................................1
1.1. What is GStreamer?
...........................................................................................................1
1.2. Who Should Read This Guide?
.........................................................................................1
1.3. Preliminary Reading
..........................................................................................................2
1.4. Structure of This Guide
.....................................................................................................2
2. Foundations
....................................................................................................................................5
2.1. Elements and Plugins
........................................................................................................5
2.2. Pads
....................................................................................................................................5
2.3. Data, Buffers and Events
...................................................................................................6
2.4. Mimetypes and Properties
.................................................................................................8
II. Building a Plugin
................................................................................................................................12
3. Constructing the Boilerplate
........................................................................................................13
3.1. Getting the GStreamer Plugin Templates
........................................................................13
3.2. Using the Project Stamp
..................................................................................................13
3.3. Examining the Basic Code
..............................................................................................14
3.4. GstElementDetails
...........................................................................................................15
3.5. GstStaticPadTemplate
......................................................................................................16
3.6. Constructor Functions
.....................................................................................................18
3.7. The plugin_init function
..................................................................................................18
4. Specifying the pads
......................................................................................................................20
4.1. The setcaps-function
........................................................................................................21
5. The chain function
.......................................................................................................................23
6. What are states?
...........................................................................................................................25
6.1. Managing filter state
........................................................................................................25
7. Adding Arguments
.......................................................................................................................28
8. Signals
..........................................................................................................................................31
9. Building a Test Application
.........................................................................................................32
III. Advanced Filter Concepts
................................................................................................................36
10. Caps negotiation
.........................................................................................................................37
10.1. Caps negotiation use cases
............................................................................................37
10.2. Fixed caps
......................................................................................................................38
10.3. Downstream caps negotiation
........................................................................................39
10.4. Upstream caps (re)negotiation
.......................................................................................41
10.5. Implementing a getcaps function
...................................................................................42
11. Different scheduling modes
.......................................................................................................43
11.1. The pad activation stage
................................................................................................43
11.2. Pads driving the pipeline
...............................................................................................44
11.3. Providing random access
...............................................................................................46
12. Types and Properties
..................................................................................................................49
12.1. Building a Simple Format for Testing
...........................................................................49
12.2. Typefind Functions and Autoplugging
..........................................................................49
12.3. List of Defined Types
....................................................................................................51
13. Request and Sometimes pads
.....................................................................................................68
13.1. Sometimes pads
.............................................................................................................68
iii