2004-01-28 15:08:17 +00:00
|
|
|
<chapter id="chapter-goals">
|
2000-08-16 21:38:57 +00:00
|
|
|
<title>Goals</title>
|
|
|
|
<para>
|
|
|
|
GStreamer was designed to provide a solution to the current Linux media
|
|
|
|
problems.
|
|
|
|
</para>
|
|
|
|
|
2004-01-28 15:08:17 +00:00
|
|
|
<sect1 id="section-goals-design">
|
2000-08-16 21:38:57 +00:00
|
|
|
<title>The design goals</title>
|
|
|
|
<para>
|
2002-09-06 15:53:06 +00:00
|
|
|
We describe what we try to achieve with GStreamer.
|
2000-08-16 21:38:57 +00:00
|
|
|
</para>
|
2004-01-28 15:08:17 +00:00
|
|
|
<sect2 id="section-goals-clean">
|
2002-09-06 15:53:06 +00:00
|
|
|
<title>Clean and powerful</title>
|
2000-08-16 21:38:57 +00:00
|
|
|
<para>
|
|
|
|
GStreamer wants to provide a clean interface to:
|
|
|
|
</para>
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2001-01-04 23:35:50 +00:00
|
|
|
The application programmer who wants to build a media pipeline.
|
2002-09-06 15:53:06 +00:00
|
|
|
The programmer can use an extensive set of powerful tools to create
|
2001-01-04 23:35:50 +00:00
|
|
|
media pipelines without writing a single line of code. Performing
|
|
|
|
complex media manipulations becomes very easy.
|
2000-08-16 21:38:57 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2001-01-04 23:35:50 +00:00
|
|
|
The plugin programmer. Plugin programmers are provided a clean and
|
|
|
|
simple API to create self contained plugins. An extensive debugging
|
|
|
|
and tracing mechanism has been integrated. GStreamer also comes with
|
|
|
|
an extensive set of real-life plugins that serve as an example too.
|
2000-08-16 21:38:57 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
</sect2>
|
2004-01-28 15:08:17 +00:00
|
|
|
<sect2 id="section-goals-object">
|
2000-08-16 21:38:57 +00:00
|
|
|
<title>Object oriented</title>
|
|
|
|
<para>
|
2003-10-09 12:42:49 +00:00
|
|
|
GStreamer adheres to the GLib 2.0 object model. A programmer familiar with GLib 2.0 or older versions
|
|
|
|
of GTK+ will be comfortable with GStreamer.
|
2002-04-07 23:32:16 +00:00
|
|
|
</para>
|
2000-08-16 21:38:57 +00:00
|
|
|
<para>
|
2002-04-07 23:32:16 +00:00
|
|
|
GStreamer uses the mechanism of signals and object properties.
|
2001-01-04 23:35:50 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
All objects can be queried at runtime for their various properties and
|
|
|
|
capabilities.
|
2000-08-16 21:38:57 +00:00
|
|
|
</para>
|
2003-10-09 12:42:49 +00:00
|
|
|
<para>
|
|
|
|
GStreamer intends to be similar in programming methodology to GTK+.
|
|
|
|
This applies to the object model, ownership of objects, reference
|
|
|
|
counting, ...
|
|
|
|
</para>
|
2000-08-16 21:38:57 +00:00
|
|
|
</sect2>
|
|
|
|
|
2004-01-28 15:08:17 +00:00
|
|
|
<sect2 id="section-goals-extensible">
|
2000-08-16 21:38:57 +00:00
|
|
|
<title>Extensible</title>
|
|
|
|
<para>
|
2002-04-07 23:32:16 +00:00
|
|
|
All GStreamer Objects can be extended using the GObject inheritance methods.
|
2000-08-16 21:38:57 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
All plugins are loaded dynamically and can be extended and upgraded
|
|
|
|
independently.
|
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2004-01-28 15:08:17 +00:00
|
|
|
<sect2 id="section-goals-binary">
|
2000-08-16 21:38:57 +00:00
|
|
|
<title>Allow binary only plugins</title>
|
2002-04-07 23:32:16 +00:00
|
|
|
<para>
|
|
|
|
Plugins are shared libraries that are loaded at runtime. Since all the properties of the
|
|
|
|
plugin can be set using the GObject properties, there is no need (and in fact no way) to
|
|
|
|
have any header files installed for the plugins.
|
|
|
|
</para>
|
2001-01-04 23:35:50 +00:00
|
|
|
<para>
|
2003-10-09 12:42:49 +00:00
|
|
|
Special care has been taken to make plugins completely selfcontained.
|
2002-09-06 15:53:06 +00:00
|
|
|
All relevant aspects of plugins can be queried at run-time.
|
2001-01-04 23:35:50 +00:00
|
|
|
</para>
|
2000-08-16 21:38:57 +00:00
|
|
|
</sect2>
|
|
|
|
|
2004-01-28 15:08:17 +00:00
|
|
|
<sect2 id="section-goals-performance">
|
2000-08-16 21:38:57 +00:00
|
|
|
<title>High performance</title>
|
|
|
|
<para>
|
|
|
|
High performance is obtained by:
|
|
|
|
</para>
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-10-09 12:42:49 +00:00
|
|
|
using GLib's <function>g_mem_chunk</function> and fast non-blocking allocation algorithms
|
2002-07-24 19:46:42 +00:00
|
|
|
where possible to minimize dynamic memory allocation.
|
2000-08-16 21:38:57 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-10-09 12:42:49 +00:00
|
|
|
extremely light-weight links between plugins. Data can travel
|
2002-07-24 19:46:42 +00:00
|
|
|
the pipeline with minimal overhead. Data passing between plugins only involves
|
|
|
|
a pointer dereference in a typical pipeline.
|
2000-08-16 21:38:57 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-10-09 12:42:49 +00:00
|
|
|
providing a mechanism to directly work on the target memory. A plugin can for example
|
2002-04-07 23:32:16 +00:00
|
|
|
directly write to the X server's shared memory space. Buffers can also point to
|
|
|
|
arbitrary memory, such as a sound card's internal hardware buffer.
|
2000-08-16 21:38:57 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-10-09 12:42:49 +00:00
|
|
|
refcounting and copy on write minimize usage of memcpy.
|
2002-04-07 23:32:16 +00:00
|
|
|
Sub-buffers efficiently split buffers into manageable pieces.
|
2000-08-16 21:38:57 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-10-09 12:42:49 +00:00
|
|
|
the use of cothreads to minimize the threading overhead. Cothreads are a simple and fast
|
2002-07-24 19:46:42 +00:00
|
|
|
user-space method for switching between subtasks. Cothreads were measured to
|
|
|
|
consume as little as 600 cpu cycles.
|
2000-08-16 21:38:57 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-10-09 12:42:49 +00:00
|
|
|
allowing hardware acceleration by using specialized plugins.
|
2000-08-16 21:38:57 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
2001-01-04 23:35:50 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-10-09 12:42:49 +00:00
|
|
|
using a plugin registry with the specifications of the plugins so
|
2001-01-04 23:35:50 +00:00
|
|
|
that the plugin loading can be delayed until the plugin is actually
|
|
|
|
used.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
2002-07-24 19:46:42 +00:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2003-10-09 12:42:49 +00:00
|
|
|
all critical data passing is free of locks and mutexes.
|
2002-07-24 19:46:42 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
2000-08-16 21:38:57 +00:00
|
|
|
</itemizedlist>
|
|
|
|
</sect2>
|
2002-07-24 19:46:42 +00:00
|
|
|
|
2004-01-28 15:08:17 +00:00
|
|
|
<sect2 id="section-goals-separation">
|
2003-10-09 12:42:49 +00:00
|
|
|
<title>Clean core/plugins separation</title>
|
|
|
|
<para>
|
|
|
|
The core of GStreamer is essentially media-agnostic. It only knows
|
|
|
|
about bytes and blocks, and only contains basic elements.
|
|
|
|
The core of GStreamer is functional enough to even implement low-level
|
|
|
|
system tools, like cp.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
All of the media handling functionality is provided by plugins external
|
|
|
|
to the core. These tell the core how to handle specific types of media.
|
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2004-01-28 15:08:17 +00:00
|
|
|
<sect2 id="section-goals-testbed">
|
2002-07-24 19:46:42 +00:00
|
|
|
<title>Provide a framework for codec experimentation</title>
|
|
|
|
<para>
|
2002-09-06 15:53:06 +00:00
|
|
|
GStreamer also wants to be an easy framework where codec
|
|
|
|
developers can experiment with different algorithms, speeding up
|
|
|
|
the development of open and free multimedia codecs like <ulink
|
|
|
|
url="http://www.xiph.org/ogg/index.html" type="http">tarkin and
|
|
|
|
vorbis</ulink>.
|
2002-07-24 19:46:42 +00:00
|
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
2000-08-16 21:38:57 +00:00
|
|
|
</sect1>
|
|
|
|
</chapter>
|