GstElement

Name

GstElement -- Base class for all pipeline elements

Synopsis


#include <gst/gst.h>


struct      GstElement;
#define     gst_element_destroy             (element)
const gchar* gst_element_get_name           (GstElement *element);
void        gst_element_set_name            (GstElement *element,
                                             const gchar *name);
GstElementFactory* gst_element_get_factory  (GstElement *element);
void        gst_element_add_pad             (GstElement *element,
                                             GstPad *pad);
void        gst_element_remove_pad          (GstElement *element,
                                             GstPad *pad);
GstPad*     gst_element_add_ghost_pad       (GstElement *element,
                                             GstPad *pad,
                                             gchar *name);
void        gst_element_remove_ghost_pad    (GstElement *element,
                                             GstPad *pad);
GstPad*     gst_element_get_pad             (GstElement *element,
                                             const gchar *name);
GstPad*     gst_element_get_static_pad      (GstElement *element,
                                             const gchar *name);
GstPad*     gst_element_get_request_pad     (GstElement *element,
                                             const gchar *name);
void        gst_element_release_request_pad (GstElement *element,
                                             GstPad *pad);
GList*      gst_element_get_pad_list        (GstElement *element);
GstPadTemplate* gst_element_get_pad_template
                                            (GstElement *element,
                                             const guchar *name);
GList*      gst_element_get_pad_template_list
                                            (GstElement *element);
void        gst_element_class_add_pad_template
                                            (GstElementClass *klass,
                                             GstPadTemplate *templ);
gboolean    gst_element_connect             (GstElement *src,
                                             GstElement *dest);
gboolean    gst_element_connect_many        (GstElement *element_1,
                                             GstElement *element_2,
                                             ...);
gboolean    gst_element_connect_filtered    (GstElement *src,
                                             GstElement *dest,
                                             GstCaps *filtercaps);
gboolean    gst_element_connect_pads        (GstElement *src,
                                             const gchar *srcpadname,
                                             GstElement *dest,
                                             const gchar *destpadname);
gboolean    gst_element_connect_pads_filtered
                                            (GstElement *src,
                                             const gchar *srcpadname,
                                             GstElement *dest,
                                             const gchar *destpadname,
                                             GstCaps *filtercaps);
void        gst_element_disconnect          (GstElement *src,
                                             GstElement *dest);
void        gst_element_disconnect_many     (GstElement *element_1,
                                             GstElement *element_2,
                                             ...);
void        gst_element_disconnect_pads     (GstElement *src,
                                             const gchar *srcpadname,
                                             GstElement *dest,
                                             const gchar *destpadname);
GstPad*     gst_element_get_compatible_pad  (GstElement *element,
                                             GstPad *pad);
GstPad*     gst_element_get_compatible_pad_filtered
                                            (GstElement *element,
                                             GstPad *pad,
                                             GstCaps *filtercaps);
GstPadTemplate* gst_element_get_compatible_pad_template
                                            (GstElement *element,
                                             GstPadTemplate *compattempl);
gint        gst_element_set_state           (GstElement *element,
                                             GstElementState state);
GstElementState gst_element_get_state       (GstElement *element);
const gchar* gst_element_state_get_name     (GstElementState state);
void        gst_element_wait_state_change   (GstElement *element);
void        gst_element_error               (GstElement *element,
                                             const gchar *error,
                                             ...);
void        gst_element_set_eos             (GstElement *element);
gboolean    gst_element_interrupt           (GstElement *element);
void        gst_element_yield               (GstElement *element);
gboolean    gst_element_release_locks       (GstElement *element);
GstClock*   gst_element_get_clock           (GstElement *element);
void        gst_element_set_clock           (GstElement *element,
                                             GstClock *clock);
GstClockReturn gst_element_clock_wait       (GstElement *element,
                                             GstClock *clock,
                                             GstClockTime time,
                                             GstClockTimeDiff *jitter);
GstClock*   (*GstElementGetClockFunction)   (GstElement *element);
void        (*GstElementSetClockFunction)   (GstElement *element,
                                             GstClock *clock);
