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_adjust_time ##### -->
603 <!-- ##### FUNCTION gst_element_is_indexable ##### -->
612 <!-- ##### FUNCTION gst_element_set_index ##### -->
621 <!-- ##### FUNCTION gst_element_get_index ##### -->
630 <!-- ##### FUNCTION gst_element_release_locks ##### -->
639 <!-- ##### FUNCTION gst_element_yield ##### -->
647 <!-- ##### FUNCTION gst_element_interrupt ##### -->
656 <!-- ##### FUNCTION gst_element_set_scheduler ##### -->
665 <!-- ##### FUNCTION gst_element_get_scheduler ##### -->
674 <!-- ##### FUNCTION gst_element_add_pad ##### -->
683 <!-- ##### FUNCTION gst_element_remove_pad ##### -->
692 <!-- ##### FUNCTION gst_element_add_ghost_pad ##### -->
703 <!-- ##### FUNCTION gst_element_remove_ghost_pad ##### -->
712 <!-- pad template manipulation -->
715 <!-- ##### FUNCTION gst_element_get_pad ##### -->
722 @Returns: GList of #GstPads
725 <!-- ##### FUNCTION gst_element_get_static_pad ##### -->
735 <!-- ##### FUNCTION gst_element_get_request_pad ##### -->
745 <!-- ##### FUNCTION gst_element_release_request_pad ##### -->
754 <!-- ##### FUNCTION gst_element_get_pad_list ##### -->
763 <!-- ##### FUNCTION gst_element_get_compatible_pad ##### -->
773 <!-- ##### FUNCTION gst_element_get_compatible_pad_filtered ##### -->
784 <!-- ##### FUNCTION gst_element_class_get_pad_template ##### -->
794 <!-- ##### FUNCTION gst_element_class_get_pad_template_list ##### -->
803 <!-- ##### FUNCTION gst_element_get_pad_template ##### -->
813 <!-- ##### FUNCTION gst_element_get_pad_template_list ##### -->
826 <!-- ##### FUNCTION gst_element_get_compatible_pad_template ##### -->
836 <!-- ##### FUNCTION gst_element_link ##### -->
846 <!-- ##### FUNCTION gst_element_link_many ##### -->
857 <!-- ##### FUNCTION gst_element_link_filtered ##### -->
868 <!-- ##### FUNCTION gst_element_unlink ##### -->
877 <!-- ##### FUNCTION gst_element_unlink_many ##### -->
887 <!-- ##### FUNCTION gst_element_link_pads ##### -->
899 <!-- ##### FUNCTION gst_element_link_pads_filtered ##### -->
912 <!-- ##### FUNCTION gst_element_unlink_pads ##### -->
923 <!-- pad manipulation -->
926 <!-- ##### FUNCTION gst_element_get_event_masks ##### -->
935 <!-- ##### FUNCTION gst_element_send_event ##### -->
945 <!-- ##### FUNCTION gst_element_seek ##### -->
956 <!-- ##### FUNCTION gst_element_get_query_types ##### -->
965 <!-- ##### FUNCTION gst_element_query ##### -->
977 <!-- ##### FUNCTION gst_element_get_formats ##### -->
986 <!-- ##### FUNCTION gst_element_convert ##### -->
999 <!-- ##### FUNCTION gst_element_found_tags ##### -->
1008 <!-- ##### FUNCTION gst_element_found_tags_for_pad ##### -->
1019 <!-- ##### FUNCTION gst_element_set_eos ##### -->
1027 <!-- ##### FUNCTION gst_element_error_full ##### -->
1042 <!-- ##### FUNCTION gst_element_is_locked_state ##### -->
1051 <!-- ##### FUNCTION gst_element_set_locked_state ##### -->
1060 <!-- ##### FUNCTION gst_element_sync_state_with_parent ##### -->
1069 <!-- ##### FUNCTION gst_element_get_state ##### -->
1078 <!-- ##### FUNCTION gst_element_set_state ##### -->
1088 <!-- ##### FUNCTION gst_element_wait_state_change ##### -->
1096 <!-- ##### FUNCTION gst_element_state_get_name ##### -->
1105 <!-- ##### FUNCTION gst_element_get_factory ##### -->
1114 <!-- ##### FUNCTION gst_element_get_managing_bin ##### -->
1125 <!-- ##### MACRO GST_TYPE_ELEMENT_FACTORY ##### -->
1132 <!-- ##### MACRO GST_ELEMENT_FACTORY ##### -->
1140 <!-- ##### MACRO GST_ELEMENT_FACTORY_CLASS ##### -->
1148 <!-- ##### MACRO GST_IS_ELEMENT_FACTORY ##### -->
1156 <!-- ##### MACRO GST_IS_ELEMENT_FACTORY_CLASS ##### -->
1164 <!-- ##### FUNCTION gst_element_factory_get_type ##### -->
1172 <!-- ##### FUNCTION gst_element_register ##### -->
1184 <!-- ##### FUNCTION gst_element_factory_find ##### -->
1193 <!-- ##### FUNCTION gst_element_factory_get_element_type ##### -->
1202 <!-- ##### FUNCTION gst_element_factory_get_longname ##### -->
1211 <!-- ##### FUNCTION gst_element_factory_get_klass ##### -->
1220 <!-- ##### FUNCTION gst_element_factory_get_description ##### -->
1229 <!-- ##### FUNCTION gst_element_factory_get_author ##### -->
1238 <!-- ##### FUNCTION gst_element_factory_get_num_pad_templates ##### -->
1247 <!-- ##### FUNCTION gst_element_factory_get_pad_templates ##### -->
1256 <!-- ##### FUNCTION gst_element_factory_get_uri_type ##### -->
1265 <!-- ##### FUNCTION gst_element_factory_get_uri_protocols ##### -->
1274 <!-- ##### FUNCTION gst_element_factory_create ##### -->
1284 <!-- ##### FUNCTION gst_element_factory_make ##### -->
1294 <!-- ##### FUNCTION gst_element_factory_can_src_caps ##### -->
1304 <!-- ##### FUNCTION gst_element_factory_can_sink_caps ##### -->
1314 <!-- ##### SIGNAL GstElement::eos ##### -->
1316 Signal emited when the element goes to PAUSED due to an end-of-stream
1320 @gstelement: the object which received the signal.
1322 <!-- ##### SIGNAL GstElement::error ##### -->
1324 This signal is emitted when an element has encountered an error that caused
1325 it to fail performing its function.
1328 @gstelement: the object which received the signal.
1329 @arg1: the original #GstElement that generated the error.
1330 @arg2: a #GError containing the translated error message.
1331 @arg3: a debug string providing additional untranslated debug information, or NULL.
1333 <!-- ##### SIGNAL GstElement::found-tag ##### -->
1338 @gstelement: the object which received the signal.
1342 <!-- ##### SIGNAL GstElement::new-pad ##### -->
1344 Is triggered whenever a new pad is added to an element.
1347 @gstelement: the object which received the signal.
1348 @arg1: the new pad that was added
1350 <!-- ##### SIGNAL GstElement::pad-removed ##### -->
1352 Is triggered whenever a pad has been removed from the element.
1355 @gstelement: the object which received the signal.
1356 @arg1: The pad that was removed.
1358 <!-- ##### SIGNAL GstElement::state-change ##### -->
1360 Is triggered whenever the state of an element changes.
1363 @gstelement: the object which received the signal.
1364 @arg1: the new state of the object