Table of Contents
I. Introduction ......................................................................................................................................... vii
1. Preface
............................................................................................................................................1
1.1. Wha t is GStreamer?
...........................................................................................................1
1.2. Who Should Read This Guide?
.........................................................................................1
1.3. Preliminary Reading
..........................................................................................................2
1.4. Structure of This Gu ide
.....................................................................................................2
2. Foundations
....................................................................................................................................5
2.1. E le ments and Plugins
........................................................................................................5
2.2. Pads
....................................................................................................................................5
2.3. GstMin iObject, Buffers and Events
...................................................................................6
2.4. Media ty pes and Properties
...............................................................................................8
II. Building a Plugin
................................................................................................................................11
3. Constructing the Boiler plate
........................................................................................................12
3.1. Getting the GStreamer Plugin Templates
........................................................................12
3.2. Using the Pr oject Stamp
..................................................................................................1 2
3.3. E xamining the Basic Code
..............................................................................................1 3
3.4. E le ment metadata
............................................................................................................14
3.5. GstStaticPadTemplate
......................................................................................................15
3.6. Constructor Functions
.....................................................................................................17
3.7. T he plugin_init fu nction
..................................................................................................1 7
4. Specifying the pads
......................................................................................................................19
5. The chain function
.......................................................................................................................20
6. The event function
........................................................................................................................23
7. The query function
.......................................................................................................................25
8. What are states?
...........................................................................................................................27
8.1. Managing filter state
........................................................................................................27
9. Adding Properties
........................................................................................................................30
10. Signals
........................................................................................................................................33
11. Building a Test Application
.......................................................................................................34
III. Advanced Filter Concepts
................................................................................................................38
12. Request and Sometimes pads
.....................................................................................................39
12.1. Sometimes pads
.............................................................................................................39
12.2. Request pads
..................................................................................................................42
13. Different scheduling modes
.......................................................................................................45
13.1. The pad activation stage
................................................................................................45
13.2. Pads driving the pipeline
...............................................................................................46
13.3. Providing random access
...............................................................................................49
14. Caps negotiation
.........................................................................................................................52
14.1. Caps negotiation basics
.................................................................................................52
14.2. Caps negotiation use cases
............................................................................................52
14.3. Upstream caps (re)negotiation
.......................................................................................58
14.4. Implementing a CAPS query function
..........................................................................58
14.5. Pull-mode Caps negotiation
..........................................................................................6 0
15. Memory allo cation
.....................................................................................................................61
15.1. GstMemory
....................................................................................................................61
iii