GStreamer Plugin Writer's Guide (1.0.7)

Richard John Boulton

Erik Walthinsen

Steve Baker

Leif Johnson

Ronald S. Bultje

Stefan Kost

Tim-Philipp Müller

Wim Taymans

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. Introduction
1. Preface
1.1. What is GStreamer?
1.2. Who Should Read This Guide?
1.3. Preliminary Reading
1.4. Structure of This Guide
2. Foundations
2.1. Elements and Plugins
2.2. Pads
2.3. GstMiniObject, Buffers and Events
2.4. Media types and Properties
II. Building a Plugin
3. Constructing the Boilerplate
3.1. Getting the GStreamer Plugin Templates
3.2. Using the Project Stamp
3.3. Examining the Basic Code
3.4. Element metadata
3.5. GstStaticPadTemplate
3.6. Constructor Functions
3.7. The plugin_init function
4. Specifying the pads
5. The chain function
6. The event function
7. The query function
8. What are states?
8.1. Managing filter state
9. Adding Properties
10. Signals
11. Building a Test Application
III. Advanced Filter Concepts
12. Request and Sometimes pads
12.1. Sometimes pads
12.2. Request pads
13. Different scheduling modes
13.1. The pad activation stage
13.2. Pads driving the pipeline
13.3. Providing random access
14. Caps negotiation
14.1. Caps negotiation basics
14.2. Caps negotiation use cases
14.3. Upstream caps (re)negotiation
14.4. Implementing a CAPS query function
14.5. Pull-mode Caps negotiation
15. Memory allocation
15.1. GstMemory
15.2. GstBuffer
15.3. GstMeta
15.4. GstBufferPool
15.5. GST_QUERY_ALLOCATION
16. Types and Properties
16.1. Building a Simple Format for Testing
16.2. Typefind Functions and Autoplugging
16.3. List of Defined Types
17. Events: Seeking, Navigation and More
17.1. Downstream events
17.2. Upstream events
17.3. All Events Together
18. Clocking
18.1. Clocks
18.2. Clock running-time
18.3. Buffer running-time
18.4. Obligations of each element.
19. Quality Of Service (QoS)
19.1. Measuring QoS
19.2. Handling QoS
19.3. Throttling
19.4. QoS Messages
20. Supporting Dynamic Parameters
20.1. Getting Started
20.2. The Data Processing Loop
21. Interfaces
21.1. How to Implement Interfaces
21.2. URI interface
21.3. Color Balance Interface
21.4. Video Overlay Interface
21.5. Navigation Interface
22. Tagging (Metadata and Streaminfo)
22.1. Overview
22.2. Reading Tags from Streams
22.3. Writing Tags to Streams
IV. Creating special element types
23. Pre-made base classes
23.1. Writing a sink
23.2. Writing a source
23.3. Writing a transformation element
24. Writing a Demuxer or Parser
25. Writing a N-to-1 Element or Muxer
26. Writing a Manager
V. Appendices
27. Things to check when writing an element
27.1. About states
27.2. Debugging
27.3. Querying, events and the like
27.4. Testing your element
28. Porting 0.8 plug-ins to 0.10
28.1. List of changes
29. Porting 0.10 plug-ins to 1.0
30. GStreamer licensing
30.1. How to license the code you write for GStreamer
List of Tables
2-1. Table of Example Types
16-1. Table of Audio Types
16-2. Table of Video Types
16-3. Table of Container Types
16-4. Table of Subtitle Types
16-5. Table of Other Types
List of Examples
3-1. Example Plugin Header File