Class: Gst::PluginFeature

Inherits:
Object
  • Object
show all
Defined in:
lib/gst/plugin-feature.rb

Class Method Summary collapse

Instance Method Summary collapse

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

.list_copy(list) ⇒ GLib::List<Gst::PluginFeature>

Copies the list of features. Caller should call gst_plugin_feature_list_free when done with the list.

Parameters:

Returns:

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

    a copy of list, with each feature's reference count incremented.

.list_debug(list) ⇒ nil

Debug the plugin feature names in list.

Parameters:

Returns:

  • (nil)

.list_free(list) ⇒ nil

Unrefs each member of list, then frees the list.

Parameters:

Returns:

  • (nil)

.rank_compare_func(p1, p2) ⇒ Integer

Compares the two given Gst::PluginFeature instances. This function can be used as a GCompare::Func when sorting by rank and then by name. equal but the name of p1 comes before the name of p2; zero if the rank and names are equal; positive value if the rank of p1 < the rank of p2 or the ranks are equal but the name of p2 comes before the name of p1

Parameters:

  • p1 (GObject)

    a Gst::PluginFeature

  • p2 (GObject)

    a Gst::PluginFeature

Returns:

  • (Integer)

    negative value if the rank of p1 > the rank of p2 or the ranks are

Instance Method Details

#check_version(min_major, min_minor, min_micro) ⇒ Boolean

Checks whether the given plugin feature is at least the required version.

Note: Since version 1.24 this function no longer returns true if the version is a git development version (e.g. 1.23.0.1) and the check is for the "next" micro version, that is it will no longer return true for e.g. 1.23.0.1 if the check is for 1.23.1. It is still possible to parse the nano version from the string and do this check that way if needed.

Parameters:

  • min_major (Integer)

    minimum required major version

  • min_minor (Integer)

    minimum required minor version

  • min_micro (Integer)

    minimum required micro version

Returns:

  • (Boolean)

    true if the plugin feature has at least the required version, otherwise false.

#loadGst::PluginFeature

Loads the plugin containing feature if it's not already loaded. feature is unaffected; use the return value instead.

Normally this function is used like this:

GstPluginFeature *loaded_feature;

loaded_feature = gst_plugin_feature_load (feature);
// presumably, we're no longer interested in the potentially-unloaded feature
gst_object_unref (feature);
feature = loaded_feature;

feature, or nil on error

Returns:

#pluginGst::Plugin

Get the plugin that provides this feature.

Returns:

  • (Gst::Plugin)

    the plugin that provides this feature, or nil. Unref with gst_object_unref() when no longer needed.

#plugin_nameString

Get the name of the plugin that provides this feature.

Returns:

  • (String)

    the name of the plugin that provides this feature, or nil if the feature is not associated with a plugin.

#rankInteger

Gets the rank of a plugin feature.

Returns:

  • (Integer)

    The rank of the feature



20
21
22
# File 'lib/gst/plugin-feature.rb', line 20

def rank
  Rank.new(rank_raw)
end

#rank=(rank) ⇒ nil

Specifies a rank for a plugin feature, so that autoplugging uses the most appropriate feature.

Parameters:

  • rank (Integer)

    rank value - higher number means more priority rank

Returns:

  • (nil)

#rank_rawInteger

Gets the rank of a plugin feature.

Returns:

  • (Integer)

    The rank of the feature



# File 'lib/gst/plugin-feature.rb', line 19