GStreamer Plugin Writer's Guide (1.4.4)

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
What is GStreamer?
Who Should Read This Guide?
Preliminary Reading
Structure of This Guide
2. Foundations
Elements and Plugins
Pads
GstMiniObject, Buffers and Events
Buffer Allocation
Media types and Properties
The Basic Types
II. Building a Plugin
3. Constructing the Boilerplate
Getting the GStreamer Plugin Templates
Using the Project Stamp
Examining the Basic Code
Element metadata
GstStaticPadTemplate
Constructor Functions
The plugin_init function
4. Specifying the pads
5. The chain function
6. The event function
7. The query function
8. What are states?
Managing filter state
9. Adding Properties
10. Signals
11. Building a Test Application
III. Advanced Filter Concepts
12. Request and Sometimes pads
Sometimes pads
Request pads
13. Different scheduling modes
The pad activation stage
Pads driving the pipeline
Providing random access
14. Caps negotiation
Caps negotiation basics
Caps negotiation use cases
Fixed negotiation
Transform negotiation
Dynamic negotiation
Upstream caps (re)negotiation
Implementing a CAPS query function
Pull-mode Caps negotiation
15. Memory allocation
GstMemory
GstAllocator
GstMemory API example
Implementing a GstAllocator
GstBuffer
GstBuffer writability
GstBuffer API examples
GstMeta
GstMeta API example
Implementing new GstMeta
GstBufferPool
GstBufferPool API example
Implementing a new GstBufferPool
GST_QUERY_ALLOCATION
ALLOCATION query example
The ALLOCATION query in base classes
16. Types and Properties
Building a Simple Format for Testing
Typefind Functions and Autoplugging
List of Defined Types
17. Events: Seeking, Navigation and More
Downstream events
Upstream events
All Events Together
Stream Start
Caps
Segment
Tag (metadata)
End of Stream (EOS)
Table Of Contents
Gap
Flush Start
Flush Stop
Quality Of Service (QOS)
Seek Request
Navigation
18. Clocking
Clocks
Clock running-time
Buffer running-time
Obligations of each element.
Non-live source elements
Live source elements
Parser/Decoder/Encoder elements
Demuxer elements
Muxer elements
Sink elements
19. Quality Of Service (QoS)
Measuring QoS
Handling QoS
Short term correction
Long term correction
Throttling
QoS Messages
20. Supporting Dynamic Parameters
Getting Started
The Data Processing Loop
The Data Processing Loop for Video Elements
The Data Processing Loop for Audio Elements
21. Interfaces
How to Implement Interfaces
URI interface
Color Balance Interface
Video Overlay Interface
Navigation Interface
22. Tagging (Metadata and Streaminfo)
Overview
Reading Tags from Streams
Writing Tags to Streams
IV. Creating special element types
23. Pre-made base classes
Writing a sink
Writing an audio sink
Writing a video sink
Writing a source
Writing an audio source
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
About states
Debugging
Querying, events and the like
Testing your element
28. Porting 0.8 plug-ins to 0.10
List of changes
29. Porting 0.10 plug-ins to 1.0
30. GStreamer licensing
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