GStreamer Application Development Manual (0.10.12) | ||
---|---|---|
<<< Previous | Next >>> |
A bin is a container element. You can add elements to a bin. Since a bin is an element itself, a bin can be handled in the same way as any other element. Therefore, the whole previous chapter (Elements) applies to bins as well.
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.
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. You will learn more about this process, called scheduling, in the Section called Scheduling in GStreamer in the chapter called Threads.
There is one specialized type of bin available to the GStreamer programmer:
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. Pipelines will automatically run themselves in a background thread when started.
<<< Previous | Home | Next >>> |
Element States | Up | Creating a bin |