void        gst_element_set_loop_function   (GstElement *element,
                                             GstElementLoopFunction loop);
void        (*GstElementLoopFunction)       (GstElement *element);
GstScheduler* gst_element_get_scheduler     (GstElement *element);
void        gst_element_set_scheduler       (GstElement *element,
                                             GstScheduler *sched);
GstObject*  gst_element_get_parent          (GstElement *element);
void        gst_element_set_parent          (GstElement *element,
                                             GstObject *parent);
GstBin*     gst_element_get_managing_bin    (GstElement *element);
void        (*GstElementPostRunFunction)    (GstElement *element);
void        (*GstElementPreRunFunction)     (GstElement *element);
void        gst_element_disable_threadsafe_properties
                                            (GstElement *element);
void        gst_element_enable_threadsafe_properties
                                            (GstElement *element);
void        gst_element_get                 (GstElement *element,
                                             const gchar *first_property_name,
                                             ...);
void        gst_element_get_property        (GstElement *element,
                                             const gchar *property_name,
                                             GValue *value);
void        gst_element_get_valist          (GstElement *element,
                                             const gchar *first_property_name,
                                             va_list var_args);
void        gst_element_set                 (GstElement *element,
                                             const gchar *first_property_name,
                                             ...);
void        gst_element_set_pending_properties
                                            (GstElement *element);
void        gst_element_set_property        (GstElement *element,
                                             const gchar *property_name,
                                             const GValue *value);
void        gst_element_set_valist          (GstElement *element,
                                             const gchar *first_property_name,
                                             va_list var_args);
gboolean    gst_element_query               (GstElement *element,
                                             GstPadQueryType type,
                                             GstFormat *format,
                                             gint64 *value);
gboolean    gst_element_send_event          (GstElement *element,
                                             GstEvent *event);
enum        GstElementState;
enum        GstElementStateReturn;
#define     GST_NUM_STATES
#define     GST_STATE                       (obj)
#define     GST_STATE_PENDING               (obj)
#define     GST_STATE_TRANSITION            (obj)
#define     GST_STATE_NULL_TO_READY
#define     GST_STATE_READY_TO_PAUSED
#define     GST_STATE_PAUSED_TO_READY
#define     GST_STATE_PLAYING_TO_PAUSED
#define     GST_STATE_PAUSED_TO_PLAYING
#define     GST_STATE_READY_TO_NULL
enum        GstElementFlags;
#define     GST_ELEMENT_IS_THREAD_SUGGESTED (obj)
#define     GST_ELEMENT_IS_DECOUPLED        (obj)
#define     GST_ELEMENT_IS_EOS              (obj)
#define     GST_ELEMENT_IS_EVENT_AWARE      (obj)
#define     GST_ELEMENT_PARENT              (obj)
#define     GST_ELEMENT_NAME                (obj)
#define     GST_ELEMENT_PADS                (obj)
#define     GST_ELEMENT_SCHED               (obj)
#define     GST_ELEMENT_MANAGER             (obj)
#define     GST_ELEMENT_CLOCK               (obj)

Object Hierarchy


  GObject
   +----GstObject
         +----GstElement

Signal Prototypes


"deep-notify"
            void        user_function      (GstElement *gstelement,
                                            GObject *arg1,
                                            GParam arg2,
                                            gpointer user_data);
"eos"       void        user_function      (GstElement *gstelement,
                                            gpointer user_data);
"error"     void        user_function      (GstElement *gstelement,
                                            GObject *arg1,
                                            gchar *arg2,
                                            gpointer user_data);
"new-pad"   void        user_function      (GstElement *gstelement,
                                            GObject *arg1,
                                            gpointer user_data);
"pad-removed"
            void        user_function      (GstElement *gstelement,
                                            GObject *arg1,
                                            gpointer user_data);
"state-change"
            void        user_function      (GstElement *gstelement,
                                            gint arg1,
                                            gint arg2,
                                            gpointer user_data);

Description

GstElement is the base class needed to construct an element that can be used in a GStreamer pipeline. As such, it is not a functional entity, and cannot do anything when placed in a pipeline.

