GstBin

Name

GstBin -- Base container element

Synopsis


#include <gst/gst.h>


enum        GstBinFlags;
struct      GstBin;
GstElement* gst_bin_new                     (const gchar *name);
#define     gst_bin_destroy                 (bin)
void        gst_bin_add                     (GstBin *bin,
                                             GstElement *element);
void        gst_bin_remove                  (GstBin *bin,
                                             GstElement *element);
GstElement* gst_bin_get_by_name             (GstBin *bin,
                                             const gchar *name);
GList*      gst_bin_get_list                (GstBin *bin);
gboolean    gst_bin_set_state_type          (GstBin *bin,
                                             GstElementState state,
                                             GtkType type);
void        gst_bin_iterate                 (GstBin *bin);
void        gst_bin_create_plan             (GstBin *bin);
void        gst_bin_schedule                (GstBin *bin);

Object Hierarchy


  GtkObject
   +----GstObject
         +----GstElement
               +----GstBin

Description

GstBin is the simplest of the container elements, allowing elements to become children of itself. Pads from the child elements can be ghosted to the bin, making the bin itself look transparently like any other element, allowing for deep nesting of predefined sub-pipelines.

Details

enum GstBinFlags

typedef enum {
  /* this bin is a manager of child elements, i.e. a pipeline or thread */
  GST_BIN_FLAG_MANAGER		= GST_ELEMENT_FLAG_LAST,

  /* we prefer to have cothreads when its an option, over chain-based */
  GST_BIN_FLAG_PREFER_COTHREADS,

  /* padding */
  GST_BIN_FLAG_LAST		= GST_ELEMENT_FLAG_LAST + 4,
} GstBinFlags;

Flags for a bin.


struct GstBin

struct GstBin;


gst_bin_new ()

GstElement* gst_bin_new                     (const gchar *name);

Create a new bin with given name.

name : name of new bin
Returns : new bin


gst_bin_destroy()

#define 	gst_bin_destroy(bin) 		gst_object_destroy(GST_OBJECT(bin))

bin : 


gst_bin_add ()

void        gst_bin_add                     (GstBin *bin,
                                             GstElement *element);

Add the given element to the bin. Set the elements parent, and thus add a reference.

bin : GstBin to add element to
element : GstElement to add to bin


gst_bin_remove ()

void        gst_bin_remove                  (GstBin *bin,
                                             GstElement *element);

Remove the element from its associated bin, unparenting as well.

bin : GstBin to remove element from
element : GstElement to remove


gst_bin_get_by_name ()

GstElement* gst_bin_get_by_name             (GstBin *bin,
                                             const gchar *name);

Get the element with the given name from this bin.

bin : Gstbin to search
name : the element name to search for
Returns : the element with the given name


gst_bin_get_list ()

GList*      gst_bin_get_list                (GstBin *bin);

Get the list of elements in this bin.

bin : Gstbin to get the list from
Returns : a GList of elements


gst_bin_set_state_type ()

gboolean    gst_bin_set_state_type          (GstBin *bin,
                                             GstElementState state,
                                             GtkType type);

Sets the state of only those objects of the given type.

bin : GstBin to set the state
state : the new state to set the elements to
type : the type of elements to change
Returns : indication if the state change was successfull


gst_bin_iterate ()

void        gst_bin_iterate                 (GstBin *bin);

Iterates over the elements in this bin.

bin : Gstbin to iterate


gst_bin_create_plan ()

void        gst_bin_create_plan             (GstBin *bin);

Let the bin figure out how to handle its children.

bin : GstBin to create the plan for


gst_bin_schedule ()

void        gst_bin_schedule                (GstBin *bin);

Let the bin figure out how to handle its children.

bin : GstBin to schedule