[ruby-gnome2-doc-cvs] [Hiki] create - Gst::ElementFactory

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2003年 8月 24日 (日) 02:04:29 JST


-------------------------
REMOTE_ADDR = 81.51.53.223
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?Gst%3A%3AElementFactory
-------------------------
= class Gst::ElementFactory
Creates Gst::Element instances.

== Object Hierarchy
* Gst::PluginFeature

== Class Methods
--- Gst::ElementFactory.find(aFactoryNameString) 
    Searches for an element factory of the given name.
    If found, returns a Gst::ElementFactory object.  Otherwise, returns nil.

--- Gst::ElementFactory.make(aFactoryNameString, anElementNameString=nil) 
    Creates a new Gst::Element of the type defined by the given element factory.
    
    If element name is ommited (or nil), then the element will receive a guaranteed 
    unique name, consisting of the element factory name and a number. 
    If name is given, it will be given the name supplied.
    
    Example: 
    
      # Creates a 'mad' GStreamer element, named 'foo':
      elem1 = Gst::ElementFactory.make("mad", "foo")
     
      # This line does exactly the same thing:
      elem2 = Gst::ElementFactory.find("mad").create("foo")


== Instance Methods
--- create(anElementNameString=nil) 
    Creates a new element of the type defined by the element factory.
    
    If element name is ommited (or nil), then the element will receive a guaranteed 
    unique name, consisting of the element factory name and a number. 
    If name is given, it will be given the name supplied.

--- details 
    Gets some public information about the factory, 
    mostly for the benefit of editors.
    
    This information is encapsulated in a Hash object, 
    with the following (String) keys:
    
      - longname: long (English) element name.
      - klass: type of element, as hierarchy.
      - license: license under which the element is provided.
      - description: a short description about the element.
      - version: version of the element.
      - author: some information about the author(s).
      - copyright: some copyright details (year, etc..).
    
    Example: 
    
      # Prints all details related to the 'mad' element:
      Gst::ElementFactory.find("mad").details do |k, v| 
          p "#{k}: #{v}"
      end

--- each_pad_template { |aPadTemplateObject| block } 
    Calls the block for each pad template of the factory, passing a
    reference to the Gst::PadTemplate as parameter.
    
    Always returns nil.

--- pad_templates 
    Requests all pad templates of factory, in an array 
    of Gst::PadTemplate objects.

--- rank 
    Gets the rank of the factory:
        
      - Gst::ElementFactory::RANK_MARGINAL;
      - Gst::ElementFactory::RANK_NONE;
      - Gst::ElementFactory::RANK_PRIMARY;
      - Gst::ElementFactory::RANK_SECONDARY.

--- rank_marginal? 
    Checks if the rank of the factory equals Gst::ElementFactory::RANK_MARGINAL.

--- rank_none? 
    Checks if the rank of the factory equals Gst::ElementFactory::RANK_NONE.

--- rank_primary? 
    Checks if the rank of the factory equals Gst::ElementFactory::RANK_PRIMARY.

--- rank_secondary? 
    Checks if the rank of the factory equals Gst::ElementFactory::RANK_SECONDARY.

--- to_s 
    Gets a String representing the factory.


== Constants
--- RANK_MARGINAL
    The element is only marginally usefull for autoplugging.

--- RANK_NONE
    The plugin may not be used in autoplugging.

--- RANK_PRIMARY
    The plugin is well suited for autoplugging.

--- RANK_SECONDARY
    The plugin is suited for autoplugging but only as a second candidate.


- ((<lrz>))






ruby-gnome2-cvs メーリングリストの案内
Back to archive index