The name of a GstElement can be get with gst_element_get_name() and set with gst_element_set_name(). For speed, GST_ELEMENT_NAME() can be used in the core. Do not use this in plug-ins or applications in order to retain ABI compatibility.

All elements have pads (of the type GstPad). These pads connect to pads on other elements. Buffers flow between these connected pads. A GstElement has a GList of GstPad structures for all their input (or sink) and output (or source) pads. Core and plug-in writers can add and remove pads with gst_element_add_pad() and gst_element_remove_pad(). Application writers can manipulate ghost pads (copies of real pads inside a bin) with gst_element_add_ghost_pad() and gst_element_remove_ghost_pad(). A pad of an element can be retrieved by name with gst_element_get_pad(). A GList of all pads can be retrieved with gst_element_get_pad_list().

Elements can be connected through their pads. If the connection is straightforward, use the gst_element_connect() convenience function to connect two elements, or gst_element_connect_many() for more elements in a row. Use gst_element_connect_filtered() to connect two elements constrained by a specified set of GstCaps. For finer control, use gst_element_connect_pads() and gst_element_connect_pads_filtered() to specify the pads to connect on each element by name.

Each element has a state (see GstElementState). You can get and set the state of an element with gst_element_get_state() and gst_element_set_state(). You can wait for an element to change it's state with gst_element_wait_state_change(). To get a string representation of a GstElementState, use gst_element_statename(), which is a really bad name for what it does and should probably be renamed to gst_element_state_get_name if we can be bothered to do that.

You can get and set a GstClock on an element using gst_element_get_clock() and gst_element_set_clock(). You can wait for the clock to reach a given GstClockTime using gst_element_clock_wait().

Details

struct GstElement

struct GstElement;


gst_element_destroy()

#define			gst_element_destroy(element)	gst_object_destroy (GST_OBJECT (element))

Destroys the element (without taking the refcount into account). An application programmer should use gst_object_unref instead to dispose of an element he doesn't need anymore.


gst_element_get_name ()

const gchar* gst_element_get_name           (GstElement *element);

Gets the name of the element.


gst_element_set_name ()

void        gst_element_set_name            (GstElement *element,
                                             const gchar *name);

Sets the name of the element, getting rid of the old name if there was one.


gst_element_get_factory ()

GstElementFactory* gst_element_get_factory  (GstElement *element);

Retrieves the factory that was used to create this element


gst_element_add_pad ()

void        gst_element_add_pad             (GstElement *element,
                                             GstPad *pad);

Add a pad (connection point) to the element, setting the parent of the pad to the element (and thus adding a reference).


gst_element_remove_pad ()

void        gst_element_remove_pad          (GstElement *element,
                                             GstPad *pad);

Remove a pad (connection point) from the element,


gst_element_add_ghost_pad ()

GstPad*     gst_element_add_ghost_pad       (GstElement *element,
                                             GstPad *pad,
                                             gchar *name);

Create a ghost pad from the given pad, and add it to the list of pads for this element.


gst_element_remove_ghost_pad ()

void        gst_element_remove_ghost_pad    (GstElement *element,
                                             GstPad *pad);

removes a ghost pad from an element


gst_element_get_pad ()

GstPad*     gst_element_get_pad             (GstElement *element,
                                             const gchar *name);

Retrieve a pad from the element by name.


gst_element_get_static_pad ()

GstPad*     gst_element_get_static_pad      (GstElement *element,
                                             const gchar *name);

Retrieve a pad from the element by name. This version only retrieves already-existing (i.e. 'static') pads.


gst_element_get_request_pad ()

GstPad*     gst_element_get_request_pad     (GstElement *element,
                                             const gchar *name);

Retrieve a pad from the element by name. This version only retrieves request pads.


gst_element_release_request_pad ()

void        gst_element_release_request_pad (GstElement *element,
                                             GstPad *pad);

Make the element free the previously requested pad as obtained with gst_element_get_request_pad().


gst_element_get_pad_list ()

GList*      gst_element_get_pad_list        (GstElement *element);

Retrieve a list of the pads associated with the element.


