Class: Gst::ElementFactory

Inherits:
PluginFeature show all
Defined in:
lib/gst/element-factory.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PluginFeature

#check_version, list_copy, list_debug, list_free, #load, #plugin, #plugin_name, #rank, #rank=, rank_compare_func, #rank_raw

Methods inherited from Object

#add_control_binding, check_uniqueness, #control_bindings_disabled=, #control_rate, #control_rate=, default_deep_notify, #default_error, #get_control_binding, #get_g_value_array, #get_value, #get_value_array, #has_active_control_bindings, #has_ancestor, #has_as_ancestor, #has_as_parent, #name, #name=, #parent, #parent=, #path_string, #ref, ref_sink, #remove_control_binding, replace, #set_control_binding_disabled, #suggest_next_sync, #sync_values, #unparent, #unref

Class Method Details

.find(name) ⇒ Gst::ElementFactory

Search for an element factory of the given name. Refs the returned element factory; caller is responsible for unreffing. nil otherwise

Parameters:

  • name (String)

    name of factory to find

Returns:

.list_filter(list, caps, direction, subsetonly) ⇒ GLib::List<Gst::ElementFactory>

Filter out all the elementfactories in list that can handle caps in the given direction.

If subsetonly is true, then only the elements whose pads templates are a complete superset of caps will be returned. Else any element whose pad templates caps can intersect with caps will be returned.

Parameters:

  • list (GLib::List<Gst::ElementFactory>)

    a #GList of Gst::ElementFactory to filter

  • caps (Gst::Caps)

    a Gst::Caps

  • direction (Gst::PadDirection)

    a Gst::PadDirection to filter on

  • subsetonly (Boolean)

    whether to filter on caps subsets or not.

Returns:

  • (GLib::List<Gst::ElementFactory>)

    a #GList of Gst::ElementFactory elements that match the given requisites. Use #gst_plugin_feature_list_free after usage.

.list_get_elements(type, minrank) ⇒ GLib::List<Gst::ElementFactory>

Get a list of factories that match the given type. Only elements with a rank greater or equal to minrank will be returned. The list of factories is returned by decreasing rank.

Parameters:

  • type (Gst::ElementFactoryListType)

    a Gst::ElementFactoryListType

  • minrank (Gst::Rank)

    Minimum rank

Returns:

  • (GLib::List<Gst::ElementFactory>)

    a #GList of Gst::ElementFactory elements. Use gst_plugin_feature_list_free() after usage.

.make(factoryname, name) ⇒ Gst::Element

Create a new element of the type defined by the given element factory. If name is 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. if unable to create element

Parameters:

  • factoryname (String)

    a named factory to instantiate

  • name (String)

    name of new element, or nil to automatically create a unique name

Returns:

.make_full(factoryname, first, array) ⇒ Gst::Element

Create a new element of the type defined by the given element factory. The supplied list of properties, will be passed at object construction. if unable to create element

Parameters:

  • factoryname (String)

    a named factory to instantiate

  • first (String)

    name of first property

  • array (Array)

    nil terminated list of properties

Returns:

.make_valist(factoryname, first, properties) ⇒ Gst::Element

Create a new element of the type defined by the given element factory. The supplied list of properties, will be passed at object construction. if unable to create element

Parameters:

  • factoryname (String)

    a named factory to instantiate

  • first (String)

    name of first property

  • properties (Gst::va_list)

    list of properties

Returns:

.make_with_properties(factoryname, n, names, values) ⇒ Gst::Element

Create a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction.

Parameters:

  • factoryname (String)

    a named factory to instantiate

  • n (Integer)

    count of properties

  • names (Array<String>)

    array of properties names

  • values (Array<GObject::Value>)

    array of associated properties values

Returns:

  • (Gst::Element)

    new Gst::Element or nil if the element couldn't be created

Instance Method Details

#authorObject



31
32
33
# File 'lib/gst/element-factory.rb', line 31

def author
  ("author")
end

#can_sink_all_caps(caps) ⇒ Boolean

Checks if the factory can sink all possible capabilities.

Parameters:

Returns:

  • (Boolean)

    true if the caps are fully compatible.

#can_sink_any_caps(caps) ⇒ Boolean

