internal bus for handling child messages
the list of children in this bin
updated whenever @children changes
the bin needs to select a new clock
the element that provided @provided_clock
queued and cached messages
the number of children in this bin
the bin is currently calculating its state
the last clock selected
the bin needs to recalculate its state (deprecated)
#GstBin is an element that can contain other #GstElement, allowing them to be managed as a group. Pads from the child elements can be ghosted to the bin, see #GstGhostPad. This makes the bin look like any other elements and enables creation of higher-level abstraction elements.
A new #GstBin is created with gst.bin.Bin.new_. Use a #GstPipeline instead if you want to create a toplevel bin because a normal bin doesn't have a bus or handle clock distribution of its own.
After the bin has been created you will typically add elements to it with gst.bin.Bin.add. You can remove elements with gst.bin.Bin.remove.
An element can be retrieved from a bin with gst.bin.Bin.getByName, using the elements name. gst.bin.Bin.getByNameRecurseUp is mainly used for internal purposes and will query the parent bins when the element is not found in the current bin.
An iterator of elements in a bin can be retrieved with gst.bin.Bin.iterateElements. Various other iterators exist to retrieve the elements in a bin.
gst.object.ObjectGst.unref is used to drop your reference to the bin.
The #GstBin::element-added signal is fired whenever a new element is added to the bin. Likewise the #GstBin::element-removed signal is fired whenever an element is removed from the bin.
A #GstBin internally intercepts every #GstMessage posted by its children and implements the following default behaviour for each of them:
state. If all sinks posted the EOS message, this bin will post and EOS message upwards.
Note that these messages can be posted before the bin is prerolled, in which case the duration query might fail.
Note also that there might be a discrepancy (due to internal buffering/queueing) between the stream being currently displayed and the returned duration query.
Applications might want to also query for duration (and changes) by listening to the gst.types.MessageType.StreamStart message, signaling the active start of a (new) stream.
The default bin behaviour is to check if the lost clock was the one provided by the bin. If so and the bin is currently in the PLAYING state, the message is forwarded to the bin parent.
This message is also generated when a clock provider is removed from the bin. If this message is received by the application, it should PAUSE the pipeline and set it back to PLAYING to force a new clock distribution.
The default behaviour of the bin is to mark the currently selected clock as dirty, which will perform a clock recalculation the next time the bin is asked to provide a clock.
This message is never sent to the application but is forwarded to the parent of the bin.
A #GstBin implements the following default behaviour for answering to a #GstQuery:
A #GstBin will by default forward any event sent to it to all sink ( gst.types.EventTypeFlags.Upstream ) or source ( gst.types.EventTypeFlags.Downstream ) elements depending on the event type.
If all the elements return true, the bin will also return true, else false is returned. If no elements of the required type are in the bin, the event handler will return true.