1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Base class for all pipeline elements
7 <!-- ##### SECTION Long_Description ##### -->
9 GstElement is the base class needed to construct an element that can be
10 used in a GST pipeline. As such, it is not a functional entity, and
11 cannot do anything when placed in a pipeline.
15 All GstElements have a list containing the #GstPad structure for all their
16 inputs and outputs. These can be added with gst_element_add_pad() or
17 gst_element_add_ghost_pad(), and retrieved by name with
18 gst_element_get_pad(), or in a list form by gst_element_get_pad_list().
22 gst_element_connect() is a convenience function provided to make it
23 simpler to connect pads of two elements together.
26 <!-- ##### SECTION See_Also ##### -->
31 <!-- ##### ENUM GstElementState ##### -->
33 This enum defines the standard states an element may be in. You will normally
34 use gst_element_set_state() to change the state of an element.
38 @GST_STATE_VOID_PENDING:
39 @GST_STATE_NULL: Reset the state of an element.
40 @GST_STATE_READY: will make the element ready to start processing data. some
41 elements might have a non trivial way to initialize themselves.
42 @GST_STATE_PAUSED: means there really is data flowing temporary stops the data flow.
43 @GST_STATE_PLAYING: means there really is data flowing through the graph.
45 <!-- ##### ENUM GstElementStateReturn ##### -->
47 This enum defines the standard return values that an element
48 can return after a state change.
52 @GST_STATE_FAILURE: the element could not perform the state change
53 @GST_STATE_SUCCESS: the element successfully changed its state
54 @GST_STATE_ASYNC: the element will asynchronously change its state as soon as possible
56 <!-- ##### MACRO GST_STATE ##### -->
58 This macro returns the current state of the element.
61 @obj: Element to return state for.
64 <!-- ##### MACRO GST_STATE_PENDING ##### -->
66 This macro returns the currently pending state of the element.
69 @obj: Element to return the pending state for.
72 <!-- ##### MACRO GST_STATE_TRANSITION ##### -->
74 Returns the state transition this object is going through.
77 @obj: the Element to return the state transition for
80 <!-- ##### MACRO GST_STATE_NULL_TO_READY ##### -->
82 The Element is going from the NULL state to the READY state.
87 <!-- ##### MACRO GST_STATE_READY_TO_PAUSED ##### -->
89 The Element is going from the READY state to the PAUSED state.
94 <!-- ##### MACRO GST_STATE_PAUSED_TO_READY ##### -->
96 The Element is going from the PAUSED state to the READY state.
101 <!-- ##### MACRO GST_STATE_PLAYING_TO_PAUSED ##### -->
103 The Element is going from the PLAYING state to the PAUSED state.
108 <!-- ##### MACRO GST_STATE_PAUSED_TO_PLAYING ##### -->
110 The Element is going from the PAUSED state to the PLAYING state.
115 <!-- ##### MACRO GST_STATE_READY_TO_NULL ##### -->
117 The Element is going from the READY state to the NULL state.
122 <!-- ##### ENUM GstElementFlags ##### -->
124 This enum defines the standard flags that an element may have.
127 @GST_ELEMENT_COMPLEX:
128 @GST_ELEMENT_DECOUPLED:
129 @GST_ELEMENT_THREAD_SUGGESTED:
130 @GST_ELEMENT_NO_SEEK:
131 @GST_ELEMENT_NO_ENTRY:
132 @GST_ELEMENT_NEW_LOOPFUNC:
133 @GST_ELEMENT_COTHREAD_STOPPING:
134 @GST_ELEMENT_USE_COTHREAD:
136 @GST_ELEMENT_FLAG_LAST:
138 <!-- ##### MACRO GST_ELEMENT_IS_THREAD_SUGGESTED ##### -->
140 Queries whether the Element should be placed in a thread.
143 @obj: The element to query
146 <!-- ##### MACRO GST_ELEMENT_IS_COTHREAD_STOPPING ##### -->
148 Queries whether the cothread holding this element needs to be stopped.
151 @obj: The element to query
154 <!-- ##### MACRO GST_ELEMENT_IS_EOS ##### -->
156 Query wether this element is in the End Of Stream state.
159 @obj: The element to query
162 <!-- ##### MACRO GST_ELEMENT_PARENT ##### -->
164 Get the parent object of this element.
167 @obj: The element to query
170 <!-- ##### MACRO GST_ELEMENT_NAME ##### -->
172 Get the name of this element.
175 @obj: The element to query
178 <!-- ##### MACRO GST_ELEMENT_PADS ##### -->
180 Get the pads of this elements.
183 @obj: The element to query
186 <!-- ##### MACRO GST_ELEMENT_SCHED ##### -->
188 Get the scheduler of this element.
191 @obj: The element to query
194 <!-- ##### MACRO GST_ELEMENT_MANAGER ##### -->
196 Get the manager of this element.
199 @obj: The element to query
202 <!-- ##### STRUCT GstElement ##### -->
208 <!-- ##### STRUCT GstElementDetails ##### -->
210 This struct is used to define public information about the element. It
211 describes the element, mostly for the benefit of editors.
221 <!-- ##### STRUCT GstElementFactory ##### -->
223 This factory is used when registering the element, and contains the name
224 of the element, the GtkType value for it, as well as a pointer to the
225 GstElementDetails struct for the element.
235 <!-- ##### USER_FUNCTION GstElementLoopFunction ##### -->
237 This function type is used to specify a loop function for the element. It
238 is passed the element in question, and is expect to return only in error
242 @element: The element in question.
245 <!-- ##### FUNCTION gst_element_class_add_padtemplate ##### -->
252 <!-- # Unused Parameters # -->
256 <!-- ##### MACRO gst_element_destroy ##### -->
258 Destroy the element. This is potentially dangerous, use gst_object_unref
262 @element: the element to destroy
265 <!-- ##### FUNCTION gst_element_set_loop_function ##### -->
274 <!-- ##### FUNCTION gst_element_set_name ##### -->
283 <!-- ##### FUNCTION gst_element_get_name ##### -->
292 <!-- ##### FUNCTION gst_element_get_sched ##### -->
301 <!-- ##### FUNCTION gst_element_set_sched ##### -->
310 <!-- ##### FUNCTION gst_element_set_parent ##### -->
319 <!-- ##### FUNCTION gst_element_get_parent ##### -->
328 <!-- ##### FUNCTION gst_element_add_pad ##### -->
337 <!-- ##### FUNCTION gst_element_remove_pad ##### -->
346 <!-- ##### FUNCTION gst_element_get_pad ##### -->
353 @Returns: GList of pads
356 <!-- ##### FUNCTION gst_element_get_pad_list ##### -->
365 <!-- ##### FUNCTION gst_element_get_padtemplate_list ##### -->
374 <!-- ##### FUNCTION gst_element_get_padtemplate_by_name ##### -->
384 <!-- ##### FUNCTION gst_element_add_ghost_pad ##### -->
394 <!-- ##### FUNCTION gst_element_remove_ghost_pad ##### -->
403 <!-- ##### FUNCTION gst_element_request_compatible_pad ##### -->
413 <!-- ##### FUNCTION gst_element_request_pad_by_name ##### -->
423 <!-- ##### FUNCTION gst_element_connect ##### -->
434 <!-- ##### FUNCTION gst_element_disconnect ##### -->
445 <!-- ##### FUNCTION gst_element_set_state ##### -->
455 <!-- ##### FUNCTION gst_element_get_state ##### -->
462 <!-- # Unused Parameters # -->
466 <!-- ##### FUNCTION gst_element_statename ##### -->
475 <!-- ##### FUNCTION gst_element_error ##### -->
484 <!-- ##### FUNCTION gst_element_get_factory ##### -->
493 <!-- ##### FUNCTION gst_element_signal_eos ##### -->
501 <!-- ##### FUNCTION gst_element_restore_thyself ##### -->
511 <!-- ##### FUNCTION gst_elementfactory_new ##### -->
522 <!-- ##### FUNCTION gst_elementfactory_add_padtemplate ##### -->
529 <!-- # Unused Parameters # -->
534 <!-- ##### FUNCTION gst_elementfactory_find ##### -->
543 <!-- ##### FUNCTION gst_elementfactory_get_list ##### -->
551 <!-- ##### FUNCTION gst_elementfactory_can_src_caps ##### -->
561 <!-- ##### FUNCTION gst_elementfactory_can_sink_caps ##### -->
571 <!-- ##### FUNCTION gst_elementfactory_create ##### -->
581 <!-- ##### FUNCTION gst_elementfactory_make ##### -->
591 <!-- ##### SIGNAL GstElement::state-change ##### -->
593 Is trigered whenever the state of an element changes
596 @gstelement: the object which received the signal.
597 @arg1: the new state of the object
599 <!-- ##### SIGNAL GstElement::new-pad ##### -->
601 Is trigered whenever a new pad is added to an element
604 @gstelement: the object which received the signal.
605 @arg1: the new pad that was added
607 <!-- ##### SIGNAL GstElement::pad-removed ##### -->
612 @gstelement: the object which received the signal.
613 @arg1: The pad that was removed.
615 <!-- ##### SIGNAL GstElement::new-ghost-pad ##### -->
618 Is trigered whenever a new ghost pad is added to an element
621 @gstelement: the object which received the signal.
622 @arg1: the new ghost pad that was added
624 <!-- ##### SIGNAL GstElement::ghost-pad-removed ##### -->
629 @gstelement: the object which received the signal.
630 @arg1: The ghost pad that was removed.
632 <!-- ##### SIGNAL GstElement::error ##### -->
634 Is trigered whenever an error occured
638 @gstelement: the object which received the signal.
639 @arg1: the error message
641 <!-- ##### SIGNAL GstElement::eos ##### -->
646 @gstelement: the object which received the signal.