2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
GstBin
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
|
|
|
Base container element
|
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
|
|
|
GstBin is the simplest of the container elements, allowing elements to
|
|
|
|
become children of itself. Pads from the child elements can be ghosted to
|
|
|
|
the bin, making the bin itself look transparently like any other element,
|
|
|
|
allowing for deep nesting of predefined sub-pipelines.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
A new GstBin is created with gst_bin_new(). Use a #GstPipeline instead if you want
|
|
|
|
to create a toplevel bin because a normal bin doesn't have a scheduler of its
|
|
|
|
own.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
After the bin has been created you will typically add elements to it with
|
|
|
|
gst_bin_add(). You can remove elements with gst_bin_remove().
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
An element can be retrieved from a bin with gst_bin_get_by_name(), using the
|
|
|
|
elements name. gst_bin_get_by_name_recurse_up() is mainly used for internal
|
|
|
|
purposes and will query the parent bins when the element is not found in the
|
|
|
|
current bin.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The list of elements in a bin can be retrieved with gst_bin_get_list().
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
After the bin has been set to the PLAYING state (with gst_element_set_state()),
|
|
|
|
gst_bin_iterate() is used to process the elements in the bin.
|
|
|
|
</para>
|
|
|
|
<para>
|
2003-01-02 18:56:09 +00:00
|
|
|
The "element_added" signal is fired whenever a new element is added to the bin.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The "element_removed" signal is fired whenever an element is removed from the bin.
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
gst_bin_destroy() is used to destroy the bin.
|
|
|
|
</para>
|
2002-06-12 22:27:18 +00:00
|
|
|
<para>
|
|
|
|
To control the selection of the clock in a bin, you can use the following methods:
|
|
|
|
gst_bin_auto_clock() to let the bin select a clock automatically, gst_bin_get_clock() to
|
|
|
|
get the current clock of the bin and gst_bin_use_clock() to specify a clock explicitly.
|
2002-12-19 20:38:51 +00:00
|
|
|
Note that the default behaviour is to automatically select a clock from one of the
|
|
|
|
clock providers in the bin.
|
2002-06-12 22:27:18 +00:00
|
|
|
</para>
|
2002-01-15 00:41:22 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### ENUM GstBinFlags ##### -->
|
|
|
|
<para>
|
|
|
|
Flags for a bin.
|
|
|
|
</para>
|
|
|
|
|
2002-07-12 23:21:20 +00:00
|
|
|
@GST_BIN_FLAG_MANAGER: This bin has a scheduler and can be used as a toplevel bin.
|
|
|
|
@GST_BIN_SELF_SCHEDULABLE: This bin iterates itself, so no calls to gst_bin_iterate() should be made.
|
|
|
|
@GST_BIN_FLAG_PREFER_COTHREADS: This bin preferes to have its elements scheduled with cothreads
|
|
|
|
@GST_BIN_FLAG_FIXED_CLOCK: This bin uses a fixed clock, possibly the one set with gst_bin_use_clock().
|
2002-01-15 00:41:22 +00:00
|
|
|
@GST_BIN_FLAG_LAST:
|
|
|
|
|
|
|
|
<!-- ##### STRUCT GstBin ##### -->
|
|
|
|
<para>
|
2002-12-14 13:02:16 +00:00
|
|
|
The GstBin object
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
<!-- ##### USER_FUNCTION GstBinPrePostIterateFunction ##### -->
|
|
|
|
<para>
|
|
|
|
The signature of the callback for the post and pre iterate function as set with
|
|
|
|
gst_bin_set_pre_iterate_function() and gst_bin_set_post_iterate_function().
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin: The bin that performed the callback
|
2002-12-19 20:38:51 +00:00
|
|
|
@user_data: user data
|
2002-06-12 22:27:18 +00:00
|
|
|
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### FUNCTION gst_bin_new ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@name:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_add ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@element:
|
|
|
|
|
|
|
|
|
2002-03-31 14:00:33 +00:00
|
|
|
<!-- ##### FUNCTION gst_bin_add_many ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@element_1:
|
|
|
|
@Varargs:
|
|
|
|
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### FUNCTION gst_bin_remove ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@element:
|
|
|
|
|
|
|
|
|
2003-02-11 20:38:41 +00:00
|
|
|
<!-- ##### FUNCTION gst_bin_remove_many ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@element_1:
|
|
|
|
@Varargs:
|
|
|
|
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### FUNCTION gst_bin_get_by_name ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@name:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_get_by_name_recurse_up ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@name:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_get_list ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_iterate ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
<!-- ##### FUNCTION gst_bin_set_post_iterate_function ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@func:
|
2002-12-19 20:38:51 +00:00
|
|
|
@user_data:
|
2002-06-12 22:27:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_set_pre_iterate_function ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@func:
|
2002-12-19 20:38:51 +00:00
|
|
|
@user_data:
|
2002-06-12 22:27:18 +00:00
|
|
|
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### FUNCTION gst_bin_child_state_change ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@oldstate:
|
|
|
|
@newstate:
|
|
|
|
@child:
|
|
|
|
|
|
|
|
|
2002-03-31 14:00:33 +00:00
|
|
|
<!-- ##### FUNCTION gst_bin_auto_clock ##### -->
|
2002-01-15 00:41:22 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
2002-03-31 14:00:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_get_clock ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_use_clock ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@bin:
|
|
|
|
@clock:
|
2002-01-15 00:41:22 +00:00
|
|
|
|
|
|
|
|
2004-02-06 16:25:31 +00:00
|
|
|
<!-- ##### SIGNAL GstBin::element-added ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@gstbin: the object which received the signal.
|
|
|
|
@arg1: the element that was added to the bin
|
|
|
|
|
|
|
|
<!-- ##### SIGNAL GstBin::element-removed ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@gstbin: the object which received the signal.
|
|
|
|
@arg1: the element that was removed from the bin
|
|
|
|
|
|
|
|
<!-- ##### SIGNAL GstBin::iterate ##### -->
|
|
|
|
<para>
|
|
|
|
This signal is emitted when a bin iterates, either automatically or
|
|
|
|
due to a #gst_bin_iterate() call. The return value is used to
|
|
|
|
determine if the object method handler processed any data.
|
|
|
|
In most normal cases, a user-provided signal handler should return
|
|
|
|
FALSE.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@gstbin: the object which received the signal.
|
|
|
|
@Returns: TRUE if the state of the bin was advanced.
|
|
|
|
|