mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 09:41:07 +00:00
Changed the way state is dealt with when a child is added to the bin. The note states that the COMPLETE state should...
Original commit message from CVS: Changed the way state is dealt with when a child is added to the bin. The note states that the COMPLETE state should probably reflect nothing more than whether or not there is a child in the bin, not whether or not all children are COMPLETE. I need to write out a few scenarios for complex pipeline manipulations to figure out how all the states should interact. The idea is to maintain the ability to dynamically recofigure the pipeline.
This commit is contained in:
parent
d6d5df1f9d
commit
1f05e5a957
1 changed files with 10 additions and 4 deletions
14
gst/gstbin.c
14
gst/gstbin.c
|
@ -147,11 +147,17 @@ void gst_bin_add(GstBin *bin,GstElement *element) {
|
|||
bin->numchildren++;
|
||||
gst_object_set_parent(GST_OBJECT(element),GST_OBJECT(bin));
|
||||
|
||||
if (GST_STATE_IS_SET(element,GST_STATE_COMPLETE)) {
|
||||
if (!GST_STATE_IS_SET(bin,GST_STATE_COMPLETE))
|
||||
/* FIXME: this isn't right, the bin should be complete whether or not
|
||||
the children are, I think. */
|
||||
// if (GST_STATE_IS_SET(element,GST_STATE_COMPLETE)) {
|
||||
if (!GST_STATE_IS_SET(bin,GST_STATE_COMPLETE)) {
|
||||
g_print("GstBin: adding complete element - ");
|
||||
gst_bin_change_state_norecurse(GST_ELEMENT(bin),GST_STATE_COMPLETE);
|
||||
} else
|
||||
gst_bin_change_state_norecurse(GST_ELEMENT(bin),~GST_STATE_COMPLETE);
|
||||
}
|
||||
// } else {
|
||||
// g_print("GstBin: adding element - ");
|
||||
// gst_bin_change_state_norecurse(GST_ELEMENT(bin),~GST_STATE_COMPLETE);
|
||||
// }
|
||||
|
||||
gtk_signal_emit(GTK_OBJECT(bin),gst_bin_signals[OBJECT_ADDED],element);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue