## uridecodebin uridecodebin — Autoplug and decode an URI to raw media |

## Synopsis

    struct              GstURIDecodeBin;
    enum                GstAutoplugSelectResult;

## Object Hierarchy

      GObject
       +----GstObject
             +----GstElement
                   +----GstBin
                         +----GstURIDecodeBin

## Implemented Interfaces

GstURIDecodeBin implements GstChildProxy.

## Properties

      "uri"                      gchar*                : Read / Write
      "connection-speed"         guint                 : Read / Write
      "caps"                     GstCaps*              : Read / Write
      "subtitle-encoding"        gchar*                : Read / Write
      "source"                   GstElement*           : Read
      "buffer-duration"          gint64                : Read / Write
      "buffer-size"              gint                  : Read / Write
      "download"                 gboolean              : Read / Write

## Signals

      "autoplug-continue"                              : Run Last
      "autoplug-factories"                             : Run Last
      "autoplug-select"                                : Run Last
      "unknown-type"                                   : Run Last
      "drained"                                        : Run Last

## Description

Decodes data from a URI into raw media. It selects a source element that can handle the given "uri" scheme and connects it to a decodebin2.

## Synopsis

### Element Information

plugin | uridecodebin
author | Wim Taymans <wim.taymans@gmail.com>
class | Generic/Bin/Decoder

### Element Pads

name | src%d
direction | source
presence | sometimes
details | ANY

## Synopsis

### Element Information

plugin | uridecodebin
author | Wim Taymans <wim.taymans@gmail.com>
class | Generic/Bin/Decoder

### Element Pads

name | src%d
direction | source
presence | sometimes
details | ANY

## Details

### struct GstURIDecodeBin

    struct GstURIDecodeBin;

uridecodebin element struct

### enum GstAutoplugSelectResult

    typedef enum {
      GST_AUTOPLUG_SELECT_TRY,
      GST_AUTOPLUG_SELECT_EXPOSE,
      GST_AUTOPLUG_SELECT_SKIP
    } GstAutoplugSelectResult;

return values for the autoplug-select signal.

`GST_AUTOPLUG_SELECT_TRY` | try to autoplug the current factory
`GST_AUTOPLUG_SELECT_EXPOSE` | expose the pad as a raw stream
`GST_AUTOPLUG_SELECT_SKIP` | skip the current factory

## Property Details

### The `"uri"` property

      "uri"                      gchar*                : Read / Write

URI to decode.

Default value: NULL

### The `"connection-speed"` property

      "connection-speed"         guint                 : Read / Write

Network connection speed in kbps (0 = unknown).

Allowed values: <= 4294967

Default value: 0

### The `"caps"` property

      "caps"                     GstCaps*              : Read / Write

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

### The `"subtitle-encoding"` property

      "subtitle-encoding"        gchar*                : Read / Write

Encoding to assume if input subtitles are not in UTF-8 encoding. If not set, the GST_SUBTITLE_ENCODING environment variable will be checked for an encoding to use. If that is not set either, ISO-8859-15 will be assumed.

Default value: NULL

### The `"source"` property

      "source"                   GstElement*           : Read

Source object used.

### The `"buffer-duration"` property

      "buffer-duration"          gint64                : Read / Write

Buffer duration when buffering network streams (-1 queue2 default value).

Allowed values: >= -1

Default value: -1

### The `"buffer-size"` property

      "buffer-size"              gint                  : Read / Write

Buffer size when buffering network streams (-1 queue2 default value).

Allowed values: >= -1

Default value: -1

### The `"download"` property

      "download"                 gboolean              : Read / Write

Attempt download buffering when buffering network streams.

Default value: FALSE

## Signal Details

### The `"autoplug-continue"` signal

    gboolean            user_function                      (GstURIDecodeBin *bin,
                                                            GstPad          *pad,
                                                            GstCaps         *caps,
                                                            gpointer         user_data)      : Run Last

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

`bin` : | The uridecodebin
`pad` : | The GstPad.
`caps` : | The GstCaps found.
`user_data` : | user data set when the signal handler was connected.
Returns : | TRUE if you wish uridecodebin 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-factories"` signal

    GValueArray*        user_function                      (GstURIDecodeBin *bin,
                                                            GstPad          *pad,
                                                            GstCaps         *caps,
                                                            gpointer         user_data)      : Run Last

This function is emited when an array of possible factories for `caps` on `pad` is needed. Uridecodebin will by default return an array with all compatible factories, sorted by rank.

If this function returns NULL, `pad` will be exposed as a final caps.

If this function returns an empty array, the pad will be considered as having an unhandled type media type.

`bin` : | The decodebin
`pad` : | The GstPad.
`caps` : | The GstCaps found.
`user_data` : | user data set when the signal handler was connected.
Returns : | a GValueArray* with a list of factories to try. The factories are by default tried in the returned order or based on the index returned by "autoplug-select".

### The `"autoplug-select"` signal

    GstAutoplugSelectResultuser_function                      (GstURIDecodeBin   *pad,
                                                            GstPad            *caps,
                                                            GstCaps           *factory,
                                                            GstElementFactory *Returns,
                                                            gpointer           user_data)      : Run Last

This signal is emitted once uridecodebin has found all the possible GstElementFactory that can be used to handle the given `caps`. For each of those factories, this signal is emited.

The signal handler should return a GST_TYPE_AUTOPLUG_SELECT_RESULT enum value indicating what decodebin2 should do next.

A value of GST_AUTOPLUG_SELECT_TRY will try to autoplug an element from `factory`.

A value of GST_AUTOPLUG_SELECT_EXPOSE will expose `pad` without plugging any element to it.

A value of GST_AUTOPLUG_SELECT_SKIP will skip `factory` and move to the next factory.

`pad` : | The GstPad.
`caps` : | The GstCaps.
`factory` : | A GstElementFactory to use
`user_data` : | user data set when the signal handler was connected.
Returns : | a GST_TYPE_AUTOPLUG_SELECT_RESULT that indicates the required operation. The default handler will always return GST_AUTOPLUG_SELECT_TRY.

### The `"unknown-type"` signal

    void                user_function                      (GstURIDecodeBin *bin,
                                                            GstPad          *pad,
                                                            GstCaps         *caps,
                                                            gpointer         user_data)      : Run Last

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

`bin` : | The uridecodebin
`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.

### The `"drained"` signal

    void                user_function                      (GstURIDecodeBin *arg0,
                                                            gpointer         user_data)      : Run Last

This signal is emitted when the data for the current uri is played.

`user_data` : | user data set when the signal handler was connected.