ruby-****@sourc*****
ruby-****@sourc*****
2004年 8月 6日 (金) 03:47:21 JST
------------------------- REMOTE_ADDR = 217.117.55.140 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp//?Gst%3A%3ABin ------------------------- = 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. + --- child_state_change(oldstate, newstate, child) + An internal method to inform the parent bin about a state change of + a child. + * oldstate: the old child state (see ((<GstElementState|Gst::Element#GstElementState>))). + * child: a Gst::Element that signaled a changed state. + * newstate: the new child state (see ((<GstElementState|Gst::Element#GstElementState>))). + * 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_by_interface(interface) + Calls the block for each element inside the bin that implements the + given interface, passing a reference to the Gst::Element as parameter. + This method recurses bins inside bins. + * interface: an interface (Ruby class). + * Returns: always 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_all_by_interface(interface) + Looks for all elements inside the bin that implements the given + interface. The method recurses bins inside bins. + * interface: an interface (Ruby class). + * Returns: a list of elements inside the bin implementing the interface, as an Array of Gst::Element objects. + + --- get_by_interface(interface) + Looks for the first element inside the bin that implements the + given interface. If such an element is found, it returns the element. + If you want all elements that implement the interface, use + Gst::Bin#get_all_by_interface. The method recurses bins inside bins. + * interface: an interface (Ruby class). + * Returns: An element inside the bin implementing the interface, as a Gst::Element object. + --- 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. + --- sync_children_state + Tries to set the state of the children of this bin to the same state of + the bin by calling Gst::Element#set_state for each child not already having + a synchronized state. + * Returns: the worst return value of any Gst::Element#set_state (see ((<GstElementState|Gst::Element#GstElementState>))). + --- 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. + == Constants + === GstBinFlags + --- FLAG_FIXED_CLOCK + --- FLAG_MANAGER + --- FLAG_PREFER_COTHREADS + --- SELF_SCHEDULABLE + + == Signals + --- element-added + + --- element-removed + + --- iterate + == See Also - ((<Gst::Pipeline>)), ((<Gst::Thread>)), ((<Gst>)). + ((<Gst::Pipeline>)), ((<Gst>)). - ((<lrz>))