## GstInsertbin GstInsertbin — A GstBin to insertally link filter-like elements. |

## Functions

void | (*GstInsertBinCallback) ()
GstElement * | gst_insert_bin_new ()
void | gst_insert_bin_append ()
void | gst_insert_bin_prepend ()
void | gst_insert_bin_insert_after ()
void | gst_insert_bin_insert_before ()
void | gst_insert_bin_remove ()

## Signals

void | append | Action
void | insert-after | Action
void | insert-before | Action
void | prepend | Action
void | remove | Action

## Types and Values

struct | GstInsertBin
struct | GstInsertBinClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBin
                        ╰── GstInsertBin

## Implemented Interfaces

GstInsertBin implements GstChildProxy.

## Description

This element is a GstBin that has a single source and sink pad. It allows the user (the application) to easily add and remove filter-like element (that has a single source and sink pad), to the pipeline while it is running. It features a fully asynchronous API inspired by GLib's GAsyncResult based APIs.

Each operation (addition or removal) can take a callback, this callback is guaranteed to be called. Unlike GIO, there is no guarantee about where this callback will be called from, it could be called before the action returns or it could be called later from another thread. The signature of this callback `GstInsertBinCallback()`.

## Functions

### GstInsertBinCallback ()

    void
    (*GstInsertBinCallback) (GstInsertBin *insertbin,
                             GstElement *element,
                             gboolean success,
                             gpointer user_data);

This is the prototype of callbacks to be called when the operation completes. It could be called at any time, including as a re-entrant call while the operation is requested.

#### Parameters

insertbin | A GstInsertBin |
element | The GstElement on which the operation was performed |
success | `TRUE` if the operation was successful |
user_data | The user data passed |

### gst_insert_bin_new ()

    GstElement *
    gst_insert_bin_new (const gchar *name);

Creates a new GstInsertBin

#### Parameters

name | The name of the new GstInsertBin element (or `NULL`). | [allow-none]

#### Returns

The new GstInsertBin

Since: 1.2

### gst_insert_bin_append ()

    void
    gst_insert_bin_append (GstInsertBin *self,
                           GstElement *element,
                           GstInsertBinCallback callback,
                           gpointer user_data);

This action signal adds the filter like element after any other element in the bin.

Same as the “append” signal.

#### Parameters

element | the GstElement to add |
callback | the callback to call when the element has been added or not, or `NULL`. | [scope async]
user_data | The data to pass to the callback |

Since: 1.2

### gst_insert_bin_prepend ()

    void
    gst_insert_bin_prepend (GstInsertBin *self,
                            GstElement *element,
                            GstInsertBinCallback callback,
                            gpointer user_data);

This action signal adds the filter like element before any other element in the bin.

Same as the “prepend” signal.

#### Parameters

element | the GstElement to add |
callback | the callback to call when the element has been added or not, or `NULL`. | [scope async]
user_data | The data to pass to the callback |

Since: 1.2

### gst_insert_bin_insert_after ()

    void
    gst_insert_bin_insert_after (GstInsertBin *self,
                                 GstElement *element,
                                 GstElement *sibling,
                                 GstInsertBinCallback callback,
                                 gpointer user_data);

This action signal adds the filter like element after the `sibling` element in the bin.

Same as the “insert-after” signal.

#### Parameters

element | the GstElement to add |
sibling | the GstElement to add `element` after |
callback | the callback to call when the element has been added or not, or `NULL`. | [scope async]
user_data | The data to pass to the callback |

Since: 1.2

### gst_insert_bin_insert_before ()

    void
    gst_insert_bin_insert_before (GstInsertBin *self,
                                  GstElement *element,
                                  GstElement *sibling,
                                  GstInsertBinCallback callback,
                                  gpointer user_data);

This action signal adds the filter like element before the `sibling` element in the bin.

Same as the “insert-before” signal.

#### Parameters

element | the GstElement to add |
sibling | the GstElement to add `element` before |
callback | the callback to call when the element has been added or not, or `NULL`. | [scope async]
user_data | The data to pass to the callback |

Since: 1.2

### gst_insert_bin_remove ()

    void
    gst_insert_bin_remove (GstInsertBin *self,
                           GstElement *element,
                           GstInsertBinCallback callback,
                           gpointer user_data);

This action signal removed the filter like element from the bin.

Same as the “remove” signal.

#### Parameters

element | the GstElement to remove |
callback | the callback to call when the element has been removed or not, or `NULL`. | [scope async]
user_data | The data to pass to the callback |

Since: 1.2

## Types and Values

### struct GstInsertBin

    struct GstInsertBin;

The object structure.

### struct GstInsertBinClass

    struct GstInsertBinClass {
      GstBinClass parent_class;
    };

The object class structure.

## Signal Details

### The `“append”` signal

    void
    user_function (GstInsertBin *element,
                   GstElement   *callback,
                   gpointer      user_data,
                   gpointer      user_data2,
                   gpointer      user_data)

This action signal adds the filter like element after any other element in the bin.

Same as `gst_insert_bin_append()`

#### Parameters

element | the GstElement to add |
callback | the callback to call when the element has been added or not, or `NULL` |
user_data | The data to pass to the callback |
user_data2 | The user data of the signal (ignored) |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“insert-after”` signal

    void
    user_function (GstInsertBin *element,
                   GstElement   *sibling,
                   GstElement   *callback,
                   gpointer      user_data,
                   gpointer      user_data2,
                   gpointer      user_data)

This action signal adds the filter like element after the `sibling` element in the bin. element in the bin.

Same as `gst_insert_bin_insert_after()`

#### Parameters

element | the GstElement to add |
sibling | the GstElement to add `element` after |
callback | the callback to call when the element has been added or not, or `NULL` |
user_data | The data to pass to the callback |
user_data2 | The user data of the signal (ignored) |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“insert-before”` signal

    void
    user_function (GstInsertBin *element,
                   GstElement   *sibling,
                   GstElement   *callback,
                   gpointer      user_data,
                   gpointer      user_data2,
                   gpointer      user_data)

This action signal adds the filter like element before the `sibling` element in the bin.

Same as `gst_insert_bin_insert_before()`

#### Parameters

element | the GstElement to add |
sibling | the GstElement to add `element` before |
callback | the callback to call when the element has been added or not, or `NULL` |
user_data | The data to pass to the callback |
user_data2 | The user data of the signal (ignored) |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“prepend”` signal

    void
    user_function (GstInsertBin *element,
                   GstElement   *callback,
                   gpointer      user_data,
                   gpointer      user_data2,
                   gpointer      user_data)

This action signal adds the filter like element before any other element in the bin.

Same as `gst_insert_bin_prepend()`

#### Parameters

element | the GstElement to add |
callback | the callback to call when the element has been added or not, or `NULL` |
user_data | The data to pass to the callback |
user_data2 | The user data of the signal (ignored) |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“remove”` signal

    void
    user_function (GstInsertBin *element,
                   GstElement   *callback,
                   gpointer      user_data,
                   gpointer      user_data2,
                   gpointer      user_data)

This action signal removed the filter like element from the bin.

Same as `gst_insert_bin_remove()`

#### Parameters

element | the GstElement to remove |
callback | the callback to call when the element has been removed or not, or `NULL` |
user_data | The data to pass to the callback |
user_data2 | The user data of the signal (ignored) |
user_data | user data set when the signal handler was connected. |

Flags: Action