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 #GstState). 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 #GstState, 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 <!-- ##### SECTION Stability_Level ##### -->
71 <!-- ##### STRUCT GstElement ##### -->
94 <!-- ##### SIGNAL GstElement::no-more-pads ##### -->
99 @gstelement: the object which received the signal.
101 <!-- ##### SIGNAL GstElement::pad-added ##### -->
106 @gstelement: the object which received the signal.
109 <!-- ##### SIGNAL GstElement::pad-removed ##### -->
114 @gstelement: the object which received the signal.
117 <!-- ##### SIGNAL GstElement::state-changed ##### -->
122 @gstelement: the object which received the signal.
126 <!-- ##### STRUCT GstElementClass ##### -->
150 <!-- ##### ENUM GstElementFlags ##### -->
152 This enum defines the standard flags that an element may have.
155 @GST_ELEMENT_LOCKED_STATE:
156 @GST_ELEMENT_IS_SINK:
157 @GST_ELEMENT_UNPARENTING:
158 @GST_ELEMENT_FLAG_LAST:
160 <!-- ##### ENUM GstStateChange ##### -->
165 @GST_STATE_CHANGE_NULL_TO_READY:
166 @GST_STATE_CHANGE_READY_TO_PAUSED:
167 @GST_STATE_CHANGE_PAUSED_TO_PLAYING:
168 @GST_STATE_CHANGE_PLAYING_TO_PAUSED:
169 @GST_STATE_CHANGE_PAUSED_TO_READY:
170 @GST_STATE_CHANGE_READY_TO_NULL:
172 <!-- ##### MACRO GST_STATE ##### -->
174 This macro returns the current state of the element.
177 @obj: Element to return state for.
180 <!-- ##### MACRO GST_STATE_PENDING ##### -->
182 This macro returns the currently pending state of the element.
185 @obj: Element to return the pending state for.
188 <!-- ##### MACRO GST_STATE_CHANGE ##### -->
196 <!-- ##### MACRO GST_STATE_BROADCAST ##### -->
204 <!-- ##### MACRO GST_STATE_ERROR ##### -->
212 <!-- ##### MACRO GST_STATE_FINAL ##### -->
220 <!-- ##### MACRO GST_STATE_GET_COND ##### -->
228 <!-- ##### MACRO GST_STATE_GET_LOCK ##### -->
236 <!-- ##### MACRO GST_STATE_LOCK ##### -->
244 <!-- ##### MACRO GST_STATE_NO_PREROLL ##### -->
252 <!-- ##### MACRO GST_STATE_SIGNAL ##### -->
260 <!-- ##### MACRO GST_STATE_TIMED_WAIT ##### -->
269 <!-- ##### MACRO GST_STATE_TRYLOCK ##### -->
277 <!-- ##### MACRO GST_STATE_UNLOCK ##### -->
285 <!-- ##### MACRO GST_STATE_WAIT ##### -->
293 <!-- ##### MACRO GST_ELEMENT_NAME ##### -->
295 Gets the name of this element. Used in the core. Not ABI-compatible.
298 @obj: A #GstElement to query
301 <!-- ##### MACRO GST_ELEMENT_PARENT ##### -->
303 Get the parent object of this element.
306 @obj: a #GstElement to query
309 <!-- ##### MACRO GST_ELEMENT_CLOCK ##### -->
311 Get the clock of this element
314 @obj: a #GstElement to query
317 <!-- ##### MACRO GST_ELEMENT_PADS ##### -->
319 Get the pads of this elements.
322 @obj: a #GstElement to query
325 <!-- ##### MACRO GST_ELEMENT_ERROR ##### -->
335 <!-- # Unused Parameters # -->
339 <!-- ##### MACRO GST_ELEMENT_BUS ##### -->
347 <!-- ##### MACRO GST_ELEMENT_WARNING ##### -->
359 <!-- ##### MACRO GST_ELEMENT_IS_LOCKED_STATE ##### -->
367 <!-- ##### FUNCTION gst_element_abort_preroll ##### -->
376 <!-- ##### FUNCTION gst_element_abort_state ##### -->
384 <!-- ##### FUNCTION gst_element_add_pad ##### -->
394 <!-- ##### FUNCTION gst_element_class_add_pad_template ##### -->
403 <!-- ##### FUNCTION gst_element_class_get_pad_template ##### -->
413 <!-- ##### FUNCTION gst_element_class_get_pad_template_list ##### -->
422 <!-- ##### FUNCTION gst_element_class_install_std_props ##### -->
432 <!-- ##### FUNCTION gst_element_class_set_details ##### -->
441 <!-- ##### FUNCTION gst_element_commit_state ##### -->
449 <!-- ##### FUNCTION gst_element_create_all_pads ##### -->
457 <!-- ##### FUNCTION gst_element_factory_can_sink_caps ##### -->
467 <!-- ##### FUNCTION gst_element_factory_can_src_caps ##### -->
477 <!-- ##### FUNCTION gst_element_factory_get_static_pad_templates ##### -->
486 <!-- ##### FUNCTION gst_element_finish_preroll ##### -->
496 <!-- ##### FUNCTION gst_element_found_tags ##### -->
505 <!-- ##### FUNCTION gst_element_found_tags_for_pad ##### -->
515 <!-- ##### FUNCTION gst_element_get_base_time ##### -->
524 <!-- ##### FUNCTION gst_element_get_bus ##### -->
533 <!-- ##### FUNCTION gst_element_get_clock ##### -->
542 <!-- ##### FUNCTION gst_element_get_compatible_pad ##### -->
553 <!-- ##### FUNCTION gst_element_get_compatible_pad_template ##### -->
563 <!-- ##### FUNCTION gst_element_get_factory ##### -->
572 <!-- ##### FUNCTION gst_element_get_index ##### -->
581 <!-- ##### MACRO gst_element_get_name ##### -->
583 Gets the name of the element.
587 @Returns: the name of the element.
593 <!-- ##### FUNCTION gst_element_get_pad ##### -->
600 @Returns: GList of #GstPads
603 <!-- ##### MACRO gst_element_get_parent ##### -->
605 Gets the parent of an element.
608 @elem: a #GstElement to get the parent of.
609 @Returns: the #GstObject parent of the element.
612 <!-- ##### FUNCTION gst_element_get_query_types ##### -->
621 <!-- ##### FUNCTION gst_element_get_request_pad ##### -->
631 <!-- ##### FUNCTION gst_element_get_state ##### -->
643 <!-- ##### FUNCTION gst_element_get_static_pad ##### -->
653 <!-- ##### FUNCTION gst_element_is_indexable ##### -->
662 <!-- ##### FUNCTION gst_element_is_locked_state ##### -->
671 <!-- ##### FUNCTION gst_element_iterate_pads ##### -->
680 <!-- ##### FUNCTION gst_element_iterate_sink_pads ##### -->
689 <!-- ##### FUNCTION gst_element_iterate_src_pads ##### -->
698 <!-- ##### FUNCTION gst_element_link ##### -->
708 <!-- ##### FUNCTION gst_element_link_many ##### -->
719 <!-- ##### FUNCTION gst_element_link_filtered ##### -->
730 <!-- ##### FUNCTION gst_element_link_pads ##### -->
742 <!-- ##### FUNCTION gst_element_link_pads_filtered ##### -->
755 <!-- ##### FUNCTION gst_element_lost_state ##### -->
763 <!-- ##### FUNCTION gst_element_message_full ##### -->
779 <!-- ##### FUNCTION gst_element_no_more_pads ##### -->
787 <!-- ##### FUNCTION gst_element_post_message ##### -->
797 <!-- ##### FUNCTION gst_element_provides_clock ##### -->
806 <!-- ##### FUNCTION gst_element_query ##### -->
814 <!-- # Unused Parameters # -->
820 <!-- ##### FUNCTION gst_element_query_convert ##### -->
833 <!-- ##### FUNCTION gst_element_query_position ##### -->
845 <!-- ##### FUNCTION gst_element_release_request_pad ##### -->
854 <!-- ##### FUNCTION gst_element_remove_pad ##### -->
864 <!-- ##### FUNCTION gst_element_requires_clock ##### -->
873 <!-- ##### FUNCTION gst_element_seek ##### -->
887 <!-- # Unused Parameters # -->
892 <!-- ##### FUNCTION gst_element_send_event ##### -->
902 <!-- ##### FUNCTION gst_element_set_base_time ##### -->
911 <!-- ##### FUNCTION gst_element_set_bus ##### -->
920 <!-- ##### FUNCTION gst_element_set_clock ##### -->
929 <!-- ##### FUNCTION gst_element_set_index ##### -->
938 <!-- ##### FUNCTION gst_element_set_locked_state ##### -->
948 <!-- ##### MACRO gst_element_set_name ##### -->
950 Sets the name of the element, getting rid of the old name if there was one.
953 @elem: a #GstElement to set the name of.
954 @name: the new name of the element.
957 <!-- ##### MACRO gst_element_set_parent ##### -->
959 Sets the parent of an element.
962 @elem: a #GstElement to set the parent of.
963 @parent: the new #GstObject parent of the object.
966 <!-- ##### FUNCTION gst_element_set_state ##### -->
976 <!-- ##### FUNCTION gst_element_state_get_name ##### -->
985 <!-- ##### FUNCTION gst_element_sync_state_with_parent ##### -->
994 <!-- ##### FUNCTION gst_element_unlink ##### -->
1003 <!-- ##### FUNCTION gst_element_unlink_many ##### -->
1013 <!-- ##### FUNCTION gst_element_unlink_pads ##### -->
1024 <!-- pad manipulation -->