gst_element_get_pad_template ()

GstPadTemplate* gst_element_get_pad_template
                                            (GstElement *element,
                                             const guchar *name);

Retrieve a padtemplate from this element with the given name.


gst_element_get_pad_template_list ()

GList*      gst_element_get_pad_template_list
                                            (GstElement *element);

Retrieve a list of the padtemplates associated with the element.


gst_element_class_add_pad_template ()

void        gst_element_class_add_pad_template
                                            (GstElementClass *klass,
                                             GstPadTemplate *templ);

Add a padtemplate to an element class. This is useful if you have derived a custom bin and wish to provide an on-request pad at runtime. Plugin writers should use gst_element_factory_add_pad_template instead.


gst_element_connect ()

gboolean    gst_element_connect             (GstElement *src,
                                             GstElement *dest);

Connect the source to the destination element. The connection must be from source to destination, the other direction will not be tried. The functions looks for existing pads and request pads that aren't connected yet. If multiple connections are possible, only one is established.


gst_element_connect_many ()

gboolean    gst_element_connect_many        (GstElement *element_1,
                                             GstElement *element_2,
                                             ...);

Chain together a series of elements. Uses gst_element_connect.


gst_element_connect_filtered ()

gboolean    gst_element_connect_filtered    (GstElement *src,
                                             GstElement *dest,
                                             GstCaps *filtercaps);

Connect the source to the destination element using the filtercaps. The connection must be from source to destination, the other direction will not be tried. The functions looks for existing pads that aren't connected yet. + It will use request pads if possible. But both pads will not be requested. If multiple connections are possible, only one is established.


gst_element_connect_pads ()

gboolean    gst_element_connect_pads        (GstElement *src,
                                             const gchar *srcpadname,
                                             GstElement *dest,
                                             const gchar *destpadname);

Connect the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the connection fails.


gst_element_connect_pads_filtered ()

gboolean    gst_element_connect_pads_filtered
                                            (GstElement *src,
                                             const gchar *srcpadname,
                                             GstElement *dest,
                                             const gchar *destpadname,
                                             GstCaps *filtercaps);

Connect the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the connection fails.


gst_element_disconnect ()

void        gst_element_disconnect          (GstElement *src,
                                             GstElement *dest);

Disconnect all pads connecting the two elements in the direction src -> dest.


gst_element_disconnect_many ()

void        gst_element_disconnect_many     (GstElement *element_1,
                                             GstElement *element_2,
                                             ...);

Disconnect a series of elements. Uses gst_element_disconnect.


gst_element_disconnect_pads ()

void        gst_element_disconnect_pads     (GstElement *src,
                                             const gchar *srcpadname,
                                             GstElement *dest,
                                             const gchar *destpadname);

Disconnect the two named pads of the source and destination elements.


gst_element_get_compatible_pad ()

GstPad*     gst_element_get_compatible_pad  (GstElement *element,
                                             GstPad *pad);

Looks for an unconnected pad to which the given pad can connect to. It is not guaranteed that connecting the pads will work, though it should work in most cases.


gst_element_get_compatible_pad_filtered ()

GstPad*     gst_element_get_compatible_pad_filtered
                                            (GstElement *element,
                                             GstPad *pad,
                                             GstCaps *filtercaps);

Looks for an unconnected pad to which the given pad can connect to. It is not guaranteed that connecting the pads will work, though it should work in most cases.


gst_element_get_compatible_pad_template ()

GstPadTemplate* gst_element_get_compatible_pad_template
                                            (GstElement *element,
                                             GstPadTemplate *compattempl);

Generate a padtemplate for this element compatible with the given template, ie able to link to it.


gst_element_set_state ()

gint        gst_element_set_state           (GstElement *element,
                                             GstElementState state);

Sets the state of the element. This function will try to set the requested state by going through all the intermediary states and calling the class's state change function for each.


gst_element_get_state ()

GstElementState gst_element_get_state       (GstElement *element);

Gets the state of the element.


gst_element_state_get_name ()

const gchar* gst_element_state_get_name     (GstElementState state);

Gets a string representing the given state.


