mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
d8d03b6b98
Original commit message from CVS: * docs/pwg/advanced-types.xml: Fix description for buffer-frames=0. * docs/gst/tmpl/gstbin.sgml: * gst/gstbin.c: (gst_bin_child_state_change_func), (gst_bin_change_state), (gst_bin_change_state_norecurse): * gst/gstbin.h: * testsuite/threads/Makefile.am: * testsuite/threads/threadi.c: (cb_timeout), (cb_quit), (cb_eos), (cb_state), (cb_play), (main): Fix non-recursive state changes to *really* change the state of the object, and not just call parent_class->state_change. Fix a lot of lockups caused by this. Fixes #132775. Add test for the problem. Also enable test to show #142588 (fixed). * gst/gstthread.c: (gst_thread_change_state), (gst_thread_child_state_change): Don't exit the thread if we go to NULL and are inside thread context. Instead, return control to the main thread context and exit from there. * gst/gstelement.c: (gst_element_disable_threadsafe_properties): Don't unset virtual functions, since those may still be used. That's not necessarily correct, but suffices for now. * configure.ac: * testsuite/Makefile.am: * testsuite/pad/Makefile.am: * testsuite/pad/chainnopull.c: (gst_test_sink_class_init), (gst_test_sink_base_init), (gst_test_sink_chain), (gst_test_sink_init), (main): * testsuite/pad/getnopush.c: (gst_test_src_class_init), (gst_test_src_base_init), (gst_test_src_get), (gst_test_src_init), (main): * testsuite/pad/link.c: (gst_test_element_class_init), (gst_test_element_base_init), (gst_test_src_get), (gst_test_src_loop), (gst_test_src_init), (gst_test_filter_chain), (gst_test_filter_loop), (gst_test_filter_init), (gst_test_sink_chain), (gst_test_sink_loop), (gst_test_sink_init), (cb_error), (main): Add tests to show #150546. Pass, but should fail (currently disabled from the testsuite). * gst/gstscheduler.c: (gst_scheduler_dispose): Dereference child schedulers on dispose (#94464). * testsuite/bytestream/filepadsink.c: (gst_fp_sink_init): Fix typo. * testsuite/threads/thread.c: (main): Add more debug.
254 lines
4.5 KiB
Text
254 lines
4.5 KiB
Text
<!-- ##### SECTION Title ##### -->
|
|
GstBin
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
|
Base class for elements that contain other elements
|
|
|
|
<!-- ##### 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>
|
|
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.
|
|
</para>
|
|
<para>
|
|
gst_bin_destroy() is used to destroy the bin.
|
|
</para>
|
|
<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.
|
|
Note that the default behaviour is to automatically select a clock from one of the
|
|
clock providers in the bin.
|
|
</para>
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
<!-- ##### STRUCT GstBin ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
|
|
<!-- ##### SIGNAL GstBin::element-added ##### -->
|
|
<para>
|
|
Will be emmited if a new element was removed/added to this bin.
|
|
</para>
|
|
|
|
@gstbin: the object which received the signal.
|
|
@arg1: the element that was added to the bin
|
|
|
|
<!-- ##### SIGNAL GstBin::element-removed ##### -->
|
|
<para>
|
|
Will be emmited if an element was removed from this bin.
|
|
</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.
|
|
|
|
<!-- ##### ENUM GstBinFlags ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@GST_BIN_FLAG_MANAGER:
|
|
@GST_BIN_SELF_SCHEDULABLE:
|
|
@GST_BIN_FLAG_PREFER_COTHREADS:
|
|
@GST_BIN_FLAG_FIXED_CLOCK:
|
|
@GST_BIN_STATE_LOCKED:
|
|
@GST_BIN_FLAG_LAST:
|
|
|
|
<!-- ##### FUNCTION gst_bin_new ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@name:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_add ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@bin:
|
|
@element:
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_add_many ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@bin:
|
|
@element_1:
|
|
@Varargs:
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_remove ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@bin:
|
|
@element:
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_remove_many ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@bin:
|
|
@element_1:
|
|
@Varargs:
|
|
|
|
|
|
<!-- ##### 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_get_by_interface ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@bin:
|
|
@interface:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_get_all_by_interface ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@bin:
|
|
@interface:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_iterate ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@bin:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_use_clock ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@bin:
|
|
@clock:
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_get_clock ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@bin:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_auto_clock ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@bin:
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_sync_children_state ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@bin:
|
|
@Returns:
|
|
|
|
|
|
<!-- ##### FUNCTION gst_bin_child_state_change ##### -->
|
|
<para>
|
|
|
|
</para>
|
|
|
|
@bin:
|
|
@oldstate:
|
|
@newstate:
|
|
@child:
|
|
|
|
|