decodebin2

decodebin2 — Next-generation automatic decoding bin

Synopsis




typedef             GstDecodeBin2;

Properties


  "caps"                     GstCaps               : Read / Write

Signals


  "autoplug-continue"                              : Run Last
  "autoplug-sort"                                  : Run Last
  "new-decoded-pad"                                : Run Last
  "removed-decoded-pad"                            : Run Last
  "unknown-type"                                   : Run Last

Description

GstBin that auto-magically constructs a decoding pipeline using available decoders and demuxers via auto-plugging.

At this stage, decodebin2 is considered UNSTABLE. The API provided in the signals is expected to change in the near future.

To try out decodebin2, you can set the USE_DECODEBIN2 environment variable (USE_DECODEBIN2=1 for example). This will cause playbin to use decodebin2 instead of the older decodebin for its internal auto-plugging.

Element Information

plugin decodebin2
author Edward Hervey <edward@fluendo.com>
class Generic/Bin/Decoder

Element Pads

name sink
direction sink
presence always
details ANY
name src%d
direction source
presence sometimes
details ANY

Details

GstDecodeBin2

typedef struct _GstDecodeBin GstDecodeBin2;

The opaque DecodeBin2 data structure

Property Details

The "caps" property

  "caps"                     GstCaps               : Read / Write

The caps on which to stop decoding.

Signal Details

The "autoplug-continue" signal

gboolean            user_function                      (GstDecodeBin2 *pad,
                                                        GstCaps       *caps,
                                                        gpointer       user_data)      : Run Last

This signal is emitted whenever decodebin2 finds a new stream. It is emitted before looking for any elements that can handle that stream.

pad : The GstPad.
caps : The GstCaps found.
user_data : user data set when the signal handler was connected.
Returns : TRUE if you wish decodebin2 to look for elements that can handle the given caps. If FALSE, those caps will be considered as final and the pad will be exposed as such (see 'new-decoded-pad' signal).

The "autoplug-sort" signal

gboolean            user_function                      (GstDecodeBin2 *gstdecodebin2,
                                                        GstCaps       *arg1,
                                                        gpointer       arg2,
                                                        gpointer       user_data)          : Run Last

gstdecodebin2 : the object which received the signal.
arg1 :
arg2 :
user_data : user data set when the signal handler was connected.
Returns :

The "new-decoded-pad" signal

void                user_function                      (GstDecodeBin2 *pad,
                                                        GstPad        *islast,
                                                        gboolean       arg2,
                                                        gpointer       user_data)      : Run Last

This signal gets emitted as soon as a new pad of the same type as one of the valid 'raw' types is added.

pad : the newly created pad
islast : TRUE if this is the last pad to be added. Deprecated.
user_data : user data set when the signal handler was connected.

The "removed-decoded-pad" signal

void                user_function                      (GstDecodeBin2 *pad,
                                                        GstPad        *arg1,
                                                        gpointer       user_data)      : Run Last

This signal is emitted when a 'final' caps pad has been removed.

pad : the pad that was removed
user_data : user data set when the signal handler was connected.

The "unknown-type" signal

void                user_function                      (GstDecodeBin2 *pad,
                                                        GstPad        *caps,
                                                        GstCaps       *arg2,
                                                        gpointer       user_data)      : Run Last

This signal is emitted when a pad for which there is no further possible decoding is added to the decodebin.

pad : the new pad containing caps that cannot be resolved to a 'final' stream type.
caps : the GstCaps of the pad that cannot be resolved.
user_data : user data set when the signal handler was connected.