GstInsertbin

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

Synopsis

struct              GstInsertBin;
struct              GstInsertBinClass;
void                (*GstInsertBinCallback)             (GstInsertBin *insertbin,
                                                         GstElement *element,
                                                         gboolean success,
                                                         gpointer user_data);
GstElement *        gst_insert_bin_new                  (const gchar *name);
void                gst_insert_bin_append               (GstInsertBin *self,
                                                         GstElement *element,
                                                         GstInsertBinCallback callback,
                                                         gpointer user_data);
void                gst_insert_bin_prepend              (GstInsertBin *self,
                                                         GstElement *element,
                                                         GstInsertBinCallback callback,
                                                         gpointer user_data);
void                gst_insert_bin_insert_after         (GstInsertBin *self,
                                                         GstElement *element,
                                                         GstElement *sibling,
                                                         GstInsertBinCallback callback,
                                                         gpointer user_data);
void                gst_insert_bin_insert_before        (GstInsertBin *self,
                                                         GstElement *element,
                                                         GstElement *sibling,
                                                         GstInsertBinCallback callback,
                                                         gpointer user_data);
void                gst_insert_bin_remove               (GstInsertBin *self,
                                                         GstElement *element,
                                                         GstInsertBinCallback callback,
                                                         gpointer user_data);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GstObject
               +----GstElement
                     +----GstBin
                           +----GstInsertBin

Implemented Interfaces

GstInsertBin implements GstChildProxy.

Signals

  "append"                                         : Action
  "insert-after"                                   : Action
  "insert-before"                                  : Action
  "prepend"                                        : Action
  "remove"                                         : Action

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().

Details

struct GstInsertBin

struct GstInsertBin;

The object structure.


struct GstInsertBinClass

struct GstInsertBinClass {
  GstBinClass parent_class;
};

The object class structure.


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.

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

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.

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.

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.

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.

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.

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

Signal Details

The "append" signal

void                user_function                      (GstInsertBin *element,
                                                        GstElement   *callback,
                                                        gpointer      user_data,
                                                        gpointer      arg3,
                                                        gpointer      user_data)      : Action

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

Same as gst_insert_bin_append()

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_data :

user data set when the signal handler was connected.

The "insert-after" signal

void                user_function                      (GstInsertBin *element,
                                                        GstElement   *sibling,
                                                        GstElement   *callback,
                                                        gpointer      user_data,
                                                        gpointer      arg4,
                                                        gpointer      user_data)      : Action

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()

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_data :

user data set when the signal handler was connected.

The "insert-before" signal

void                user_function                      (GstInsertBin *element,
                                                        GstElement   *sibling,
                                                        GstElement   *callback,
                                                        gpointer      user_data,
                                                        gpointer      arg4,
                                                        gpointer      user_data)      : Action

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

Same as gst_insert_bin_insert_before()

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_data :

user data set when the signal handler was connected.

The "prepend" signal

void                user_function                      (GstInsertBin *element,
                                                        GstElement   *callback,
                                                        gpointer      user_data,
                                                        gpointer      arg3,
                                                        gpointer      user_data)      : Action

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

Same as gst_insert_bin_prepend()

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_data :

user data set when the signal handler was connected.

The "remove" signal

void                user_function                      (GstInsertBin *element,
                                                        GstElement   *callback,
                                                        gpointer      user_data,
                                                        gpointer      arg3,
                                                        gpointer      user_data)      : Action

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

Same as gst_insert_bin_remove()

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_data :

user data set when the signal handler was connected.