1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Abstract 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 GStreamer pipeline. As such, it is not a functional entity, and
11 cannot do anything when placed in a pipeline.
15 The name of a GstElement can be get with gst_element_get_name() and set with
16 gst_element_set_name(). For speed, GST_ELEMENT_NAME() can be used in the
18 Do not use this in plug-ins or applications in order to retain ABI
23 All elements have pads (of the type #GstPad). These pads link to pads on
24 other elements. Buffers flow between these linked pads.
25 A GstElement has a GList of #GstPad structures for all their input (or sink)
26 and output (or source) pads.
27 Core and plug-in writers can add and remove pads with gst_element_add_pad()
28 and gst_element_remove_pad().
29 Application writers can manipulate ghost pads (copies of real pads inside a bin)
30 with gst_element_add_ghost_pad() and gst_element_remove_ghost_pad().
31 A pad of an element can be retrieved by name with gst_element_get_pad().
32 A GList of all pads can be retrieved with gst_element_get_pad_list().
36 Elements can be linked through their pads.
37 If the link is straightforward, use the gst_element_link()
38 convenience function to link two elements, or gst_element_link_many()
39 for more elements in a row.
40 Use gst_element_link_filtered() to link two elements constrained by
41 a specified set of #GstCaps.
42 For finer control, use gst_element_link_pads() and
43 gst_element_link_pads_filtered() to specify the pads to link on
48 Each element has a state (see #GstElementState). You can get and set the state
49 of an element with gst_element_get_state() and gst_element_set_state().
50 You can wait for an element to change it's state with gst_element_wait_state_change().
51 To get a string representation of a #GstElementState, use
52 gst_element_state_get_name().
56 You can get and set a #GstClock on an element using gst_element_get_clock()
57 and gst_element_set_clock(). You can wait for the clock to reach a given
58 #GstClockTime using gst_element_clock_wait().
61 <!-- ##### SECTION See_Also ##### -->
63 #GstElementFactory, #GstPad
66 <!-- basic object functions -->
68 <!-- ##### STRUCT GstElementDetails ##### -->
70 This struct is used to define public information about the element. It
71 describes the element, mostly for the benefit of editors.
80 <!-- ##### MACRO GST_ELEMENT_DETAILS ##### -->
91 <!-- ##### MACRO GST_IS_ELEMENT_DETAILS ##### -->
99 <!-- ##### MACRO GST_NUM_STATES ##### -->
101 The maximun number of states.
106 <!-- ##### MACRO GST_STATE ##### -->
108 This macro returns the current state of the element.
111 @obj: Element to return state for.
114 <!-- ##### MACRO GST_STATE_PENDING ##### -->
116 This macro returns the currently pending state of the element.
119 @obj: Element to return the pending state for.
122 <!-- ##### MACRO GST_STATE_TRANSITION ##### -->
124 Returns the state transition this object is going through.
127 @obj: the Element to return the state transition for
130 <!-- ##### MACRO GST_STATE_NULL_TO_READY ##### -->
132 The Element is going from the NULL state to the READY state.
137 <!-- ##### MACRO GST_STATE_READY_TO_PAUSED ##### -->
139 The Element is going from the READY state to the PAUSED state.
144 <!-- ##### MACRO GST_STATE_PAUSED_TO_PLAYING ##### -->
146 The Element is going from the PAUSED state to the PLAYING state.
151 <!-- ##### MACRO GST_STATE_PLAYING_TO_PAUSED ##### -->
153 The Element is going from the PLAYING state to the PAUSED state.
158 <!-- ##### MACRO GST_STATE_PAUSED_TO_READY ##### -->
160 The Element is going from the PAUSED state to the READY state.
165 <!-- ##### MACRO GST_STATE_READY_TO_NULL ##### -->
167 The Element is going from the READY state to the NULL state.
172 <!-- ##### MACRO GST_ELEMENT_CLASS ##### -->
180 <!-- ##### MACRO GST_ELEMENT_QUERY_TYPE_FUNCTION ##### -->
182 Helper macro to create query type functions
185 @functionname: The function name
186 @...: list of query types.
189 <!-- ##### MACRO GST_ELEMENT_FORMATS_FUNCTION ##### -->
191 Halper macro to create element format functions
194 @functionname: The function name
198 <!-- ##### MACRO GST_ELEMENT_EVENT_MASK_FUNCTION ##### -->
200 A helper macro to create a mask function
203 @functionname: the name of the mask function
207 <!-- ##### ENUM GstElementFlags ##### -->
209 This enum defines the standard flags that an element may have.
212 @GST_ELEMENT_COMPLEX:
213 @GST_ELEMENT_DECOUPLED:
214 @GST_ELEMENT_THREAD_SUGGESTED:
215 @GST_ELEMENT_INFINITE_LOOP:
216 @GST_ELEMENT_NEW_LOOPFUNC:
217 @GST_ELEMENT_EVENT_AWARE:
218 @GST_ELEMENT_USE_THREADSAFE_PROPERTIES:
219 @GST_ELEMENT_SCHEDULER_PRIVATE1:
220 @GST_ELEMENT_SCHEDULER_PRIVATE2:
221 @GST_ELEMENT_LOCKED_STATE:
222 @GST_ELEMENT_IN_ERROR:
223 @GST_ELEMENT_FLAG_LAST:
225 <!-- ##### MACRO GST_ELEMENT_IS_THREAD_SUGGESTED ##### -->
227 Queries whether the Element should be placed in a thread.
230 @obj: a #GstElement to query
233 <!-- ##### MACRO GST_ELEMENT_IS_EVENT_AWARE ##### -->
235 Query wether this element can handle events.
238 @obj: a #GstElement to query
241 <!-- ##### MACRO GST_ELEMENT_IS_DECOUPLED ##### -->
243 Queries if the Element is decoupled.
246 @obj: a #GstElement to query
249 <!-- ##### MACRO GST_ELEMENT_NAME ##### -->
251 Gets the name of this element. Used in the core. Not ABI-compatible.
254 @obj: A #GstElement to query
257 <!-- ##### MACRO GST_ELEMENT_PARENT ##### -->
259 Get the parent object of this element.
262 @obj: a #GstElement to query
265 <!-- ##### MACRO GST_ELEMENT_MANAGER ##### -->
267 Get the manager of this element.
270 @obj: a #GstElement to query
273 <!-- ##### MACRO GST_ELEMENT_SCHED ##### -->
275 Get the scheduler of this element.
278 @obj: a #GstElement to query
281 <!-- ##### MACRO GST_ELEMENT_CLOCK ##### -->
283 Get the clock of this element
286 @obj: a #GstElement to query
289 <!-- ##### MACRO GST_ELEMENT_PADS ##### -->
291 Get the pads of this elements.
294 @obj: a #GstElement to query
297 <!-- ##### MACRO GST_ELEMENT_ERROR ##### -->
309 <!-- ##### USER_FUNCTION GstElementLoopFunction ##### -->
311 This function type is used to specify a loop function for the element. It
312 is passed the element in question, and is expect to return only in error
316 @element: The element in question.
319 <!-- ##### USER_FUNCTION GstElementPreRunFunction ##### -->
321 The signature of the function to execute after this element
325 @element: The element
328 <!-- ##### USER_FUNCTION GstElementPostRunFunction ##### -->
330 The signature of the function to execute before this element
334 @element: The element
337 <!-- ##### FUNCTION gst_element_class_add_pad_template ##### -->
346 <!-- ##### FUNCTION gst_element_class_install_std_props ##### -->
356 <!-- ##### FUNCTION gst_element_class_set_details ##### -->
365 <!-- ##### MACRO gst_element_default_deep_notify ##### -->
367 The default deep notify handler that prints out the property change
368 notifications to stdout.
373 <!-- ##### FUNCTION gst_element_default_error ##### -->
384 <!-- ##### FUNCTION gst_element_set_loop_function ##### -->
393 <!-- ##### MACRO gst_element_get_name ##### -->
395 Gets the name of the element.
399 @Returns: the name of the element.
405 <!-- ##### MACRO gst_element_set_name ##### -->
407 Sets the name of the element, getting rid of the old name if there was one.
410 @elem: a #GstElement to set the name of.
411 @name: the new name of the element.
414 <!-- ##### MACRO gst_element_get_parent ##### -->
416 Gets the parent of an element.
419 @elem: a #GstElement to get the parent of.
420 @Returns: the #GstObject parent of the element.
423 <!-- ##### MACRO gst_element_set_parent ##### -->
425 Sets the parent of an element.
428 @elem: a #GstElement to set the parent of.
429 @parent: the new #GstObject parent of the object.
432 <!-- ##### FUNCTION gst_element_set ##### -->
438 @first_property_name:
442 <!-- ##### FUNCTION gst_element_get ##### -->
448 @first_property_name:
452 <!-- ##### FUNCTION gst_element_set_valist ##### -->
458 @first_property_name:
462 <!-- ##### FUNCTION gst_element_get_valist ##### -->
468 @first_property_name:
472 <!-- ##### FUNCTION gst_element_set_property ##### -->
482 <!-- ##### FUNCTION gst_element_get_property ##### -->
492 <!-- ##### FUNCTION gst_element_enable_threadsafe_properties ##### -->
500 <!-- ##### FUNCTION gst_element_disable_threadsafe_properties ##### -->
508 <!-- ##### FUNCTION gst_element_set_pending_properties ##### -->
516 <!-- ##### FUNCTION gst_element_requires_clock ##### -->
525 <!-- ##### FUNCTION gst_element_provides_clock ##### -->
534 <!-- ##### FUNCTION gst_element_get_clock ##### -->
543 <!-- ##### FUNCTION gst_element_set_clock ##### -->
552 <!-- ##### FUNCTION gst_element_clock_wait ##### -->
561 <!-- # Unused Parameters # -->
566 <!-- ##### FUNCTION gst_element_get_time ##### -->
575 <!-- ##### FUNCTION gst_element_wait ##### -->
585 <!-- ##### FUNCTION gst_element_set_time ##### -->
594 <!-- ##### FUNCTION gst_element_set_time_delay ##### -->
604 <!-- ##### FUNCTION gst_element_adjust_time ##### -->
613 <!-- ##### FUNCTION gst_element_is_indexable ##### -->
622 <!-- ##### FUNCTION gst_element_set_index ##### -->
631 <!-- ##### FUNCTION gst_element_get_index ##### -->
640 <!-- ##### FUNCTION gst_element_release_locks ##### -->
649 <!-- ##### FUNCTION gst_element_yield ##### -->
657 <!-- ##### FUNCTION gst_element_interrupt ##### -->
666 <!-- ##### FUNCTION gst_element_set_scheduler ##### -->
675 <!-- ##### FUNCTION gst_element_get_scheduler ##### -->
684 <!-- ##### FUNCTION gst_element_add_pad ##### -->
693 <!-- ##### FUNCTION gst_element_remove_pad ##### -->
702 <!-- ##### FUNCTION gst_element_add_ghost_pad ##### -->
713 <!-- ##### FUNCTION gst_element_remove_ghost_pad ##### -->
722 <!-- pad template manipulation -->
725 <!-- ##### FUNCTION gst_element_get_pad ##### -->
732 @Returns: GList of #GstPads
735 <!-- ##### FUNCTION gst_element_get_static_pad ##### -->
745 <!-- ##### FUNCTION gst_element_get_request_pad ##### -->
755 <!-- ##### FUNCTION gst_element_release_request_pad ##### -->
764 <!-- ##### FUNCTION gst_element_get_pad_list ##### -->
773 <!-- ##### FUNCTION gst_element_get_compatible_pad ##### -->
783 <!-- ##### FUNCTION gst_element_get_compatible_pad_filtered ##### -->
794 <!-- ##### FUNCTION gst_element_class_get_pad_template ##### -->
804 <!-- ##### FUNCTION gst_element_class_get_pad_template_list ##### -->
813 <!-- ##### FUNCTION gst_element_get_pad_template ##### -->
823 <!-- ##### FUNCTION gst_element_get_pad_template_list ##### -->
836 <!-- ##### FUNCTION gst_element_get_compatible_pad_template ##### -->
846 <!-- ##### FUNCTION gst_element_link ##### -->
856 <!-- ##### FUNCTION gst_element_link_many ##### -->
867 <!-- ##### FUNCTION gst_element_link_filtered ##### -->
878 <!-- ##### FUNCTION gst_element_unlink ##### -->
887 <!-- ##### FUNCTION gst_element_unlink_many ##### -->
897 <!-- ##### FUNCTION gst_element_link_pads ##### -->
909 <!-- ##### FUNCTION gst_element_link_pads_filtered ##### -->
922 <!-- ##### FUNCTION gst_element_unlink_pads ##### -->
933 <!-- pad manipulation -->
936 <!-- ##### FUNCTION gst_element_get_event_masks ##### -->
945 <!-- ##### FUNCTION gst_element_send_event ##### -->
955 <!-- ##### FUNCTION gst_element_seek ##### -->
966 <!-- ##### FUNCTION gst_element_get_query_types ##### -->
975 <!-- ##### FUNCTION gst_element_query ##### -->
987 <!-- ##### FUNCTION gst_element_get_formats ##### -->
996 <!-- ##### FUNCTION gst_element_convert ##### -->
1009 <!-- ##### FUNCTION gst_element_found_tags ##### -->
1018 <!-- ##### FUNCTION gst_element_found_tags_for_pad ##### -->
1029 <!-- ##### FUNCTION gst_element_set_eos ##### -->
1037 <!-- ##### FUNCTION gst_element_error_full ##### -->
1052 <!-- ##### FUNCTION gst_element_is_locked_state ##### -->
1061 <!-- ##### FUNCTION gst_element_set_locked_state ##### -->
1070 <!-- ##### FUNCTION gst_element_sync_state_with_parent ##### -->
1079 <!-- ##### FUNCTION gst_element_get_state ##### -->
1088 <!-- ##### FUNCTION gst_element_set_state ##### -->
1098 <!-- ##### FUNCTION gst_element_wait_state_change ##### -->
1106 <!-- ##### FUNCTION gst_element_state_get_name ##### -->
1115 <!-- ##### FUNCTION gst_element_get_factory ##### -->
1124 <!-- ##### FUNCTION gst_element_get_managing_bin ##### -->
1135 <!-- ##### MACRO GST_TYPE_ELEMENT_FACTORY ##### -->
1142 <!-- ##### MACRO GST_ELEMENT_FACTORY ##### -->
1150 <!-- ##### MACRO GST_ELEMENT_FACTORY_CLASS ##### -->
1158 <!-- ##### MACRO GST_IS_ELEMENT_FACTORY ##### -->
1166 <!-- ##### MACRO GST_IS_ELEMENT_FACTORY_CLASS ##### -->
1174 <!-- ##### FUNCTION gst_element_factory_get_type ##### -->
1182 <!-- ##### FUNCTION gst_element_register ##### -->
1192 <!-- # Unused Parameters # -->
1196 <!-- ##### FUNCTION gst_element_factory_find ##### -->
1205 <!-- ##### FUNCTION gst_element_factory_get_element_type ##### -->
1214 <!-- ##### FUNCTION gst_element_factory_get_longname ##### -->
1223 <!-- ##### FUNCTION gst_element_factory_get_klass ##### -->
1232 <!-- ##### FUNCTION gst_element_factory_get_description ##### -->
1241 <!-- ##### FUNCTION gst_element_factory_get_author ##### -->
1250 <!-- ##### FUNCTION gst_element_factory_get_num_pad_templates ##### -->
1259 <!-- ##### FUNCTION gst_element_factory_get_pad_templates ##### -->
1268 <!-- ##### FUNCTION gst_element_factory_get_uri_type ##### -->
1277 <!-- ##### FUNCTION gst_element_factory_get_uri_protocols ##### -->
1286 <!-- ##### FUNCTION gst_element_factory_create ##### -->
1296 <!-- ##### FUNCTION gst_element_factory_make ##### -->
1306 <!-- ##### FUNCTION gst_element_factory_can_src_caps ##### -->
1316 <!-- ##### FUNCTION gst_element_factory_can_sink_caps ##### -->
1326 <!-- ##### SIGNAL GstElement::eos ##### -->
1328 Signal emited when the element goes to PAUSED due to an end-of-stream
1332 @gstelement: the object which received the signal.
1334 <!-- ##### SIGNAL GstElement::error ##### -->
1336 This signal is emitted when an element has encountered an error that caused
1337 it to fail performing its function.
1340 @gstelement: the object which received the signal.
1341 @arg1: the original #GstElement that generated the error.
1342 @arg2: a #GError containing the translated error message.
1343 @arg3: a debug string providing additional untranslated debug information, or NULL.
1345 <!-- ##### SIGNAL GstElement::found-tag ##### -->
1350 @gstelement: the object which received the signal.
1354 <!-- ##### SIGNAL GstElement::new-pad ##### -->
1356 Is triggered whenever a new pad is added to an element.
1359 @gstelement: the object which received the signal.
1360 @arg1: the new pad that was added
1362 <!-- ##### SIGNAL GstElement::pad-removed ##### -->
1364 Is triggered whenever a pad has been removed from the element.
1367 @gstelement: the object which received the signal.
1368 @arg1: The pad that was removed.
1370 <!-- ##### SIGNAL GstElement::state-change ##### -->
1372 Is triggered whenever the state of an element changes.
1375 @gstelement: the object which received the signal.
1376 @arg1: the new state of the object