没有合适的资源?快使用搜索试试~ 我知道了~
首页gstreamer plugin writer's guide
gstreamer plugin writer's guide

如何编写gstreamer插件的小手册。介绍了基本概念,如何编写,编译及调试gstreamer插件的官方手册。
资源详情
资源评论
资源推荐

GStreamer Plugin Writer’s Guide
(1.10.1)
Richard John Boulton
Erik Walthinsen
Steve Baker
Leif Jo hnson
Ronald S. Bult j e
Stefan Kost
Tim-Phili pp Müller
Wim Taymans

GStreamer Plugin Writer’s Guide (1.10.1)
by Richard John Boulton, Erik Walthinsen, Steve Baker, Leif Joh nson, Ron a ld S. Bultje, Stefan Kost, Tim-Philipp
Müller, and 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 ......................................................................................................................................... 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

15.2. GstBuffer .......................................................................................................................62
15.3. GstMeta
.........................................................................................................................64
15.4. GstBufferPool
................................................................................................................69
15.5. GST_QUERY_ALLOCATION
.....................................................................................71
16. Types a nd Properties
..................................................................................................................74
16.1. Building a Simple Format for Testing
...........................................................................74
16.2. Typefind Functions and Autoplugging
..........................................................................74
16.3. List of Defined Types
....................................................................................................75
17. Events: Seeking, Navigation and More
......................................................................................92
17.1. Downstream events
........................................................................................................92
17.2. Upstream events
............................................................................................................93
17.3. All Events Together
.......................................................................................................94
18. Clocking
.....................................................................................................................................99
18.1. Clocks
............................................................................................................................99
18.2. Clock running-time
........................................................................................................99
18.3. Buffer running-time
.......................................................................................................99
18.4. Obligations of each element.
.......................................................................................100
19. Qu ality Of Service ( Q oS)
.........................................................................................................102
19.1. Measuring QoS
............................................................................................................102
19.2. Handling QoS
..............................................................................................................103
19.3. Throttling
.....................................................................................................................105
19.4. QoS Messages
.............................................................................................................105
20. Supporting Dy namic Parameters
..............................................................................................107
20.1. Getting Started
.............................................................................................................107
20.2. The Data Processing Loop
...........................................................................................107
21. Interfaces
..................................................................................................................................109
21.1. How to Implement Interfaces
......................................................................................109
21.2. URI interface
...............................................................................................................110
21.3. Color Balance Interface
...............................................................................................111
21.4. Video Overlay Interface
...............................................................................................111
21.5. Navigation Interface
....................................................................................................112
22. Tagging (Metadata and Streaminfo)
.........................................................................................113
22.1. Overview
.....................................................................................................................113
22.2. Reading Tags from Streams
.........................................................................................113
22.3. Writing Tags to Streams
..............................................................................................114
IV. Creating special element types
.......................................................................................................118
23. Pre-made ba se classes
..............................................................................................................119
23.1. Writing a sink
..............................................................................................................119
23.2. Writing a source
..........................................................................................................121
23.3. Writing a transformation element
................................................................................122
24. Writing a Demuxer o r Parser
...................................................................................................123
25. Writing a N-to-1 Element or Muxer
.........................................................................................124
26. Writing a Manager
...................................................................................................................125
iv

V. Appendices.........................................................................................................................................126
27. Things to check when writing an element
...............................................................................127
27.1. About states
.................................................................................................................127
27.2. Debugging
...................................................................................................................127
27.3. Querying, events an d the like
......................................................................................128
27.4. Testing your ele ment
...................................................................................................128
28. Porting 0.8 plug-ins to 0.10
......................................................................................................130
28.1. List of changes
.............................................................................................................130
29. Porting 0.10 plug-ins to 1.0
......................................................................................................132
30. GStreamer licensing
.................................................................................................................133
30.1. How to license the code you write for GStreamer
.......................................................133
v
剩余139页未读,继续阅读














安全验证
文档复制为VIP权益,开通VIP直接复制

评论1