= class Gst::Bin
Base container element.

== Object Hierarchy
* Object
  * GLib::Instantiatable
    * GLib::Object
      * Gst::Object
        * Gst::Element
          * Gst::Bin

== Class Methods
--- Gst::Bin.new(name=nil)
    Constructs a new Gst::Bin object.
    If element name is ommited (or nil), then the bin will receive a guaranteed
    unique name, consisting of the "bin" string and a number.
    If name is given, it will be given the name supplied.
    * name: a name for the bin.  
    * Returns: a newly allocated Gst::Bin object.

== Instance Methods
--- [](name)
    Synonym for Gst::Bin#get_by_name.
    * name: a name.  
    * Returns: a Gst::Element reference, or nil if the bin does not contain an element with the given name.

--- add(*elements)
    Adds one or more Gst::Element objects to the bin.
    * elements: a list of Gst::Element objects.  
    * Returns: an array of all Gst::Element objects in the container.

--- auto_clock
    Let the bin select a clock automatically.
    * Returns: self.

--- clear
    Synonym for Gst::Bin#remove_all.
    * Returns: an empty array.

--- clock
    Gets the current clock of the (scheduler of the) bin,
    as a Gst::Clock object.
    This method overrides Gst::Element#get_clock.
    * Returns: a Gst::Clock object, or nil.

--- each_element { |element| ... }
    Calls the block for each element in the bin, passing a reference to
    the Gst::Element as parameter.
    * Returns: always  nil.

--- elements
    This method returns an array of all Gst::Element objects in the container.
    * Returns: an array of all Gst::Element objects in the container.

--- get_by_name(name)
    Gets the element with the given name from the bin, as a reference to 
    a Gst::Element object.
    * name: a name.  
    * Returns: a Gst::Element reference, or nil if the bin does not contain an element with the given name.

--- get_by_name_recurse_up(name)
    Gets the element with the given name from the bin, as a reference to 
    a Gst::Element object. If the element is not found, a recursion is 
    performed on the parent bin.
    * name: a name.  
    * Returns: a Gst::Element reference, or nil if no element with the given name is found.

--- iterate
    Iterates over the elements in this bin.
    * Returns: true if the bin did something useful, or false (this value can be used to determine if the bin is in EOS ("end of stream")).

--- length
    This method returns the number of elements in the container.
    * Returns: the number of elements in the container.

--- on_post_iterate { |bin| ... }
    Attaches a callback which will be executed after every iteration 
    of the bin.
    * Returns: always nil.

--- on_pre_iterate { |bin| ... }
    Attaches a block code which will be executed before every iteration 
    of the bin.
    * Returns: always nil.

--- remove(*elements)
    Removes one or more Gst::Element objects from the bin, unparenting 
    as well.
    * elements: a list of Gst::Element objects.  
    * Returns: an array of all Gst::Element objects in the container.

--- remove_all
    Removes all Gst::Element objects in the bin.
    * Returns: an empty array.

--- size
    Synonym for Gst::Bin#length.
    * Returns: the number of elements in the container.

--- use_clock(clock)
    Forces the bin to use the given clock.  Use nil to force it 
    to use no clock at all.
    * clock: a Gst::Clock.  
    * Returns: self.

== See Also
((<Gst::Pipeline>)), ((<Gst::Thread>)), ((<Gst>)).

- ((<lrz>))
