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 Section 16.2.
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.