# decodebin3

GstBin that auto-magically constructs a decoding pipeline using available decoders and demuxers via auto-plugging. The output is raw audio, video or subtitle streams.

decodebin3 differs from the previous decodebin (decodebin2) in important ways:

- supports publication and selection of stream information via GstStreamCollection messages and GST_EVENT_SELECT_STREAMS events.

- dynamically switches stream connections internally, and reuses decoder elements when stream selections change, so that in the normal case it maintains 1 decoder of each type (video/audio/subtitle) and only creates new elements when streams change and an existing decoder is not capable of handling the new format.

- supports multiple input pads for the parallel decoding of auxiliary streams not muxed with the primary stream.

- does not handle network stream buffering. decodebin3 expects that network stream buffering is handled upstream, before data is passed to it.

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstBin
                        ╰──decodebin3

## Implemented interfaces

    GstChildProxy

## Factory details

Authors: – Edward Hervey

Classification: – `Generic/Bin/Decoder`

Rank – none

Plugin – playback

Package – GStreamer Base Plug-ins

## Pad Templates

### `audio_%u`

    ANY

Presence – sometimes

Direction – src

Object type – GstPad

### `metadata_%u`

Pad template for metadata source pads.

    ANY

Presence – sometimes

Direction – src

Object type – GstPad

Since : 1.28

### `sink`

    ANY

Presence – always

Direction – sink

Object type – GstPad

### `sink_%u`

    ANY

Presence – request

Direction – sink

Object type – GstPad

### `src_%u`

    ANY

Presence – sometimes

Direction – src

Object type – GstPad

### `text_%u`

    ANY

Presence – sometimes

Direction – src

Object type – GstPad

### `video_%u`

    ANY

Presence – sometimes

Direction – src

Object type – GstPad

## Signals

### about-to-finish

    about_to_finish_callback (GstElement * param_0,
                              gpointer udata)

    def about_to_finish_callback (param_0, udata):
        #python callback for the 'about-to-finish' signal

    function about_to_finish_callback(param_0: GstElement * param_0, udata: gpointer udata): {
        // javascript callback for the 'about-to-finish' signal
    }

This signal is emitted when the data for the selected URI is entirely buffered and it is safe to specify another URI.

Parameters:

`param_0` –
No description available
`udata` –
No description available

Flags: Run Last

### select-stream

    gint
    select_stream_callback (GstElement * decodebin,
                            GstStreamCollection * collection,
                            GstStream * stream,
                            gpointer udata)

    def select_stream_callback (decodebin, collection, stream, udata):
        #python callback for the 'select-stream' signal

    function select_stream_callback(decodebin: GstElement * decodebin, collection: GstStreamCollection * collection, stream: GstStream * stream, udata: gpointer udata): {
        // javascript callback for the 'select-stream' signal
    }

This signal is emitted whenever decodebin needs to decide whether to expose a stream of a given collection.

Note that the prefered way to select streams is to listen to GST_MESSAGE_STREAM_COLLECTION on the bus and send a GST_EVENT_SELECT_STREAMS with the streams the user wants.

Parameters:

`decodebin` –

a decodebin3

`collection` –

a GstStreamCollection

`stream` –

a GstStream

`udata` –
No description available
Returns (gint) –

1 if the stream should be selected, 0 if it shouldn't be selected. A value of -1 (default) lets decodebin decide what to do with the stream.

Flags: Run Last

## Properties

### caps

    “caps” GstCaps *

The caps on which to stop decoding. (NULL = default)

Flags : Read / Write

Default value :

    video/x-raw(ANY); audio/x-raw(ANY); text/x-raw(ANY); subpicture/x-dvd; subpicture/x-dvb; subpicture/x-xsub; subpicture/x-pgs; closedcaption/x-cea-608; closedcaption/x-cea-708; application/x-onvif-metadata; meta/x-klv; meta/x-id3; meta/x-st-2038

The results of the search are