mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
e978887fca
Original commit message from CVS: fix manual id's
49 lines
1.8 KiB
XML
49 lines
1.8 KiB
XML
<chapter id="chapter-bins">
|
|
<title>Bins</title>
|
|
<para>
|
|
A bin is a container element. You can add elements to a bin. Since a bin is
|
|
an element itself, it can also be added to another bin.
|
|
</para>
|
|
<para>
|
|
Bins allow you to combine a group of linked elements into one logical element. You do
|
|
not deal with the individual elements anymore but with just one element, the bin.
|
|
We will see that this is extremely powerful when you are going to construct
|
|
complex pipelines since it allows you to break up the pipeline in smaller chunks.
|
|
</para>
|
|
<para>
|
|
The bin will also manage the elements contained in it. It will figure out how
|
|
the data will flow in the bin and generate an optimal plan for that data flow. Plan
|
|
generation is one of the most complicated procedures in GStreamer.
|
|
</para>
|
|
|
|
<figure float="1" id="section-bin-img">
|
|
<title>Visualisation of a bin with some elements in it</title>
|
|
<mediaobject>
|
|
<imageobject>
|
|
<imagedata fileref="images/bin-element.ℑ" format="&IMAGE;" />
|
|
</imageobject>
|
|
</mediaobject>
|
|
</figure>
|
|
|
|
<para>
|
|
There are two specialized bins available to the GStreamer programmer:
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
a pipeline: a generic container that allows scheduling of the
|
|
containing elements. The toplevel bin has to be a pipeline.
|
|
Every application thus needs at least one of these.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
a thread: a bin that will be run in a separate execution thread.
|
|
You will have to use this bin if you have to carefully
|
|
synchronize audio and video, or for buffering. You will learn
|
|
more about threads in <xref linkend="chapter-threads"/>.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</chapter>
|