gst_element_wait_state_change ()

void        gst_element_wait_state_change   (GstElement *element);

Waits and blocks until the element changed its state.


gst_element_error ()

void        gst_element_error               (GstElement *element,
                                             const gchar *error,
                                             ...);

This function is used internally by elements to signal an error condition. It results in the "error" signal.


gst_element_set_eos ()

void        gst_element_set_eos             (GstElement *element);

Perform the actions needed to bring the element in the EOS state.


gst_element_interrupt ()

gboolean    gst_element_interrupt           (GstElement *element);

Request the scheduler of this element to interrupt the execution of this element and scheduler another one.


gst_element_yield ()

void        gst_element_yield               (GstElement *element);

Request a yield operation for the child. The scheduler will typically give control to another element.


gst_element_release_locks ()

gboolean    gst_element_release_locks       (GstElement *element);

Instruct the element to release all the locks it is holding, such as blocking reads, waiting for the clock, ...


gst_element_get_clock ()

GstClock*   gst_element_get_clock           (GstElement *element);

Gets the clock of the element.


gst_element_set_clock ()

void        gst_element_set_clock           (GstElement *element,
                                             GstClock *clock);

Sets the clock for the element.


gst_element_clock_wait ()

GstClockReturn gst_element_clock_wait       (GstElement *element,
                                             GstClock *clock,
                                             GstClockTime time,
                                             GstClockTimeDiff *jitter);

Waits for a specific time on the clock.


GstElementGetClockFunction ()

GstClock*   (*GstElementGetClockFunction)   (GstElement *element);

The function to get the clock from a clock providing element


GstElementSetClockFunction ()

void        (*GstElementSetClockFunction)   (GstElement *element,
                                             GstClock *clock);

The function to set the clock on a clock receiving element.


gst_element_set_loop_function ()

void        gst_element_set_loop_function   (GstElement *element,
                                             GstElementLoopFunction loop);

This sets the loop function for the element. The function pointed to can deviate from the GstElementLoopFunction definition in type of pointer only.

NOTE: in order for this to take effect, the current loop function *must* exit. Assuming the loop function itself is the only one who will cause a new loopfunc to be assigned, this should be no problem.


GstElementLoopFunction ()

void        (*GstElementLoopFunction)       (GstElement *element);

This function type is used to specify a loop function for the element. It is passed the element in question, and is expect to return only in error circumstances.


gst_element_get_scheduler ()

GstScheduler* gst_element_get_scheduler     (GstElement *element);

Returns the scheduler of the element.


gst_element_set_scheduler ()

void        gst_element_set_scheduler       (GstElement *element,
                                             GstScheduler *sched);

Sets the scheduler of the element. For internal use only, unless you're writing a new bin subclass.


gst_element_get_parent ()

GstObject*  gst_element_get_parent          (GstElement *element);

Gets the parent of the element.


gst_element_set_parent ()

void        gst_element_set_parent          (GstElement *element,
                                             GstObject *parent);

Sets the parent of the element.


gst_element_get_managing_bin ()

GstBin*     gst_element_get_managing_bin    (GstElement *element);

Gets the managing bin (a pipeline or a thread, for example) of an element.


GstElementPostRunFunction ()

void        (*GstElementPostRunFunction)    (GstElement *element);


GstElementPreRunFunction ()

void        (*GstElementPreRunFunction)     (GstElement *element);


gst_element_disable_threadsafe_properties ()

void        gst_element_disable_threadsafe_properties
                                            (GstElement *element);


gst_element_enable_threadsafe_properties ()

void        gst_element_enable_threadsafe_properties
                                            (GstElement *element);


gst_element_get ()

void        gst_element_get                 (GstElement *element,
                                             const gchar *first_property_name,
                                             ...);


gst_element_get_property ()

void        gst_element_get_property        (GstElement *element,
                                             const gchar *property_name,
                                             GValue *value);


gst_element_get_valist ()

void        gst_element_get_valist          (GstElement *element,
                                             const gchar *first_property_name,
                                             va_list var_args);


gst_element_set ()

