Details
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 ()
Retrieves the factory that was used to create this element.
gst_element_add_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 ()
Remove a pad (connection point) from the element.
gst_element_add_ghost_pad ()
Creates a ghost pad from the given pad, and adds it to the list of pads
for this element.
gst_element_remove_ghost_pad ()
Removes a ghost pad from an element.
gst_element_get_pad ()
Retrieves a pad from the element by name.
gst_element_get_static_pad ()
Retrieves a pad from the element by name. This version only retrieves
already-existing (i.e. 'static') pads.
gst_element_get_request_pad ()
Retrieves a pad from the element by name. This version only retrieves
request pads.
gst_element_get_pad_list ()
const GList* gst_element_get_pad_list (GstElement *element); |
Retrieves a list of the pads associated with the element.
gst_element_get_pad_template ()
Retrieves a padtemplate from this element with the
given name.
gst_element_get_pad_template_list ()
GList* gst_element_get_pad_template_list
(GstElement *element); |
Retrieves a list of the pad templates associated with the element.
gst_element_class_add_pad_template ()
void gst_element_class_add_pad_template
(GstElementClass *klass,
GstPadTemplate *templ); |
Adds 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. Plug-in writers should use
gst_element_factory_add_pad_template instead.
gst_element_connect ()
Connects 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_filtered ()
Connects 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); |
Connects 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); |
Connects 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 ()
Disconnects all source pads of the source element with all sink pads
of the sink element to which they are connected.
gst_element_disconnect_pads ()
void gst_element_disconnect_pads (GstElement *src,
const gchar *srcpadname,
GstElement *dest,
const gchar *destpadname); |
Disconnects the two named pads of the source and destination elements.
gst_element_get_compatible_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 ()
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 ()
Generates a pad template for this element compatible with the given
template (meaning it is able to connect with it).
gst_element_set_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 ()
Gets the state of the element.
gst_element_state_get_name ()
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,
...); |
signals an error condition on an element.
This function is used internally by elements.
It results in the "error" signal.
gst_element_set_eos ()
Perform the actions needed to bring the element in the EOS state.
gst_element_interrupt ()
gboolean gst_element_interrupt (GstElement *element); |
Requests the scheduler of this element to interrupt the execution of
this element and scheduler another one.
gst_element_yield ()
Requests a yield operation for the element. 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 ()
Gets the clock of the element.
gst_element_set_clock ()
Sets the clock for the element.
gst_element_clock_wait ()
Waits for a specific time on the clock.
GstElementGetClockFunction ()
The function to get the clock from a clock providing element
GstElementSetClockFunction ()
The function to set the clock on a clock receiving element.
gst_element_set_loop_function ()
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 ()
Returns the scheduler of the element.
gst_element_set_scheduler ()
Sets the scheduler of the element. For internal use only, unless you're
writing a new bin subclass.
gst_element_get_parent ()
Gets the parent of the element.
gst_element_set_parent ()
Sets the parent of the element.
gst_element_get_managing_bin ()
Gets the managing bin (a pipeline or a thread, for example) of an element.
GstElementPostRunFunction ()
void (*GstElementPostRunFunction) (GstElement *element); |
The signature of the function to execute before this element
is scheduled.
GstElementPreRunFunction ()
void (*GstElementPreRunFunction) (GstElement *element); |
The signature of the function to execute after this element
is scheduled.
gst_element_disable_threadsafe_properties ()
void gst_element_disable_threadsafe_properties
(GstElement *element); |
Removes the threadsafe properties, post- and pre-run locks from
this element.
gst_element_enable_threadsafe_properties ()
void gst_element_enable_threadsafe_properties
(GstElement *element); |
Installs an asynchronous queue, a mutex and pre- and post-run functions on
this element so that properties on the element can be set in a
threadsafe way.
gst_element_get ()
void gst_element_get (GstElement *element,
const gchar *first_property_name,
...); |
Gets properties from an element. If the element uses threadsafe properties,
the element will be locked before getting the given properties.
gst_element_get_property ()
void gst_element_get_property (GstElement *element,
const gchar *property_name,
GValue *value); |
Gets a property from an element. If the element uses threadsafe properties,
the element will be locked before getting the given property.
gst_element_get_valist ()
void gst_element_get_valist (GstElement *element,
const gchar *first_property_name,
va_list var_args); |
Gets properties from an element. If the element uses threadsafe properties,
the element will be locked before getting the given properties.
gst_element_set ()
void gst_element_set (GstElement *element,
const gchar *first_property_name,
...); |
Sets properties on an element. If the element uses threadsafe properties,
they will be queued and set on the object when it is scheduled again.
gst_element_set_pending_properties ()
void gst_element_set_pending_properties
(GstElement *element); |
Sets all pending properties on the threadsafe properties enabled
element.
gst_element_set_property ()
void gst_element_set_property (GstElement *element,
const gchar *property_name,
const GValue *value); |
Sets a property on an element. If the element uses threadsafe properties,
the property will be put on the async queue.
gst_element_set_valist ()
void gst_element_set_valist (GstElement *element,
const gchar *first_property_name,
va_list var_args); |
Sets properties on an element. If the element uses threadsafe properties,
the property change will be put on the async queue.
gst_element_query ()
Performs 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 ()
Sends an event to an element. If the element doesn't
implement an event handler, the event will be forwarded
to a random sink pad.
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
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