Crear  Editar  FrontPage  Indexes  Buscar  Cambios  History  RSS  Login

Gst::ElementFactory

Class Methods

Gst::ElementFactory.find(factory_name)
Searches for an element factory of the given name.
  • factory_name: a name of an existing factory.
  • Returns: a Gst::ElementFactory object if found, nil otherwise.
Gst::ElementFactory.make(factory_name, element_name)

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.

# 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")
  • factory_name: a name of an existing factory.
  • element_name: a name which will be attributed to the element.
  • Returns: a newly created object based on Gst::Element.

Instance Methods

create(element_name=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.
  • element_name: a name which will be attributed to the element.
  • Returns: a newly created object based on Gst::Element.
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.
  • description: a short description about the element.
  • author: some information about the author(s).

Here is an example.

# Prints all details related to the 'mad' element:
Gst::ElementFactory.find("mad").details do |k, v| 
	p "#{k}: #{v}"
end
  • Returns: a Hash.
each_pad_template { |pad_template| ... }
Calls the block for each pad template of the factory, passing a reference to the Gst::PadTemplate as parameter.
  • Returns: always nil.
pad_templates
Requests all pad templates of factory.

See Also

Gst?.

- lrz?

Ultimas actualizaciones:2011/06/24 17:26:38
Clave:
Referencias:[tut-gst-helloword] [Gst::PluginFeature] [Gst::Registry] [tut-gst-elements-properties] [tut-gst-elements-create] [Gst::ElementFactory]