void        gst_element_set                 (GstElement *element,
                                             const gchar *first_property_name,
                                             ...);


gst_element_set_pending_properties ()

void        gst_element_set_pending_properties
                                            (GstElement *element);


gst_element_set_property ()

void        gst_element_set_property        (GstElement *element,
                                             const gchar *property_name,
                                             const GValue *value);


gst_element_set_valist ()

void        gst_element_set_valist          (GstElement *element,
                                             const gchar *first_property_name,
                                             va_list var_args);


gst_element_query ()

gboolean    gst_element_query               (GstElement *element,
                                             GstPadQueryType type,
                                             GstFormat *format,
                                             gint64 *value);

Perform a query on the given element. If the format is set to GST_FORMAT_DEFAULT and this function returns TRUE, the format pointer will hold the default format. For element that don't implement a query handler, this function forwards the query to a random connected sinkpad of this element.


gst_element_send_event ()

gboolean    gst_element_send_event          (GstElement *element,
                                             GstEvent *event);

Sends an event to an element. If the element doesn't implement an event handler, the event will be forwarded to a random sinkpad.


enum GstElementState

typedef enum {
  GST_STATE_VOID_PENDING        = 0,
  GST_STATE_NULL                = (1 << 0),
  GST_STATE_READY               = (1 << 1),
  GST_STATE_PAUSED              = (1 << 2),
  GST_STATE_PLAYING             = (1 << 3)
} GstElementState;

This enum defines the standard states an element may be in. You will normally use gst_element_set_state() to change the state of an element.


enum GstElementStateReturn

typedef enum {
  GST_STATE_FAILURE             = 0,
  GST_STATE_SUCCESS             = 1,
  GST_STATE_ASYNC               = 2
} GstElementStateReturn;

This enum defines the standard return values that an element can return after a state change.


GST_NUM_STATES

#define GST_NUM_STATES 4

The maximun number of states.


GST_STATE()

#define GST_STATE(obj)			(GST_ELEMENT(obj)->current_state)

This macro returns the current state of the element.


GST_STATE_PENDING()

#define GST_STATE_PENDING(obj)		(GST_ELEMENT(obj)->pending_state)

This macro returns the currently pending state of the element.


GST_STATE_TRANSITION()

#define GST_STATE_TRANSITION(obj)	((GST_STATE(obj)<<8) | GST_STATE_PENDING(obj))

Returns the state transition this object is going through.


GST_STATE_NULL_TO_READY

#define GST_STATE_NULL_TO_READY		((GST_STATE_NULL<<8) | GST_STATE_READY)

The Element is going from the NULL state to the READY state.


GST_STATE_READY_TO_PAUSED

#define GST_STATE_READY_TO_PAUSED	((GST_STATE_READY<<8) | GST_STATE_PAUSED)

The Element is going from the READY state to the PAUSED state.


GST_STATE_PAUSED_TO_READY

#define GST_STATE_PAUSED_TO_READY	((GST_STATE_PAUSED<<8) | GST_STATE_READY)

The Element is going from the PAUSED state to the READY state.


GST_STATE_PLAYING_TO_PAUSED

#define GST_STATE_PLAYING_TO_PAUSED	((GST_STATE_PLAYING<<8) | GST_STATE_PAUSED)

The Element is going from the PLAYING state to the PAUSED state.


GST_STATE_PAUSED_TO_PLAYING

#define GST_STATE_PAUSED_TO_PLAYING	((GST_STATE_PAUSED<<8) | GST_STATE_PLAYING)

The Element is going from the PAUSED state to the PLAYING state.


GST_STATE_READY_TO_NULL

#define GST_STATE_READY_TO_NULL		((GST_STATE_READY<<8) | GST_STATE_NULL)

The Element is going from the READY state to the NULL state.


enum GstElementFlags