Checks if the factory can sink any possible capability.

Parameters:

Returns:

  • (Boolean)

    true if the caps have a common subset.

#can_src_all_caps(caps) ⇒ Boolean

Checks if the factory can src all possible capabilities.

Parameters:

Returns:

  • (Boolean)

    true if the caps are fully compatible.

#can_src_any_caps(caps) ⇒ Boolean

Checks if the factory can src any possible capability.

Parameters:

Returns:

  • (Boolean)

    true if the caps have a common subset.

#create(name) ⇒ Gst::Element

Create a new element of the type defined by the given elementfactory. It will be given the name supplied, since all elements require a name as their first argument.

Parameters:

  • name (String)

    name of new element, or nil to automatically create a unique name

Returns:

  • (Gst::Element)

    new Gst::Element or nil if the element couldn't be created

#create_full(first, array) ⇒ Gst::Element

Create a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction.

Parameters:

  • first (String)

    name of the first property

  • array (Array)

    nil terminated list of properties

Returns:

  • (Gst::Element)

    new Gst::Element or nil if the element couldn't be created

#create_valist(first, properties) ⇒ Gst::Element

Create a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction.

Parameters:

  • first (String)

    name of the first property

  • properties (Gst::va_list)

    list of properties

Returns:

  • (Gst::Element)

    new Gst::Element or nil if the element couldn't be created

#create_with_properties(n, names, values) ⇒ Gst::Element

Create a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction.

Parameters:

  • n (Integer)

    count of properties

  • names (Array<String>)

    array of properties names

  • values (Array<GObject::Value>)

    array of associated properties values

Returns:

  • (Gst::Element)

    new Gst::Element or nil if the element couldn't be created

#descriptionObject



27
28
29
# File 'lib/gst/element-factory.rb', line 27

def description
  ("description")
end

#element_typeGLib::Type

Get the #GType for elements managed by this factory. The type can only be retrieved if the element factory is loaded, which can be assured with gst_plugin_feature_load(). the factory is not loaded.

Returns:

  • (GLib::Type)

    the #GType for elements managed by this factory or 0 if

#get_metadata(key) ⇒ String

Get the metadata on factory with key. when there was no metadata with the given key.

Parameters:

  • key (String)

    a key

Returns:

  • (String)

    the metadata with key on factory or nil

#has_interface(interfacename) ⇒ Boolean

Check if factory implements the interface with name interfacename.

Parameters:

  • interfacename (String)

    an interface name

Returns:

  • (Boolean)

    true when factory implement the interface.

#klassObject



23
24
25
# File 'lib/gst/element-factory.rb', line 23

def klass
  ("klass")
end

#list_is_type(type) ⇒ Boolean

Check if factory is of the given types.

Parameters:

  • type (Gst::ElementFactoryListType)

    a Gst::ElementFactoryListType

Returns:

  • (Boolean)

    true if factory is of type.

#long_nameObject



19
20
21
# File 'lib/gst/element-factory.rb', line 19

def long_name
  ("long-name")
end

#metadata_keysArray<String>

Get the available keys for the metadata on factory. an array of key strings, or nil when there is no metadata. Free with g_strfreev() when no longer needed.

Returns:

  • (Array<String>)

#num_pad_templatesInteger

Gets the number of pad_templates in this factory.

Returns:

  • (Integer)

    the number of pad_templates

#skip_documentationBoolean

Queries whether registered element managed by factory needs to be excluded from documentation system or not.

Returns:

  • (Boolean)

    true if documentation should be skipped

#static_pad_templatesGLib::List<Gst::StaticPadTemplate>

Gets the #GList of Gst::StaticPadTemplate for this factory.

Returns:

  • (GLib::List<Gst::StaticPadTemplate>)

    the static pad templates

#uri_protocolsArray<String>

Gets an array of protocols this element supports or nil if no protocols are supported. You may not change the contents of the returned array, as it is still owned by the element factory. Use g_strdupv() to make a copy of the protocol string array if you need to.

Returns:

  • (Array<String>)

    the supported protocols or nil

#uri_typeGst::URIType

Gets the type of URIs the element supports or #GST_URI_UNKNOWN if none.

Returns: