# GstBin

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_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_add. You can remove elements with gst_bin_remove.

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.

An iterator of elements in a bin can be retrieved with gst_bin_iterate_elements. Various other iterators exist to retrieve the elements in a bin.

gst_object_unref is used to drop your reference to the bin.

The element-added signal is fired whenever a new element is added to the bin. Likewise the 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:

- GST_MESSAGE_EOS: This message is only posted by sinks in the PLAYING state. If all sinks posted the EOS message, this bin will post and EOS message upwards.

- GST_MESSAGE_SEGMENT_START: Just collected and never forwarded upwards. The messages are used to decide when all elements have completed playback of their segment.

- GST_MESSAGE_SEGMENT_DONE: Is posted by GstBin when all elements that posted a SEGMENT_START have posted a SEGMENT_DONE.

- GST_MESSAGE_DURATION_CHANGED: Is posted by an element that detected a change in the stream duration. The duration change is posted to the application so that it can refetch the new duration with a duration query.

  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_MESSAGE_STREAM_START message, signaling the active start of a (new) stream.

- GST_MESSAGE_CLOCK_LOST: This message is posted by an element when it can no longer provide a clock.

  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.

- GST_MESSAGE_CLOCK_PROVIDE: This message is generated when an element can provide a clock. This mostly happens when a new clock provider is added to the bin.

  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.

- OTHERS: posted upwards.

A GstBin implements the following default behaviour for answering to a GstQuery:

- GST_QUERY_DURATION: The bin will forward the query to all sink elements contained within and will return the maximum value. If no sinks are available in the bin, the query fails.

- GST_QUERY_POSITION: The query is sent to all sink elements in the bin and the MAXIMUM of all values is returned. If no sinks are available in the bin, the query fails.

- OTHERS: the query is forwarded to all sink elements, the result of the first sink that answers the query successfully is returned. If no sink is in the bin, the query fails.

A GstBin will by default forward any event sent to it to all sink ( GST_EVENT_TYPE_DOWNSTREAM ) or source ( GST_EVENT_TYPE_UPSTREAM ) 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.

## GstBin

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstBin
                        ╰──GstPipeline

The GstBin base class. Subclasses can access these fields provided the LOCK is taken.

### Members

`element` (GstElement) –
No description available
`numchildren` (gint) –

the number of children in this bin

`children` (GList *) –

the list of children in this bin

`children_cookie` (guint32) –

updated whenever children changes

`child_bus` (GstBus *) –

internal bus for handling child messages

`messages` (GList *) –

queued and cached messages

`polling` (gboolean) –

the bin is currently calculating its state

`state_dirty` (gboolean) –

the bin needs to recalculate its state (deprecated)

`clock_dirty` (gboolean) –

the bin needs to select a new clock

`provided_clock` (GstClock *) –

the last clock selected

`clock_provider` (GstElement *) –

the element that provided provided_clock

### Class structure

#### GstBinClass

Subclasses can override add_element and remove_element to update the list of children in the bin.

The handle_message method can be overridden to implement custom message handling.

deep_element_added will be called when a new element has been added to any bin inside this bin, so it will also be called if a new child was added to a sub-bin of this bin. GstBin implementations that override this message should chain up to the parent class implementation so the deep-element-added signal is emitted on all parents.

##### Fields

`parent_class` (GstElementClass) –

bin parent class

### Gst.BinClass

Subclasses can override vfunc_add_element and vfunc_remove_element to update the list of children in the bin.

The vfunc_handle_message method can be overridden to implement custom message handling.

vfunc_deep_element_added will be called when a new element has been added to any bin inside this bin, so it will also be called if a new child was added to a sub-bin of this bin. Gst.Bin implementations that override this message should chain up to the parent class implementation so the deep-element-added signal is emitted on all parents.

##### Attributes

`parent_class` (Gst.ElementClass) –

bin parent class

### Gst.BinClass

Subclasses can override do_add_element and do_remove_element to update the list of children in the bin.

The do_handle_message method can be overridden to implement custom message handling.

do_deep_element_added will be called when a new element has been added to any bin inside this bin, so it will also be called if a new child was added to a sub-bin of this bin. Gst.Bin implementations that override this message should chain up to the parent class implementation so the deep-element-added signal is emitted on all parents.

##### Attributes

`parent_class` (Gst.ElementClass) –

bin parent class

## Gst.Bin

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Element
                    ╰──Gst.Bin
                        ╰──Gst.Pipeline

The GstBin base class. Subclasses can access these fields provided the LOCK is taken.

### Members

`element` (Gst.Element) –
No description available
`numchildren` (Number) –

the number of children in this bin

`children` ([ Gst.Element ]) –

the list of children in this bin

`children_cookie` (Number) –

updated whenever children changes

`child_bus` (Gst.Bus) –

internal bus for handling child messages

`messages` ([ Gst.Message ]) –

queued and cached messages

`polling` (Number) –

the bin is currently calculating its state

`state_dirty` (Number) –

the bin needs to recalculate its state (deprecated)

`clock_dirty` (Number) –

the bin needs to select a new clock

`provided_clock` (Gst.Clock) –

the last clock selected

`clock_provider` (Gst.Element) –

the element that provided provided_clock

## Gst.Bin

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Element
                    ╰──Gst.Bin
                        ╰──Gst.Pipeline

The GstBin base class. Subclasses can access these fields provided the LOCK is taken.

### Members

`element` (Gst.Element) –
No description available
`numchildren` (int) –

the number of children in this bin

`children` ([ Gst.Element ]) –

the list of children in this bin

`children_cookie` (int) –

updated whenever children changes

`child_bus` (Gst.Bus) –

internal bus for handling child messages

`messages` ([ Gst.Message ]) –

queued and cached messages

`polling` (bool) –

the bin is currently calculating its state

`state_dirty` (bool) –

the bin needs to recalculate its state (deprecated)

`clock_dirty` (bool) –

the bin needs to select a new clock

`provided_clock` (Gst.Clock) –

the last clock selected

`clock_provider` (Gst.Element) –

the element that provided provided_clock

### Constructors

#### gst_bin_new

    GstElement *
    gst_bin_new (const gchar * name)

Creates a new bin with the given name.

Parameters:

`name` ( [allow-none]) –

the name of the new bin

Returns ( [transfer: floating]) –

a new GstBin

#### Gst.Bin.prototype.new

    function Gst.Bin.prototype.new(name: String): {
        // javascript wrapper for 'gst_bin_new'
    }

Creates a new bin with the given name.

Parameters:

`name` (String) –

the name of the new bin

Returns (Gst.Element) –

a new Gst.Bin

#### Gst.Bin.new

    def Gst.Bin.new (name):
        #python wrapper for 'gst_bin_new'

Creates a new bin with the given name.

Parameters:

`name` (str) –

the name of the new bin

Returns (Gst.Element) –

a new Gst.Bin

### Methods

#### gst_bin_add

    gboolean
    gst_bin_add (GstBin * bin,
                 GstElement * element)

Adds the given element to the bin. Sets the element's parent, and thus takes ownership of the element. An element can only be added to one bin.

If the element's pads are linked to other pads, the pads will be unlinked before the element is added to the bin.

> When you add an element to an already-running pipeline, you will have to take care to set the state of the newly-added element to the desired state (usually PLAYING or PAUSED, same you set the pipeline to originally) with gst_element_set_state, or use gst_element_sync_state_with_parent. The bin or pipeline will not take care of this for you.

Parameters:

`bin` –

a GstBin

`element` ( [transfer: floating]) –

the GstElement to add

Returns –

TRUE if the element could be added, FALSE if the bin does not want to accept the element.

#### Gst.Bin.prototype.add

    function Gst.Bin.prototype.add(element: Gst.Element): {
        // javascript wrapper for 'gst_bin_add'
    }

Adds the given element to the bin. Sets the element's parent, and thus takes ownership of the element. An element can only be added to one bin.

If the element's pads are linked to other pads, the pads will be unlinked before the element is added to the bin.

> When you add an element to an already-running pipeline, you will have to take care to set the state of the newly-added element to the desired state (usually PLAYING or PAUSED, same you set the pipeline to originally) with Gst.Element.prototype.set_state, or use Gst.Element.prototype.sync_state_with_parent. The bin or pipeline will not take care of this for you.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`element` (Gst.Element) –

the Gst.Element to add

Returns (Number) –

true if the element could be added, false if the bin does not want to accept the element.

#### Gst.Bin.add

    def Gst.Bin.add (self, element):
        #python wrapper for 'gst_bin_add'

Adds the given element to the bin. Sets the element's parent, and thus takes ownership of the element. An element can only be added to one bin.

If the element's pads are linked to other pads, the pads will be unlinked before the element is added to the bin.

> When you add an element to an already-running pipeline, you will have to take care to set the state of the newly-added element to the desired state (usually PLAYING or PAUSED, same you set the pipeline to originally) with Gst.Element.set_state, or use Gst.Element.sync_state_with_parent. The bin or pipeline will not take care of this for you.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`element` (Gst.Element) –

the Gst.Element to add

Returns (bool) –

True if the element could be added, False if the bin does not want to accept the element.

#### gst_bin_add_many

    gst_bin_add_many (GstBin * bin,
                      GstElement * element_1,
                      ... ...)

Adds a NULL-terminated list of elements to a bin. This function is equivalent to calling gst_bin_add for each member of the list. The return value of each gst_bin_add is ignored.

Parameters:

`bin` –

a GstBin

`element_1` ( [transfer: floating]) –

the GstElement element to add to the bin

`...` –

additional elements to add to the bin

#### gst_bin_find_unlinked_pad

    GstPad *
    gst_bin_find_unlinked_pad (GstBin * bin,
                               GstPadDirection direction)

Recursively looks for elements with an unlinked pad of the given direction within the specified bin and returns an unlinked pad if one is found, or NULL otherwise. If a pad is found, the caller owns a reference to it and should use gst_object_unref on the pad when it is not needed any longer.

Parameters:

`bin` –

bin in which to look for elements with unlinked pads

`direction` –

whether to look for an unlinked source or sink pad

Returns ( [transfer: full][nullable]) –

unlinked pad of the given direction.

#### Gst.Bin.prototype.find_unlinked_pad

    function Gst.Bin.prototype.find_unlinked_pad(direction: Gst.PadDirection): {
        // javascript wrapper for 'gst_bin_find_unlinked_pad'
    }

Recursively looks for elements with an unlinked pad of the given direction within the specified bin and returns an unlinked pad if one is found, or null otherwise. If a pad is found, the caller owns a reference to it and should use Gst.Object.prototype.unref on the pad when it is not needed any longer.

Parameters:

`bin` (Gst.Bin) –

bin in which to look for elements with unlinked pads

`direction` (Gst.PadDirection) –

whether to look for an unlinked source or sink pad

Returns (Gst.Pad) –

unlinked pad of the given direction.

#### Gst.Bin.find_unlinked_pad

    def Gst.Bin.find_unlinked_pad (self, direction):
        #python wrapper for 'gst_bin_find_unlinked_pad'

Recursively looks for elements with an unlinked pad of the given direction within the specified bin and returns an unlinked pad if one is found, or None otherwise. If a pad is found, the caller owns a reference to it and should use Gst.Object.unref on the pad when it is not needed any longer.

Parameters:

`bin` (Gst.Bin) –

bin in which to look for elements with unlinked pads

`direction` (Gst.PadDirection) –

whether to look for an unlinked source or sink pad

Returns (Gst.Pad) –

unlinked pad of the given direction.

#### gst_bin_get_by_interface

    GstElement *
    gst_bin_get_by_interface (GstBin * bin,
                              GType iface)

Looks for an element inside the bin that implements the given interface. If such an element is found, it returns the element. You can cast this element to the given interface afterwards. If you want all elements that implement the interface, use gst_bin_iterate_all_by_interface. This function recurses into child bins.

Parameters:

`bin` –

a GstBin

`iface` –

the GType of an interface

Returns ( [transfer: full][nullable]) –

A GstElement inside the bin implementing the interface

#### Gst.Bin.prototype.get_by_interface

    function Gst.Bin.prototype.get_by_interface(iface: GObject.Type): {
        // javascript wrapper for 'gst_bin_get_by_interface'
    }

Looks for an element inside the bin that implements the given interface. If such an element is found, it returns the element. You can cast this element to the given interface afterwards. If you want all elements that implement the interface, use Gst.Bin.prototype.iterate_all_by_interface. This function recurses into child bins.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`iface` (GObject.Type) –

the GObject.Type of an interface

Returns (Gst.Element) –

A Gst.Element inside the bin implementing the interface

#### Gst.Bin.get_by_interface

    def Gst.Bin.get_by_interface (self, iface):
        #python wrapper for 'gst_bin_get_by_interface'

Looks for an element inside the bin that implements the given interface. If such an element is found, it returns the element. You can cast this element to the given interface afterwards. If you want all elements that implement the interface, use Gst.Bin.iterate_all_by_interface. This function recurses into child bins.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`iface` (GObject.Type) –

the GObject.Type of an interface

Returns (Gst.Element) –

A Gst.Element inside the bin implementing the interface

#### gst_bin_get_by_name

    GstElement *
    gst_bin_get_by_name (GstBin * bin,
                         const gchar * name)

Gets the element with the given name from a bin. This function recurses into child bins.

Parameters:

`bin` –

a GstBin

`name` –

the element name to search for

Returns ( [transfer: full][nullable]) –

the GstElement with the given name

#### Gst.Bin.prototype.get_by_name

    function Gst.Bin.prototype.get_by_name(name: String): {
        // javascript wrapper for 'gst_bin_get_by_name'
    }

Gets the element with the given name from a bin. This function recurses into child bins.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`name` (String) –

the element name to search for

Returns (Gst.Element) –

the Gst.Element with the given name

#### Gst.Bin.get_by_name

    def Gst.Bin.get_by_name (self, name):
        #python wrapper for 'gst_bin_get_by_name'

Gets the element with the given name from a bin. This function recurses into child bins.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`name` (str) –

the element name to search for

Returns (Gst.Element) –

the Gst.Element with the given name

#### gst_bin_get_by_name_recurse_up

    GstElement *
    gst_bin_get_by_name_recurse_up (GstBin * bin,
                                    const gchar * name)

Gets the element with the given name from this bin. If the element is not found, a recursion is performed on the parent bin.

Parameters:

`bin` –

a GstBin

`name` –

the element name to search for

Returns ( [transfer: full][nullable]) –

the GstElement with the given name

#### Gst.Bin.prototype.get_by_name_recurse_up

    function Gst.Bin.prototype.get_by_name_recurse_up(name: String): {
        // javascript wrapper for 'gst_bin_get_by_name_recurse_up'
    }

Gets the element with the given name from this bin. If the element is not found, a recursion is performed on the parent bin.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`name` (String) –

the element name to search for

Returns (Gst.Element) –

the Gst.Element with the given name

#### Gst.Bin.get_by_name_recurse_up

    def Gst.Bin.get_by_name_recurse_up (self, name):
        #python wrapper for 'gst_bin_get_by_name_recurse_up'

Gets the element with the given name from this bin. If the element is not found, a recursion is performed on the parent bin.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`name` (str) –

the element name to search for

Returns (Gst.Element) –

the Gst.Element with the given name

#### gst_bin_get_suppressed_flags

    GstElementFlags
    gst_bin_get_suppressed_flags (GstBin * bin)

Parameters:

`bin` –

a GstBin

Returns –

the bin's suppressed GstElementFlags.

Since : 1.10

#### Gst.Bin.prototype.get_suppressed_flags

    function Gst.Bin.prototype.get_suppressed_flags(): {
        // javascript wrapper for 'gst_bin_get_suppressed_flags'
    }

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Gst.ElementFlags) –

the bin's suppressed Gst.ElementFlags.

Since : 1.10

#### Gst.Bin.get_suppressed_flags

    def Gst.Bin.get_suppressed_flags (self):
        #python wrapper for 'gst_bin_get_suppressed_flags'

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Gst.ElementFlags) –

the bin's suppressed Gst.ElementFlags.

Since : 1.10

#### gst_bin_iterate_all_by_element_factory_name

    GstIterator *
    gst_bin_iterate_all_by_element_factory_name (GstBin * bin,
                                                 const gchar * factory_name)

Looks for all elements inside the bin with the given element factory name. The function recurses inside child bins. The iterator will yield a series of GstElement.

Parameters:

`bin` –

a GstBin

`factory_name` ( [not nullable]) –

the name of the GstElementFactory

Returns ( [transfer: full][nullable]) –

a GstIterator of GstElement for all elements in the bin with the given element factory name

Since : 1.18

#### Gst.Bin.prototype.iterate_all_by_element_factory_name

    function Gst.Bin.prototype.iterate_all_by_element_factory_name(factory_name: String): {
        // javascript wrapper for 'gst_bin_iterate_all_by_element_factory_name'
    }

Looks for all elements inside the bin with the given element factory name. The function recurses inside child bins. The iterator will yield a series of Gst.Element.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`factory_name` (String) –

the name of the Gst.ElementFactory

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element for all elements in the bin with the given element factory name

Since : 1.18

#### Gst.Bin.iterate_all_by_element_factory_name

    def Gst.Bin.iterate_all_by_element_factory_name (self, factory_name):
        #python wrapper for 'gst_bin_iterate_all_by_element_factory_name'

Looks for all elements inside the bin with the given element factory name. The function recurses inside child bins. The iterator will yield a series of Gst.Element.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`factory_name` (str) –

the name of the Gst.ElementFactory

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element for all elements in the bin with the given element factory name

Since : 1.18

#### gst_bin_iterate_all_by_interface

    GstIterator *
    gst_bin_iterate_all_by_interface (GstBin * bin,
                                      GType iface)

Looks for all elements inside the bin that implements the given interface. You can safely cast all returned elements to the given interface. The function recurses inside child bins. The iterator will yield a series of GstElement.

Parameters:

`bin` –

a GstBin

`iface` –

the GType of an interface

Returns ( [transfer: full][nullable]) –

a GstIterator of GstElement for all elements in the bin implementing the given interface

#### Gst.Bin.prototype.iterate_all_by_interface

    function Gst.Bin.prototype.iterate_all_by_interface(iface: GObject.Type): {
        // javascript wrapper for 'gst_bin_iterate_all_by_interface'
    }

Looks for all elements inside the bin that implements the given interface. You can safely cast all returned elements to the given interface. The function recurses inside child bins. The iterator will yield a series of Gst.Element.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`iface` (GObject.Type) –

the GObject.Type of an interface

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element for all elements in the bin implementing the given interface

#### Gst.Bin.iterate_all_by_interface

    def Gst.Bin.iterate_all_by_interface (self, iface):
        #python wrapper for 'gst_bin_iterate_all_by_interface'

Looks for all elements inside the bin that implements the given interface. You can safely cast all returned elements to the given interface. The function recurses inside child bins. The iterator will yield a series of Gst.Element.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`iface` (GObject.Type) –

the GObject.Type of an interface

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element for all elements in the bin implementing the given interface

#### gst_bin_iterate_elements

    GstIterator *
    gst_bin_iterate_elements (GstBin * bin)

Gets an iterator for the elements in this bin.

Parameters:

`bin` –

a GstBin

Returns ( [transfer: full][nullable]) –

a GstIterator of GstElement

#### Gst.Bin.prototype.iterate_elements

    function Gst.Bin.prototype.iterate_elements(): {
        // javascript wrapper for 'gst_bin_iterate_elements'
    }

Gets an iterator for the elements in this bin.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element

#### Gst.Bin.iterate_elements

    def Gst.Bin.iterate_elements (self):
        #python wrapper for 'gst_bin_iterate_elements'

Gets an iterator for the elements in this bin.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element

#### gst_bin_iterate_recurse

    GstIterator *
    gst_bin_iterate_recurse (GstBin * bin)

Gets an iterator for the elements in this bin. This iterator recurses into GstBin children.

Parameters:

`bin` –

a GstBin

Returns ( [transfer: full][nullable]) –

a GstIterator of GstElement

#### Gst.Bin.prototype.iterate_recurse

    function Gst.Bin.prototype.iterate_recurse(): {
        // javascript wrapper for 'gst_bin_iterate_recurse'
    }

Gets an iterator for the elements in this bin. This iterator recurses into GstBin children.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element

#### Gst.Bin.iterate_recurse

    def Gst.Bin.iterate_recurse (self):
        #python wrapper for 'gst_bin_iterate_recurse'

Gets an iterator for the elements in this bin. This iterator recurses into GstBin children.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element

#### gst_bin_iterate_sinks

    GstIterator *
    gst_bin_iterate_sinks (GstBin * bin)

Gets an iterator for all elements in the bin that have the GST_ELEMENT_FLAG_SINK flag set.

Parameters:

`bin` –

a GstBin

Returns ( [transfer: full][nullable]) –

a GstIterator of GstElement

#### Gst.Bin.prototype.iterate_sinks

    function Gst.Bin.prototype.iterate_sinks(): {
        // javascript wrapper for 'gst_bin_iterate_sinks'
    }

Gets an iterator for all elements in the bin that have the Gst.ElementFlags.SINK flag set.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element

#### Gst.Bin.iterate_sinks

    def Gst.Bin.iterate_sinks (self):
        #python wrapper for 'gst_bin_iterate_sinks'

Gets an iterator for all elements in the bin that have the Gst.ElementFlags.SINK flag set.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element

#### gst_bin_iterate_sorted

    GstIterator *
    gst_bin_iterate_sorted (GstBin * bin)

Gets an iterator for the elements in this bin in topologically sorted order. This means that the elements are returned from the most downstream elements (sinks) to the sources.

This function is used internally to perform the state changes of the bin elements and for clock selection.

Parameters:

`bin` –

a GstBin

Returns ( [transfer: full][nullable]) –

a GstIterator of GstElement

#### Gst.Bin.prototype.iterate_sorted

    function Gst.Bin.prototype.iterate_sorted(): {
        // javascript wrapper for 'gst_bin_iterate_sorted'
    }

Gets an iterator for the elements in this bin in topologically sorted order. This means that the elements are returned from the most downstream elements (sinks) to the sources.

This function is used internally to perform the state changes of the bin elements and for clock selection.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element

#### Gst.Bin.iterate_sorted

    def Gst.Bin.iterate_sorted (self):
        #python wrapper for 'gst_bin_iterate_sorted'

Gets an iterator for the elements in this bin in topologically sorted order. This means that the elements are returned from the most downstream elements (sinks) to the sources.

This function is used internally to perform the state changes of the bin elements and for clock selection.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element

#### gst_bin_iterate_sources

    GstIterator *
    gst_bin_iterate_sources (GstBin * bin)

Gets an iterator for all elements in the bin that have the GST_ELEMENT_FLAG_SOURCE flag set.

Parameters:

`bin` –

a GstBin

Returns ( [transfer: full][nullable]) –

a GstIterator of GstElement

#### Gst.Bin.prototype.iterate_sources

    function Gst.Bin.prototype.iterate_sources(): {
        // javascript wrapper for 'gst_bin_iterate_sources'
    }

Gets an iterator for all elements in the bin that have the Gst.ElementFlags.SOURCE flag set.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element

#### Gst.Bin.iterate_sources

    def Gst.Bin.iterate_sources (self):
        #python wrapper for 'gst_bin_iterate_sources'

Gets an iterator for all elements in the bin that have the Gst.ElementFlags.SOURCE flag set.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Gst.Iterator) –

a Gst.Iterator of Gst.Element

#### gst_bin_recalculate_latency

    gboolean
    gst_bin_recalculate_latency (GstBin * bin)

Queries bin for the current latency and reconfigures this latency on all the elements using a LATENCY event.

This method is typically called on the pipeline when a GST_MESSAGE_LATENCY is posted on the bus.

This function simply emits the do-latency signal so any custom latency calculations will be performed.

Parameters:

`bin` –

a GstBin

Returns –

TRUE if the latency could be queried and reconfigured.

#### Gst.Bin.prototype.recalculate_latency

    function Gst.Bin.prototype.recalculate_latency(): {
        // javascript wrapper for 'gst_bin_recalculate_latency'
    }

Queries bin for the current latency and reconfigures this latency on all the elements using a LATENCY event.

This method is typically called on the pipeline when a Gst.MessageType.LATENCY is posted on the bus.

This function simply emits the do-latency signal so any custom latency calculations will be performed.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Number) –

true if the latency could be queried and reconfigured.

#### Gst.Bin.recalculate_latency

    def Gst.Bin.recalculate_latency (self):
        #python wrapper for 'gst_bin_recalculate_latency'

Queries bin for the current latency and reconfigures this latency on all the elements using a LATENCY event.

This method is typically called on the pipeline when a Gst.MessageType.LATENCY is posted on the bus.

This function simply emits the do-latency signal so any custom latency calculations will be performed.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (bool) –

True if the latency could be queried and reconfigured.

#### gst_bin_remove

    gboolean
    gst_bin_remove (GstBin * bin,
                    GstElement * element)

Removes the element from the bin, unparenting it as well. Unparenting the element means that the element will be dereferenced, so if the bin holds the only reference to the element, the element will be freed in the process of removing it from the bin. If you want the element to still exist after removing, you need to call gst_object_ref before removing it from the bin.

If the element's pads are linked to other pads, the pads will be unlinked before the element is removed from the bin.

Parameters:

`bin` –

a GstBin

`element` ( [transfer: none]) –

the GstElement to remove

Returns –

TRUE if the element could be removed, FALSE if the bin does not want to remove the element.

#### Gst.Bin.prototype.remove

    function Gst.Bin.prototype.remove(element: Gst.Element): {
        // javascript wrapper for 'gst_bin_remove'
    }

Removes the element from the bin, unparenting it as well. Unparenting the element means that the element will be dereferenced, so if the bin holds the only reference to the element, the element will be freed in the process of removing it from the bin. If you want the element to still exist after removing, you need to call Gst.Object.prototype.ref before removing it from the bin.

If the element's pads are linked to other pads, the pads will be unlinked before the element is removed from the bin.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`element` (Gst.Element) –

the Gst.Element to remove

Returns (Number) –

true if the element could be removed, false if the bin does not want to remove the element.

#### Gst.Bin.remove

    def Gst.Bin.remove (self, element):
        #python wrapper for 'gst_bin_remove'

Removes the element from the bin, unparenting it as well. Unparenting the element means that the element will be dereferenced, so if the bin holds the only reference to the element, the element will be freed in the process of removing it from the bin. If you want the element to still exist after removing, you need to call Gst.Object.ref before removing it from the bin.

If the element's pads are linked to other pads, the pads will be unlinked before the element is removed from the bin.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`element` (Gst.Element) –

the Gst.Element to remove

Returns (bool) –

True if the element could be removed, False if the bin does not want to remove the element.

#### gst_bin_remove_many

    gst_bin_remove_many (GstBin * bin,
                         GstElement * element_1,
                         ... ...)

Removes a list of elements from a bin. This function is equivalent to calling gst_bin_remove with each member of the list.

Parameters:

`bin` –

a GstBin

`element_1` ( [transfer: none]) –

the first GstElement to remove from the bin

`...` ( [transfer: none]) –

NULL-terminated list of elements to remove from the bin

#### gst_bin_set_suppressed_flags

    gst_bin_set_suppressed_flags (GstBin * bin,
                                  GstElementFlags flags)

Suppresses the given flags on the bin. GstElementFlags of a child element are propagated when it is added to the bin. When suppressed flags are set, those specified flags will not be propagated to the bin.

Parameters:

`bin` –

a GstBin

`flags` –

the GstElementFlags to suppress

Since : 1.10

#### Gst.Bin.prototype.set_suppressed_flags

    function Gst.Bin.prototype.set_suppressed_flags(flags: Gst.ElementFlags): {
        // javascript wrapper for 'gst_bin_set_suppressed_flags'
    }

Suppresses the given flags on the bin. Gst.ElementFlags of a child element are propagated when it is added to the bin. When suppressed flags are set, those specified flags will not be propagated to the bin.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`flags` (Gst.ElementFlags) –

the Gst.ElementFlags to suppress

Since : 1.10

#### Gst.Bin.set_suppressed_flags

    def Gst.Bin.set_suppressed_flags (self, flags):
        #python wrapper for 'gst_bin_set_suppressed_flags'

Suppresses the given flags on the bin. Gst.ElementFlags of a child element are propagated when it is added to the bin. When suppressed flags are set, those specified flags will not be propagated to the bin.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

`flags` (Gst.ElementFlags) –

the Gst.ElementFlags to suppress

Since : 1.10

#### gst_bin_sync_children_states

    gboolean
    gst_bin_sync_children_states (GstBin * bin)

Synchronizes the state of every child of bin with the state of bin. See also gst_element_sync_state_with_parent.

Parameters:

`bin` –

a GstBin

Returns –

TRUE if syncing the state was successful for all children, otherwise FALSE.

Since : 1.6

#### Gst.Bin.prototype.sync_children_states

    function Gst.Bin.prototype.sync_children_states(): {
        // javascript wrapper for 'gst_bin_sync_children_states'
    }

Synchronizes the state of every child of bin with the state of bin. See also Gst.Element.prototype.sync_state_with_parent.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (Number) –

true if syncing the state was successful for all children, otherwise false.

Since : 1.6

#### Gst.Bin.sync_children_states

    def Gst.Bin.sync_children_states (self):
        #python wrapper for 'gst_bin_sync_children_states'

Synchronizes the state of every child of bin with the state of bin. See also Gst.Element.sync_state_with_parent.

Parameters:

`bin` (Gst.Bin) –

a Gst.Bin

Returns (bool) –

True if syncing the state was successful for all children, otherwise False.

Since : 1.6

### Signals

#### deep-element-added

    deep_element_added_callback (GstBin * self,
                                 GstBin * sub_bin,
                                 GstElement * element,
                                 gpointer user_data)

Will be emitted after the element was added to sub_bin.

Parameters:

`self` –

the GstBin

`sub_bin` –

the GstBin the element was added to

`element` –

the GstElement that was added to sub_bin

`user_data` –
No description available

Flags: Run First

Since : 1.10

#### deep-element-added

    function deep_element_added_callback(self: Gst.Bin, sub_bin: Gst.Bin, element: Gst.Element, user_data: Object): {
        // javascript callback for the 'deep-element-added' signal
    }

Will be emitted after the element was added to sub_bin.

Parameters:

`self` (Gst.Bin) –

the Gst.Bin

`sub_bin` (Gst.Bin) –

the Gst.Bin the element was added to

`element` (Gst.Element) –

the Gst.Element that was added to sub_bin

`user_data` (Object) –
No description available

Flags: Run First

Since : 1.10

#### deep-element-added

    def deep_element_added_callback (self, sub_bin, element, *user_data):
        #python callback for the 'deep-element-added' signal

Will be emitted after the element was added to sub_bin.

Parameters:

`self` (Gst.Bin) –

the Gst.Bin

`sub_bin` (Gst.Bin) –

the Gst.Bin the element was added to

`element` (Gst.Element) –

the Gst.Element that was added to sub_bin

`user_data` (variadic) –
No description available

Flags: Run First

Since : 1.10

#### deep-element-removed

    deep_element_removed_callback (GstBin * self,
                                   GstBin * sub_bin,
                                   GstElement * element,
                                   gpointer user_data)

Will be emitted after the element was removed from sub_bin.

Parameters:

`self` –

the GstBin

`sub_bin` –

the GstBin the element was removed from

`element` –

the GstElement that was removed from sub_bin

`user_data` –
No description available

Flags: Run First

Since : 1.10

#### deep-element-removed

    function deep_element_removed_callback(self: Gst.Bin, sub_bin: Gst.Bin, element: Gst.Element, user_data: Object): {
        // javascript callback for the 'deep-element-removed' signal
    }

Will be emitted after the element was removed from sub_bin.

Parameters:

`self` (Gst.Bin) –

the Gst.Bin

`sub_bin` (Gst.Bin) –

the Gst.Bin the element was removed from

`element` (Gst.Element) –

the Gst.Element that was removed from sub_bin

`user_data` (Object) –
No description available

Flags: Run First

Since : 1.10

#### deep-element-removed

    def deep_element_removed_callback (self, sub_bin, element, *user_data):
        #python callback for the 'deep-element-removed' signal

Will be emitted after the element was removed from sub_bin.

Parameters:

`self` (Gst.Bin) –

the Gst.Bin

`sub_bin` (Gst.Bin) –

the Gst.Bin the element was removed from

`element` (Gst.Element) –

the Gst.Element that was removed from sub_bin

`user_data` (variadic) –
No description available

Flags: Run First

Since : 1.10

#### do-latency

    gboolean
    do_latency_callback (GstBin * self,
                         gpointer user_data)

Will be emitted when the bin needs to perform latency calculations. This signal is only emitted for toplevel bins or when async-handling is enabled.

Only one signal handler is invoked. If no signals are connected, the default handler is invoked, which will query and distribute the lowest possible latency to all sinks.

Connect to this signal if the default latency calculations are not sufficient, like when you need different latencies for different sinks in the same pipeline.

Parameters:

`self` –

the GstBin

`user_data` –
No description available
Returns –
No description available

Flags: Run Last

#### do-latency

    function do_latency_callback(self: Gst.Bin, user_data: Object): {
        // javascript callback for the 'do-latency' signal
    }

Will be emitted when the bin needs to perform latency calculations. This signal is only emitted for toplevel bins or when async-handling is enabled.

Only one signal handler is invoked. If no signals are connected, the default handler is invoked, which will query and distribute the lowest possible latency to all sinks.

Connect to this signal if the default latency calculations are not sufficient, like when you need different latencies for different sinks in the same pipeline.

Parameters:

`self` (Gst.Bin) –

the Gst.Bin

`user_data` (Object) –
No description available
Returns (Number) –
No description available

Flags: Run Last

#### do-latency

    def do_latency_callback (self, *user_data):
        #python callback for the 'do-latency' signal

Will be emitted when the bin needs to perform latency calculations. This signal is only emitted for toplevel bins or when async_handling is enabled.

Only one signal handler is invoked. If no signals are connected, the default handler is invoked, which will query and distribute the lowest possible latency to all sinks.

Connect to this signal if the default latency calculations are not sufficient, like when you need different latencies for different sinks in the same pipeline.

Parameters:

`self` (Gst.Bin) –

the Gst.Bin

`user_data` (variadic) –
No description available
Returns (bool) –
No description available

Flags: Run Last

#### element-added

    element_added_callback (GstBin * self,
                            GstElement * element,
                            gpointer user_data)

Will be emitted after the element was added to the bin.

Parameters:

`self` –

the GstBin

`element` –

the GstElement that was added to the bin

`user_data` –
No description available

Flags: Run First

#### element-added

    function element_added_callback(self: Gst.Bin, element: Gst.Element, user_data: Object): {
        // javascript callback for the 'element-added' signal
    }

Will be emitted after the element was added to the bin.

Parameters:

`self` (Gst.Bin) –

the Gst.Bin

`element` (Gst.Element) –

the Gst.Element that was added to the bin

`user_data` (Object) –
No description available

Flags: Run First

#### element-added

    def element_added_callback (self, element, *user_data):
        #python callback for the 'element-added' signal

Will be emitted after the element was added to the bin.

Parameters:

`self` (Gst.Bin) –

the Gst.Bin

`element` (Gst.Element) –

the Gst.Element that was added to the bin

`user_data` (variadic) –
No description available

Flags: Run First

#### element-removed

    element_removed_callback (GstBin * self,
                              GstElement * element,
                              gpointer user_data)

Will be emitted after the element was removed from the bin.

Parameters:

`self` –

the GstBin

`element` –

the GstElement that was removed from the bin

`user_data` –
No description available

Flags: Run First

#### element-removed

    function element_removed_callback(self: Gst.Bin, element: Gst.Element, user_data: Object): {
        // javascript callback for the 'element-removed' signal
    }

Will be emitted after the element was removed from the bin.

Parameters:

`self` (Gst.Bin) –

the Gst.Bin

`element` (Gst.Element) –

the Gst.Element that was removed from the bin

`user_data` (Object) –
No description available

Flags: Run First

#### element-removed

    def element_removed_callback (self, element, *user_data):
        #python callback for the 'element-removed' signal

Will be emitted after the element was removed from the bin.

Parameters:

`self` (Gst.Bin) –

the Gst.Bin

`element` (Gst.Element) –

the Gst.Element that was removed from the bin

`user_data` (variadic) –
No description available

Flags: Run First

### Properties

#### async-handling

    “async-handling” gboolean

If set to TRUE, the bin will handle asynchronous state changes. This should be used only if the bin subclass is modifying the state of its children on its own.

Flags : Read / Write

#### async-handling

    “async-handling” Number

If set to true, the bin will handle asynchronous state changes. This should be used only if the bin subclass is modifying the state of its children on its own.

Flags : Read / Write

#### async_handling

    “self.props.async_handling” bool

If set to True, the bin will handle asynchronous state changes. This should be used only if the bin subclass is modifying the state of its children on its own.

Flags : Read / Write

#### message-forward

    “message-forward” gboolean

Forward all children messages, even those that would normally be filtered by the bin. This can be interesting when one wants to be notified of the EOS state of individual elements, for example.

The messages are converted to an ELEMENT message with the bin as the source. The structure of the message is named `GstBinForwarded` and contains a field named `message` that contains the original forwarded GstMessage.

Flags : Read / Write

#### message-forward

    “message-forward” Number

Forward all children messages, even those that would normally be filtered by the bin. This can be interesting when one wants to be notified of the EOS state of individual elements, for example.

The messages are converted to an ELEMENT message with the bin as the source. The structure of the message is named `GstBinForwarded` and contains a field named `message` that contains the original forwarded Gst.Message.

Flags : Read / Write

#### message_forward

    “self.props.message_forward” bool

Forward all children messages, even those that would normally be filtered by the bin. This can be interesting when one wants to be notified of the EOS state of individual elements, for example.

The messages are converted to an ELEMENT message with the bin as the source. The structure of the message is named `GstBinForwarded` and contains a field named `message` that contains the original forwarded Gst.Message.

Flags : Read / Write

### Virtual Methods

#### add_element

    gboolean
    add_element (GstBin * bin,
                 GstElement * element)

Method to add an element to the bin.

Parameters:

`bin` –

the GstBin

`element` –

the element to be added

Returns –

TRUE if the element was added

#### vfunc_add_element

    function vfunc_add_element(bin: Gst.Bin, element: Gst.Element): {
        // javascript implementation of the 'add_element' virtual method
    }

Method to add an element to the bin.

Parameters:

`bin` (Gst.Bin) –

the Gst.Bin

`element` (Gst.Element) –

the element to be added

Returns (Number) –

true if the element was added

#### do_add_element

    def do_add_element (bin, element):
        #python implementation of the 'add_element' virtual method

Method to add an element to the bin.

Parameters:

`bin` (Gst.Bin) –

the Gst.Bin

`element` (Gst.Element) –

the element to be added

Returns (bool) –

True if the element was added

#### deep_element_added

    deep_element_added (GstBin * bin,
                        GstBin * sub_bin,
                        GstElement * child)

Method called when an element was added somewhere in the bin hierarchy.

Parameters:

`bin` –

the top level GstBin

`sub_bin` –

the GstBin to which the element was added

`child` –

the element that was added

#### vfunc_deep_element_added

    function vfunc_deep_element_added(bin: Gst.Bin, sub_bin: Gst.Bin, child: Gst.Element): {
        // javascript implementation of the 'deep_element_added' virtual method
    }

Method called when an element was added somewhere in the bin hierarchy.

Parameters:

`bin` (Gst.Bin) –

the top level Gst.Bin

`sub_bin` (Gst.Bin) –

the Gst.Bin to which the element was added

`child` (Gst.Element) –

the element that was added

#### do_deep_element_added

    def do_deep_element_added (bin, sub_bin, child):
        #python implementation of the 'deep_element_added' virtual method

Method called when an element was added somewhere in the bin hierarchy.

Parameters:

`bin` (Gst.Bin) –

the top level Gst.Bin

`sub_bin` (Gst.Bin) –

the Gst.Bin to which the element was added

`child` (Gst.Element) –

the element that was added

#### deep_element_removed

    deep_element_removed (GstBin * bin,
                          GstBin * sub_bin,
                          GstElement * child)

Method called when an element was removed somewhere in the bin hierarchy.

Parameters:

`bin` –

the top level GstBin

`sub_bin` –

the GstBin from which the element was removed

`child` –

the element that was removed

#### vfunc_deep_element_removed

    function vfunc_deep_element_removed(bin: Gst.Bin, sub_bin: Gst.Bin, child: Gst.Element): {
        // javascript implementation of the 'deep_element_removed' virtual method
    }

Method called when an element was removed somewhere in the bin hierarchy.

Parameters:

`bin` (Gst.Bin) –

the top level Gst.Bin

`sub_bin` (Gst.Bin) –

the Gst.Bin from which the element was removed

`child` (Gst.Element) –

the element that was removed

#### do_deep_element_removed

    def do_deep_element_removed (bin, sub_bin, child):
        #python implementation of the 'deep_element_removed' virtual method

Method called when an element was removed somewhere in the bin hierarchy.

Parameters:

`bin` (Gst.Bin) –

the top level Gst.Bin

`sub_bin` (Gst.Bin) –

the Gst.Bin from which the element was removed

`child` (Gst.Element) –

the element that was removed

#### do_latency

    gboolean
    do_latency (GstBin * bin)

Parameters:

`bin` –
No description available
Returns –
No description available

#### vfunc_do_latency

    function vfunc_do_latency(bin: Gst.Bin): {
        // javascript implementation of the 'do_latency' virtual method
    }

Parameters:

`bin` (Gst.Bin) –
No description available
Returns (Number) –
No description available

#### do_do_latency

    def do_do_latency (bin):
        #python implementation of the 'do_latency' virtual method

Parameters:

`bin` (Gst.Bin) –
No description available
Returns (bool) –
No description available

#### element_added

    element_added (GstBin * bin,
                   GstElement * child)

Method called when an element was added to the bin.

Parameters:

`bin` –

the GstBin

`child` –

the element that was added

#### vfunc_element_added

    function vfunc_element_added(bin: Gst.Bin, child: Gst.Element): {
        // javascript implementation of the 'element_added' virtual method
    }

Method called when an element was added to the bin.

Parameters:

`bin` (Gst.Bin) –

the Gst.Bin

`child` (Gst.Element) –

the element that was added

#### do_element_added

    def do_element_added (bin, child):
        #python implementation of the 'element_added' virtual method

Method called when an element was added to the bin.

Parameters:

`bin` (Gst.Bin) –

the Gst.Bin

`child` (Gst.Element) –

the element that was added

#### element_removed

    element_removed (GstBin * bin,
                     GstElement * child)

Method called when an element was removed from the bin.

Parameters:

`bin` –

the GstBin

`child` –

the element that was removed

#### vfunc_element_removed

    function vfunc_element_removed(bin: Gst.Bin, child: Gst.Element): {
        // javascript implementation of the 'element_removed' virtual method
    }

Method called when an element was removed from the bin.

Parameters:

`bin` (Gst.Bin) –

the Gst.Bin

`child` (Gst.Element) –

the element that was removed

#### do_element_removed

    def do_element_removed (bin, child):
        #python implementation of the 'element_removed' virtual method

Method called when an element was removed from the bin.

Parameters:

`bin` (Gst.Bin) –

the Gst.Bin

`child` (Gst.Element) –

the element that was removed

#### handle_message

    handle_message (GstBin * bin,
                    GstMessage * message)

Method to handle a message from the children.

Parameters:

`bin` –

the GstBin

`message` ( [transfer: full]) –

the message to be handled

#### vfunc_handle_message

    function vfunc_handle_message(bin: Gst.Bin, message: Gst.Message): {
        // javascript implementation of the 'handle_message' virtual method
    }

Method to handle a message from the children.

Parameters:

`bin` (Gst.Bin) –

the Gst.Bin

`message` (Gst.Message) –

the message to be handled

#### do_handle_message

    def do_handle_message (bin, message):
        #python implementation of the 'handle_message' virtual method

Method to handle a message from the children.

Parameters:

`bin` (Gst.Bin) –

the Gst.Bin

`message` (Gst.Message) –

the message to be handled

#### remove_element

    gboolean
    remove_element (GstBin * bin,
                    GstElement * element)

Method to remove an element from the bin.

Parameters:

`bin` –

the GstBin

`element` –

the element to be removed

Returns –

TRUE if the element was removed

#### vfunc_remove_element

    function vfunc_remove_element(bin: Gst.Bin, element: Gst.Element): {
        // javascript implementation of the 'remove_element' virtual method
    }

Method to remove an element from the bin.

Parameters:

`bin` (Gst.Bin) –

the Gst.Bin

`element` (Gst.Element) –

the element to be removed

Returns (Number) –

true if the element was removed

#### do_remove_element

    def do_remove_element (bin, element):
        #python implementation of the 'remove_element' virtual method

Method to remove an element from the bin.

Parameters:

`bin` (Gst.Bin) –

the Gst.Bin

`element` (Gst.Element) –

the element to be removed

Returns (bool) –

True if the element was removed

## Function Macros

### GST_BIN_CAST

    #define GST_BIN_CAST(obj)        ((GstBin*)(obj))

### GST_BIN_CHILDREN

    #define GST_BIN_CHILDREN(bin)		(GST_BIN_CAST(bin)->children)

Gets the list of children in a bin.

Parameters:

`bin` –

a GstBin

### GST_BIN_CHILDREN_COOKIE

    #define GST_BIN_CHILDREN_COOKIE(bin)	(GST_BIN_CAST(bin)->children_cookie)

Gets the children cookie that watches the children list.

Parameters:

`bin` –

a GstBin

### GST_BIN_IS_NO_RESYNC

    #define GST_BIN_IS_NO_RESYNC(bin)        (GST_OBJECT_FLAG_IS_SET(bin,GST_BIN_FLAG_NO_RESYNC))

Check if bin will resync its state change when elements are added and removed.

Parameters:

`bin` –

A GstBin

### GST_BIN_NUMCHILDREN

    #define GST_BIN_NUMCHILDREN(bin)	(GST_BIN_CAST(bin)->numchildren)

Gets the number of children in a bin.

Parameters:

`bin` –

a GstBin

## Enumerations

### GstBinFlags

GstBinFlags are a set of flags specific to bins. Most are set/used internally. They can be checked using the GST_OBJECT_FLAG_IS_SET macro, and (un)set using GST_OBJECT_FLAG_SET and GST_OBJECT_FLAG_UNSET.

##### Members

`GST_BIN_FLAG_NO_RESYNC` (16384) –

Don't resync a state change when elements are added or linked in the bin

`GST_BIN_FLAG_STREAMS_AWARE` (32768) –

Indicates whether the bin can handle elements that add/remove source pads at any point in time without first posting a no-more-pads signal.

`GST_BIN_FLAG_LAST` (524288) –

The last enum in the series of flags for bins. Derived classes can use this as first value in a list of flags.

### Gst.BinFlags

GstBinFlags are a set of flags specific to bins. Most are set/used internally. They can be checked using the GST_OBJECT_FLAG_IS_SET (not introspectable) macro, and (un)set using GST_OBJECT_FLAG_SET (not introspectable) and GST_OBJECT_FLAG_UNSET (not introspectable).

##### Members

`Gst.BinFlags.NO_RESYNC` (16384) –

Don't resync a state change when elements are added or linked in the bin

`Gst.BinFlags.STREAMS_AWARE` (32768) –

Indicates whether the bin can handle elements that add/remove source pads at any point in time without first posting a no-more-pads signal.

`Gst.BinFlags.LAST` (524288) –

The last enum in the series of flags for bins. Derived classes can use this as first value in a list of flags.

### Gst.BinFlags

GstBinFlags are a set of flags specific to bins. Most are set/used internally. They can be checked using the GST_OBJECT_FLAG_IS_SET (not introspectable) macro, and (un)set using GST_OBJECT_FLAG_SET (not introspectable) and GST_OBJECT_FLAG_UNSET (not introspectable).

##### Members

`Gst.BinFlags.NO_RESYNC` (16384) –

Don't resync a state change when elements are added or linked in the bin

`Gst.BinFlags.STREAMS_AWARE` (32768) –

Indicates whether the bin can handle elements that add/remove source pads at any point in time without first posting a no-more-pads signal.

`Gst.BinFlags.LAST` (524288) –

The last enum in the series of flags for bins. Derived classes can use this as first value in a list of flags.

The results of the search are