1 <?xml version='1.0' encoding='utf-8'?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % image-entities SYSTEM "image.entities">
6 <!ENTITY % version-entities SYSTEM "version.entities">
9 <!ENTITY TITLEPAGE SYSTEM "titlepage.xml">
11 <!-- Part 1: Introduction -->
12 <!ENTITY INTRO_PREFACE SYSTEM "intro-preface.xml">
13 <!ENTITY INTRO_BASICS SYSTEM "intro-basics.xml">
15 <!-- Part 2: Building a Plugin -->
16 <!ENTITY BUILDING_BOILER SYSTEM "building-boiler.xml">
17 <!ENTITY BUILDING_DEBUG SYSTEM "building-debug.xml">
18 <!ENTITY BUILDING_PADS SYSTEM "building-pads.xml">
19 <!ENTITY BUILDING_CHAINFN SYSTEM "building-chainfn.xml">
20 <!ENTITY BUILDING_STATE SYSTEM "building-state.xml">
21 <!ENTITY BUILDING_PROPS SYSTEM "building-props.xml">
22 <!ENTITY BUILDING_SIGNALS SYSTEM "building-signals.xml">
23 <!ENTITY BUILDING_TESTAPP SYSTEM "building-testapp.xml">
25 <!-- Part 3: Advanced Filter Concepts -->
26 <!ENTITY ADVANCED_NEGOTIATION SYSTEM "advanced-negotiation.xml">
27 <!ENTITY ADVANCED_SCHEDULING SYSTEM "advanced-scheduling.xml">
28 <!ENTITY ADVANCED_TYPES SYSTEM "advanced-types.xml">
29 <!ENTITY ADVANCED_REQUEST SYSTEM "advanced-request.xml">
30 <!ENTITY ADVANCED_CLOCK SYSTEM "advanced-clock.xml">
31 <!ENTITY ADVANCED_DPARAMS SYSTEM "advanced-dparams.xml">
32 <!ENTITY ADVANCED_INTERFACES SYSTEM "advanced-interfaces.xml">
33 <!ENTITY ADVANCED_TAGGING SYSTEM "advanced-tagging.xml">
34 <!ENTITY ADVANCED_EVENTS SYSTEM "advanced-events.xml">
36 <!-- Part 4: Creating special element types -->
37 <!ENTITY OTHER_BASE SYSTEM "other-base.xml">
38 <!ENTITY OTHER_ONETON SYSTEM "other-oneton.xml">
39 <!ENTITY OTHER_NTOONE SYSTEM "other-ntoone.xml">
40 <!ENTITY OTHER_MANAGER SYSTEM "other-manager.xml">
43 <!ENTITY APPENDIX_CHECKLIST SYSTEM "appendix-checklist.xml">
44 <!ENTITY APPENDIX_PORTING SYSTEM "appendix-porting.xml">
45 <!ENTITY APPENDIX_LICENSING SYSTEM "appendix-licensing.xml">
46 <!ENTITY APPENDIX_PYTHON SYSTEM "appendix-python.xml">
48 <!ENTITY GStreamer "<application>GStreamer</application>">
49 <!ENTITY GstAppDevMan "<emphasis>GStreamer Application Development Manual</emphasis>">
50 <!ENTITY GstLibRef "<emphasis>GStreamer Library Reference</emphasis>">
56 <!-- ############# Introduction - part ############### -->
58 <part id="part-introduction" xreflabel="Introduction">
59 <title>Introduction</title>
61 <para><!-- synchronize with AppDevMan -->
62 &GStreamer; is an extremely powerful and versatile framework for creating
63 streaming media applications. Many of the virtues of the &GStreamer;
64 framework come from its modularity: &GStreamer; can seamlessly
65 incorporate new plugin modules. But because modularity and power often
66 come at a cost of greater complexity (consider, for example, <ulink
67 type="http" url="http://www.omg.org/">CORBA</ulink>), writing new
68 plugins is not always easy.
71 This guide is intended to help you understand the &GStreamer; framework
72 (version &GST_VERSION;) so you can develop new plugins to extend the
73 existing functionality. The guide addresses most issues by following the
74 development of an example plugin - an audio filter plugin -
75 written in C. However, the later parts of the guide also present some
76 issues involved in writing other types of plugins, and the end of the
77 guide describes some of the Python bindings for &GStreamer;.
85 <!-- ############ Building a Plugin - part ############# -->
87 <part id="part-building" xreflabel="Building a Plugin">
88 <title>Building a Plugin</title>
91 You are now ready to learn how to build a plugin. In this part of the
92 guide, you will learn how to apply basic &GStreamer;
93 programming concepts to write a simple plugin. The previous parts of the
94 guide have contained no explicit example code, perhaps making things a
95 bit abstract and difficult to understand. In contrast, this section will
96 present both applications and code by following the development of an
97 example audio filter plugin called <quote>MyFilter</quote>.
100 The example filter element will begin with a single input pad and a
102 output pad. The filter will, at first, simply pass media and event data
103 from its sink pad to its source pad without modification. But by the end
104 of this part of the guide, you will learn to add some more interesting
105 functionality, including properties and signal handlers. And after
106 reading the next part of the guide, <xref linkend="part-advanced"/>, you
107 will be able to add even more functionality to your plugins.
110 The example code used in this part of the guide can be found in
111 <filename class="directory">examples/pwg/examplefilter/</filename> in
112 your &GStreamer; directory.
125 <!-- ############ Advanced Filter Concepts - part ############# -->
127 <part id="part-advanced" xreflabel="Advanced Filter Concepts">
128 <title>Advanced Filter Concepts</title>
131 By now, you should be able to create basic filter elements that can
132 receive and send data. This is the simple model that &GStreamer; stands
133 for. But &GStreamer; can do much more than only this! In this chapter,
134 various advanced topics will be discussed, such as scheduling, special
135 pad types, clocking, events, interfaces, tagging and more. These topics
136 are the sugar that makes &GStreamer; so easy to use for applications.
140 &ADVANCED_NEGOTIATION;
141 &ADVANCED_SCHEDULING;
146 &ADVANCED_INTERFACES;
150 <!-- FIXME: add querying, event handling and conversion -->
154 <!-- ############ Creating special element types - part ############# -->
156 <part id="part-other" xreflabel="Creating special element types">
157 <title>Creating special element types</title>
160 By now, we have looked at pretty much any feature that can be embedded
161 into a &GStreamer; element. Most of this has been fairly low-level and
162 given deep insights in how &GStreamer; works internally. Fortunately,
163 &GStreamer; contains some easier-to-use interfaces to create such
164 elements. In order to do that, we will look closer at the element
165 types for which &GStreamer; provides base classes (sources, sinks and
166 transformation elements). We will also look closer at some types of
167 elements that require no specific coding such as scheduling-interaction
168 or data passing, but rather require specific pipeline control (e.g.
169 N-to-1 elements and managers).
179 <!-- ############ Appendices - part ############# -->
181 <part id="part-appendix" xreflabel="Appendices">
182 <title>Appendices</title>
185 This chapter contains things that don't belong anywhere else.