typedef enum {
  /* element is complex (for some def.) and generally require a cothread */
  GST_ELEMENT_COMPLEX		= GST_OBJECT_FLAG_LAST,
  /* input and output pads aren't directly coupled to each other
     examples: queues, multi-output async readers, etc. */
  GST_ELEMENT_DECOUPLED,
  /* this element should be placed in a thread if at all possible */
  GST_ELEMENT_THREAD_SUGGESTED,
  /* this element, for some reason, has a loop function that performs
   * an infinite loop without calls to gst_element_yield () */
  GST_ELEMENT_INFINITE_LOOP,
  /* there is a new loopfunction ready for placement */
  GST_ELEMENT_NEW_LOOPFUNC,
  /* if this element can handle events */
  GST_ELEMENT_EVENT_AWARE,
  /* use threadsafe property get/set implementation */
  GST_ELEMENT_USE_THREADSAFE_PROPERTIES,

  /* private flags that can be used by the scheduler */
  GST_ELEMENT_SCHEDULER_PRIVATE1,
  GST_ELEMENT_SCHEDULER_PRIVATE2,

  /* use some padding for future expansion */
  GST_ELEMENT_FLAG_LAST		= GST_OBJECT_FLAG_LAST + 16
} GstElementFlags;

This enum defines the standard flags that an element may have.


GST_ELEMENT_IS_THREAD_SUGGESTED()

#define GST_ELEMENT_IS_THREAD_SUGGESTED(obj)	(GST_FLAG_IS_SET(obj,GST_ELEMENT_THREAD_SUGGESTED))

Queries whether the Element should be placed in a thread.


GST_ELEMENT_IS_DECOUPLED()

#define GST_ELEMENT_IS_DECOUPLED(obj)		(GST_FLAG_IS_SET(obj,GST_ELEMENT_DECOUPLED))

Queries if the Element is decoupled.


GST_ELEMENT_IS_EOS()

#define GST_ELEMENT_IS_EOS(obj)			(GST_FLAG_IS_SET(obj,GST_ELEMENT_EOS))

Query wether this element is in the End Of Stream state.


GST_ELEMENT_IS_EVENT_AWARE()

#define GST_ELEMENT_IS_EVENT_AWARE(obj)		(GST_FLAG_IS_SET(obj,GST_ELEMENT_EVENT_AWARE))

Query wether this element can handle events.


GST_ELEMENT_PARENT()

#define GST_ELEMENT_PARENT(obj)			(GST_OBJECT_PARENT(obj))

Get the parent object of this element.


GST_ELEMENT_NAME()

#define GST_ELEMENT_NAME(obj)			(GST_OBJECT_NAME(obj))

Gets the name of this element. Used in the core. Not ABI-compatible.


GST_ELEMENT_PADS()

#define GST_ELEMENT_PADS(obj)			((obj)->pads)

Get the pads of this elements.


GST_ELEMENT_SCHED()

#define GST_ELEMENT_SCHED(obj)			(((GstElement*)(obj))->sched)

Get the scheduler of this element.


GST_ELEMENT_MANAGER()

#define GST_ELEMENT_MANAGER(obj)		(((GstElement*)(obj))->manager)

Get the manager of this element.


GST_ELEMENT_CLOCK()

#define GST_ELEMENT_CLOCK(obj)			(((GstElement*)(obj))->clock)

Get the clock of this element

Signals

The "deep-notify" signal

void        user_function                  (GstElement *gstelement,
                                            GObject *arg1,
                                            GParam arg2,
                                            gpointer user_data);


The "eos" signal

void        user_function                  (GstElement *gstelement,
                                            gpointer user_data);


The "error" signal

void        user_function                  (GstElement *gstelement,
                                            GObject *arg1,
                                            gchar *arg2,
                                            gpointer user_data);

Is trigered whenever an error occured


The "new-pad" signal

void        user_function                  (GstElement *gstelement,
                                            GObject *arg1,
                                            gpointer user_data);

Is trigered whenever a new pad is added to an element


The "pad-removed" signal

void        user_function                  (GstElement *gstelement,
                                            GObject *arg1,
                                            gpointer user_data);


The "state-change" signal

void        user_function                  (GstElement *gstelement,
                                            gint arg1,
                                            gint arg2,
                                            gpointer user_data);

Is trigered whenever the state of an element changes

See Also

GstElementFactory, GstPad