1 <chapter id="cha-goals">
4 GStreamer was designed to provide a solution to the current Linux media
8 <sect1 id="sec-goals-design">
9 <title>The design goals</title>
11 We describe what we try to achieve with GStreamer.
13 <sect2 id="sec-goals-clean">
14 <title>Clean and powerful</title>
16 GStreamer wants to provide a clean interface to:
21 The application programmer who wants to build a media pipeline.
22 The programmer can use an extensive set of powerful tools to create
23 media pipelines without writing a single line of code. Performing
24 complex media manipulations becomes very easy.
29 The plugin programmer. Plugin programmers are provided a clean and
30 simple API to create self contained plugins. An extensive debugging
31 and tracing mechanism has been integrated. GStreamer also comes with
32 an extensive set of real-life plugins that serve as an example too.
38 <sect2 id="sec-goals-object">
39 <title>Object oriented</title>
41 Adhere to the GLib 2.0 object model. A programmer familiar with GLib 2.0 or older versions
42 of Gtk+ will be comfortable with GStreamer.
45 GStreamer uses the mechanism of signals and object properties.
48 All objects can be queried at runtime for their various properties and
53 <sect2 id="sec-goals-extensible">
54 <title>Extensible</title>
56 All GStreamer Objects can be extended using the GObject inheritance methods.
59 All plugins are loaded dynamically and can be extended and upgraded
64 <sect2 id="sec-goals-binary">
65 <title>Allow binary only plugins</title>
67 Plugins are shared libraries that are loaded at runtime. Since all the properties of the
68 plugin can be set using the GObject properties, there is no need (and in fact no way) to
69 have any header files installed for the plugins.
72 Special care has been taken to make plugins completely self contained.
73 All relevant aspects of plugins can be queried at run-time.
77 <sect2 id="sec-goals-performance">
78 <title>High performance</title>
80 High performance is obtained by:
85 Using GLib g_mem_chunk and fast non-blocking allocation algorithms
86 where possible to minimize dynamic memory allocation.
91 Extremely light-weight links between plugins. Data can travel
92 the pipeline with minimal overhead. Data passing between plugins only involves
93 a pointer dereference in a typical pipeline.
98 Providing a mechanism to directly work on the target memory. A plugin can for example
99 directly write to the X server's shared memory space. Buffers can also point to
100 arbitrary memory, such as a sound card's internal hardware buffer.
105 Refcounting and copy on write minimize usage of memcpy(3).
106 Sub-buffers efficiently split buffers into manageable pieces.
111 The use of cothreads to minimize the threading overhead. Cothreads are a simple and fast
112 user-space method for switching between subtasks. Cothreads were measured to
113 consume as little as 600 cpu cycles.
118 Allowing hardware acceleration by the use of specialized plugins.
123 Using a plugin registry with the specifications of the plugins so
124 that the plugin loading can be delayed until the plugin is actually
130 All critical data passing is free of locks and mutexes.
136 <sect2 id="sec-goals-testbed">
137 <title>Provide a framework for codec experimentation</title>
139 GStreamer also wants to be an easy framework where codec
140 developers can experiment with different algorithms, speeding up
141 the development of open and free multimedia codecs like <ulink
142 url="http://www.xiph.org/ogg/index.html" type="http">tarkin and