新規作成  編集  Ruby-GNOME2 Project Website  ページ一覧  検索  更新履歴  編集履歴  RSS  ログイン

Gst::Bin

class Gst::Bin

Base container element.

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.
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.
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.
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.
remove(*elements)
Removes one or more Gst::Element objects from the bin, unparenting as well.
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.
use_clock(clock)
Forces the bin to use the given clock. Use nil to force it to use no clock at all.
更新日時:2005/03/05 07:34:28
キーワード:
参照:[Gst::Element] [Gst::Thread] [Gst::Bin] [Gst::Pipeline] [Gst::Parse]