2011-01-14 00:20:43 +00:00
|
|
|
<?xml version='1.0' encoding='utf-8'?>
|
2003-10-08 14:34:09 +00:00
|
|
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
2004-05-03 16:03:24 +00:00
|
|
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
|
2003-10-08 14:34:09 +00:00
|
|
|
<!ENTITY % image-entities SYSTEM "image.entities">
|
|
|
|
%image-entities;
|
2004-02-12 13:04:02 +00:00
|
|
|
<!ENTITY % version-entities SYSTEM "version.entities">
|
|
|
|
%version-entities;
|
2002-09-27 18:34:33 +00:00
|
|
|
|
|
|
|
<!ENTITY TITLEPAGE SYSTEM "titlepage.xml">
|
|
|
|
|
2006-01-30 21:11:38 +00:00
|
|
|
<!-- Part 1: Introduction -->
|
2004-01-28 15:45:46 +00:00
|
|
|
<!ENTITY INTRO_PREFACE SYSTEM "intro-preface.xml">
|
|
|
|
<!ENTITY INTRO_BASICS SYSTEM "intro-basics.xml">
|
2002-09-27 18:34:33 +00:00
|
|
|
|
2006-01-30 21:11:38 +00:00
|
|
|
<!-- Part 2: Building a Plugin -->
|
2004-01-28 15:45:46 +00:00
|
|
|
<!ENTITY BUILDING_BOILER SYSTEM "building-boiler.xml">
|
|
|
|
<!ENTITY BUILDING_DEBUG SYSTEM "building-debug.xml">
|
|
|
|
<!ENTITY BUILDING_PADS SYSTEM "building-pads.xml">
|
|
|
|
<!ENTITY BUILDING_CHAINFN SYSTEM "building-chainfn.xml">
|
|
|
|
<!ENTITY BUILDING_STATE SYSTEM "building-state.xml">
|
|
|
|
<!ENTITY BUILDING_PROPS SYSTEM "building-props.xml">
|
|
|
|
<!ENTITY BUILDING_SIGNALS SYSTEM "building-signals.xml">
|
|
|
|
<!ENTITY BUILDING_TESTAPP SYSTEM "building-testapp.xml">
|
2002-09-27 18:34:33 +00:00
|
|
|
|
2006-01-30 21:11:38 +00:00
|
|
|
<!-- Part 3: Advanced Filter Concepts -->
|
2005-07-06 12:18:00 +00:00
|
|
|
<!ENTITY ADVANCED_NEGOTIATION SYSTEM "advanced-negotiation.xml">
|
2004-01-28 15:45:46 +00:00
|
|
|
<!ENTITY ADVANCED_SCHEDULING SYSTEM "advanced-scheduling.xml">
|
|
|
|
<!ENTITY ADVANCED_TYPES SYSTEM "advanced-types.xml">
|
|
|
|
<!ENTITY ADVANCED_REQUEST SYSTEM "advanced-request.xml">
|
|
|
|
<!ENTITY ADVANCED_CLOCK SYSTEM "advanced-clock.xml">
|
|
|
|
<!ENTITY ADVANCED_DPARAMS SYSTEM "advanced-dparams.xml">
|
|
|
|
<!ENTITY ADVANCED_INTERFACES SYSTEM "advanced-interfaces.xml">
|
|
|
|
<!ENTITY ADVANCED_TAGGING SYSTEM "advanced-tagging.xml">
|
|
|
|
<!ENTITY ADVANCED_EVENTS SYSTEM "advanced-events.xml">
|
2002-09-27 18:34:33 +00:00
|
|
|
|
2006-01-30 21:11:38 +00:00
|
|
|
<!-- Part 4: Creating special element types -->
|
2005-07-20 08:29:06 +00:00
|
|
|
<!ENTITY OTHER_BASE SYSTEM "other-base.xml">
|
2004-02-02 21:52:46 +00:00
|
|
|
<!ENTITY OTHER_ONETON SYSTEM "other-oneton.xml">
|
|
|
|
<!ENTITY OTHER_NTOONE SYSTEM "other-ntoone.xml">
|
|
|
|
<!ENTITY OTHER_MANAGER SYSTEM "other-manager.xml">
|
2002-09-27 18:34:33 +00:00
|
|
|
|
2006-01-30 21:11:38 +00:00
|
|
|
<!-- Appendices -->
|
2004-01-28 15:45:46 +00:00
|
|
|
<!ENTITY APPENDIX_CHECKLIST SYSTEM "appendix-checklist.xml">
|
2005-07-01 12:43:03 +00:00
|
|
|
<!ENTITY APPENDIX_PORTING SYSTEM "appendix-porting.xml">
|
2005-01-31 11:43:05 +00:00
|
|
|
<!ENTITY APPENDIX_LICENSING SYSTEM "appendix-licensing.xml">
|
2004-01-28 15:45:46 +00:00
|
|
|
<!ENTITY APPENDIX_PYTHON SYSTEM "appendix-python.xml">
|
2002-09-27 18:34:33 +00:00
|
|
|
|
|
|
|
<!ENTITY GStreamer "<application>GStreamer</application>">
|
|
|
|
<!ENTITY GstAppDevMan "<emphasis>GStreamer Application Development Manual</emphasis>">
|
|
|
|
<!ENTITY GstLibRef "<emphasis>GStreamer Library Reference</emphasis>">
|
|
|
|
]>
|
|
|
|
|
2003-12-02 18:21:35 +00:00
|
|
|
<book id="index">
|
2002-09-27 18:34:33 +00:00
|
|
|
&TITLEPAGE;
|
|
|
|
|
2006-01-30 21:11:38 +00:00
|
|
|
<!-- ############# Introduction - part ############### -->
|
2002-09-27 18:34:33 +00:00
|
|
|
|
|
|
|
<part id="part-introduction" xreflabel="Introduction">
|
|
|
|
<title>Introduction</title>
|
|
|
|
<partintro>
|
2006-02-02 11:24:19 +00:00
|
|
|
<para><!-- synchronize with AppDevMan -->
|
2007-01-26 13:07:36 +00:00
|
|
|
&GStreamer; is an extremely powerful and versatile framework for creating
|
2002-09-27 18:34:33 +00:00
|
|
|
streaming media applications. Many of the virtues of the &GStreamer;
|
|
|
|
framework come from its modularity: &GStreamer; can seamlessly
|
|
|
|
incorporate new plugin modules. But because modularity and power often
|
|
|
|
come at a cost of greater complexity (consider, for example, <ulink
|
|
|
|
type="http" url="http://www.omg.org/">CORBA</ulink>), writing new
|
|
|
|
plugins is not always easy.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
This guide is intended to help you understand the &GStreamer; framework
|
2004-02-12 13:04:02 +00:00
|
|
|
(version &GST_VERSION;) so you can develop new plugins to extend the
|
2002-11-28 08:37:12 +00:00
|
|
|
existing functionality. The guide addresses most issues by following the
|
2002-12-18 15:14:16 +00:00
|
|
|
development of an example plugin - an audio filter plugin -
|
2002-11-28 08:37:12 +00:00
|
|
|
written in C. However, the later parts of the guide also present some
|
|
|
|
issues involved in writing other types of plugins, and the end of the
|
|
|
|
guide describes some of the Python bindings for &GStreamer;.
|
2002-09-27 18:34:33 +00:00
|
|
|
</para>
|
|
|
|
</partintro>
|
|
|
|
|
|
|
|
&INTRO_PREFACE;
|
|
|
|
&INTRO_BASICS;
|
|
|
|
</part>
|
|
|
|
|
2006-01-30 21:11:38 +00:00
|
|
|
<!-- ############ Building a Plugin - part ############# -->
|
2002-09-27 18:34:33 +00:00
|
|
|
|
2004-03-01 17:15:28 +00:00
|
|
|
<part id="part-building" xreflabel="Building a Plugin">
|
|
|
|
<title>Building a Plugin</title>
|
2002-09-27 18:34:33 +00:00
|
|
|
<partintro>
|
|
|
|
<para>
|
2002-11-28 08:37:12 +00:00
|
|
|
You are now ready to learn how to build a plugin. In this part of the
|
2004-03-01 17:15:28 +00:00
|
|
|
guide, you will learn how to apply basic &GStreamer;
|
2002-11-28 08:37:12 +00:00
|
|
|
programming concepts to write a simple plugin. The previous parts of the
|
|
|
|
guide have contained no explicit example code, perhaps making things a
|
|
|
|
bit abstract and difficult to understand. In contrast, this section will
|
|
|
|
present both applications and code by following the development of an
|
2010-04-16 18:09:40 +00:00
|
|
|
example audio filter plugin called <quote>MyFilter</quote>.
|
2002-09-27 18:34:33 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
2004-03-01 17:15:28 +00:00
|
|
|
The example filter element will begin with a single input pad and a
|
|
|
|
single
|
2002-11-28 08:37:12 +00:00
|
|
|
output pad. The filter will, at first, simply pass media and event data
|
|
|
|
from its sink pad to its source pad without modification. But by the end
|
|
|
|
of this part of the guide, you will learn to add some more interesting
|
|
|
|
functionality, including properties and signal handlers. And after
|
|
|
|
reading the next part of the guide, <xref linkend="part-advanced"/>, you
|
|
|
|
will be able to add even more functionality to your plugins.
|
2002-09-27 18:34:33 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The example code used in this part of the guide can be found in
|
|
|
|
<filename class="directory">examples/pwg/examplefilter/</filename> in
|
|
|
|
your &GStreamer; directory.
|
|
|
|
</para>
|
|
|
|
</partintro>
|
|
|
|
|
|
|
|
&BUILDING_BOILER;
|
|
|
|
&BUILDING_PADS;
|
|
|
|
&BUILDING_CHAINFN;
|
|
|
|
&BUILDING_STATE;
|
|
|
|
&BUILDING_PROPS;
|
|
|
|
&BUILDING_SIGNALS;
|
|
|
|
&BUILDING_TESTAPP;
|
|
|
|
</part>
|
|
|
|
|
2006-01-30 21:11:38 +00:00
|
|
|
<!-- ############ Advanced Filter Concepts - part ############# -->
|
2002-09-27 18:34:33 +00:00
|
|
|
|
|
|
|
<part id="part-advanced" xreflabel="Advanced Filter Concepts">
|
|
|
|
<title>Advanced Filter Concepts</title>
|
|
|
|
<partintro>
|
|
|
|
<para>
|
2004-02-02 21:52:46 +00:00
|
|
|
By now, you should be able to create basic filter elements that can
|
|
|
|
receive and send data. This is the simple model that &GStreamer; stands
|
|
|
|
for. But &GStreamer; can do much more than only this! In this chapter,
|
|
|
|
various advanced topics will be discussed, such as scheduling, special
|
|
|
|
pad types, clocking, events, interfaces, tagging and more. These topics
|
|
|
|
are the sugar that makes &GStreamer; so easy to use for applications.
|
2002-09-27 18:34:33 +00:00
|
|
|
</para>
|
|
|
|
</partintro>
|
|
|
|
|
2005-07-06 12:18:00 +00:00
|
|
|
&ADVANCED_NEGOTIATION;
|
2002-09-27 18:34:33 +00:00
|
|
|
&ADVANCED_SCHEDULING;
|
|
|
|
&ADVANCED_TYPES;
|
|
|
|
&ADVANCED_REQUEST;
|
|
|
|
&ADVANCED_CLOCK;
|
|
|
|
&ADVANCED_DPARAMS;
|
2004-01-27 14:58:21 +00:00
|
|
|
&ADVANCED_INTERFACES;
|
2004-01-28 14:16:59 +00:00
|
|
|
&ADVANCED_TAGGING;
|
|
|
|
&ADVANCED_EVENTS;
|
2004-12-23 14:26:14 +00:00
|
|
|
|
|
|
|
<!-- FIXME: add querying, event handling and conversion -->
|
|
|
|
|
2002-09-27 18:34:33 +00:00
|
|
|
</part>
|
|
|
|
|
2006-01-30 21:11:38 +00:00
|
|
|
<!-- ############ Creating special element types - part ############# -->
|
2002-09-27 18:34:33 +00:00
|
|
|
|
2005-07-20 08:29:06 +00:00
|
|
|
<part id="part-other" xreflabel="Creating special element types">
|
|
|
|
<title>Creating special element types</title>
|
2002-09-27 18:34:33 +00:00
|
|
|
<partintro>
|
|
|
|
<para>
|
2004-02-02 21:52:46 +00:00
|
|
|
By now, we have looked at pretty much any feature that can be embedded
|
2005-07-20 08:29:06 +00:00
|
|
|
into a &GStreamer; element. Most of this has been fairly low-level and
|
|
|
|
given deep insights in how &GStreamer; works internally. Fortunately,
|
|
|
|
&GStreamer; contains some easier-to-use interfaces to create such
|
|
|
|
elements. In order to do that, we will look closer at the element
|
|
|
|
types for which &GStreamer; provides base classes (sources, sinks and
|
|
|
|
transformation elements). We will also look closer at some types of
|
|
|
|
elements that require no specific coding such as scheduling-interaction
|
|
|
|
or data passing, but rather require specific pipeline control (e.g.
|
|
|
|
N-to-1 elements and managers).
|
2002-09-27 18:34:33 +00:00
|
|
|
</para>
|
|
|
|
</partintro>
|
|
|
|
|
2005-07-20 08:29:06 +00:00
|
|
|
&OTHER_BASE;
|
2004-02-02 21:52:46 +00:00
|
|
|
&OTHER_ONETON;
|
|
|
|
&OTHER_NTOONE;
|
|
|
|
&OTHER_MANAGER;
|
2002-09-27 18:34:33 +00:00
|
|
|
</part>
|
|
|
|
|
2006-01-30 21:11:38 +00:00
|
|
|
<!-- ############ Appendices - part ############# -->
|
2002-09-27 18:34:33 +00:00
|
|
|
|
|
|
|
<part id="part-appendix" xreflabel="Appendices">
|
|
|
|
<title>Appendices</title>
|
|
|
|
<partintro>
|
|
|
|
<para>
|
2004-02-02 21:52:46 +00:00
|
|
|
This chapter contains things that don't belong anywhere else.
|
2002-09-27 18:34:33 +00:00
|
|
|
</para>
|
|
|
|
</partintro>
|
|
|
|
|
|
|
|
&APPENDIX_CHECKLIST;
|
2005-07-01 12:43:03 +00:00
|
|
|
&APPENDIX_PORTING;
|
2005-01-31 11:43:05 +00:00
|
|
|
&APPENDIX_LICENSING;
|
2002-09-27 18:34:33 +00:00
|
|
|
&APPENDIX_PYTHON;
|
|
|
|
</part>
|
|
|
|
|
|
|
|
</book>
|