# Playback tutorial 7: Custom playbin sinks # Goal `playbin` can be further customized by manually selecting its audio and video sinks. This allows applications to rely on `playbin` to retrieve and decode the media and then manage the final render/display themselves. This tutorial shows: - How to replace the sinks selected by `playbin`. - How to use a complex pipeline as a sink. # Introduction Two properties of `playbin` allow selecting the desired audio and video sinks: `audio-sink` and `video-sink` (respectively). The application only needs to instantiate the appropriate `GstElement` and pass it to `playbin` through these properties. This method, though, only allows using a single Element as sink. If a more complex pipeline is required, for example, an equalizer plus an audio sink, it needs to be wrapped in a Bin, so it looks to `playbin` as if it was a single Element. A Bin (`GstBin`) is a container that encapsulates partial pipelines so they can be managed as single elements. As an example, the `GstPipeline` we have been using in all tutorials is a type of `GstBin`, which does not interact with external Elements. Elements inside a Bin connect to external elements through Ghost Pads (`GstGhostPad`), this is, Pads on the surface of the Bin which simply forward data from an external Pad to a given Pad on an internal Element. ![](attachments/1441842/2424880.png) **Figure 1:** A Bin with two Elements and one Ghost Pad. `GstBin`s are also a type of `GstElement`, so they can be used wherever an Element is required, in particular, as sinks for `playbin` (and they are then known as **sink-bins**). # An equalized player Copy this code into a text file named `playback-tutorial-7.c`.
This tutorial is included in the SDK since release 2012.7. If you cannot find it in the downloaded code, please install the latest release of the GStreamer SDK. |