Class PluginFeature

All Implemented Interfaces:
Proxy
Direct Known Subclasses:
DeviceProviderFactory, DynamicTypeFactory, ElementFactory, PluginFeature.PluginFeature$Impl, TracerFactory, TypeFindFactory

@Generated("org.javagi.JavaGI") public abstract class PluginFeature extends GstObject
This is a base class for anything that can be added to a GstPlugin.
  • Constructor Details

    • PluginFeature

      public PluginFeature(MemorySegment address)
      Create a PluginFeature instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • PluginFeature

      public PluginFeature()
      Create a new PluginFeature.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the PluginFeature class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected PluginFeature asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GstObject
      Returns:
      the instance as if it were its parent type
    • listCopy

      public static List<PluginFeature> listCopy(List<PluginFeature> list)
      Copies the list of features. Caller should call gstPluginFeatureListFree when done with the list.
      Parameters:
      list - list of GstPluginFeature
      Returns:
      a copy of list, with each feature's reference count incremented.
    • listDebug

      public static void listDebug(List<PluginFeature> list)
      Debug the plugin feature names in list.
      Parameters:
      list - a GList of plugin features
    • listFree

      public static void listFree(List<PluginFeature> list)
      Unrefs each member of list, then frees the list.
      Parameters:
      list - list of GstPluginFeature
    • rankCompareFunc

      public static int rankCompareFunc(@Nullable MemorySegment p1, @Nullable MemorySegment p2)
      Compares the two given GstPluginFeature instances. This function can be used as a GCompareFunc when sorting by rank and then by name.
      Parameters:
      p1 - a GstPluginFeature
      p2 - a GstPluginFeature
      Returns:
      negative value if the rank of p1 > the rank of p2 or the ranks are 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
    • checkVersion

      public boolean checkVersion(int minMajor, int minMinor, int minMicro)

      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:
      minMajor - minimum required major version
      minMinor - minimum required minor version
      minMicro - minimum required micro version
      Returns:
      true if the plugin feature has at least the required version, otherwise false.
    • getPlugin

      public @Nullable Plugin getPlugin()
      Get the plugin that provides this feature.
      Returns:
      the plugin that provides this feature, or null. Unref with gst_object_unref() when no longer needed.
    • getPluginName

      public @Nullable String getPluginName()
      Get the name of the plugin that provides this feature.
      Returns:
      the name of the plugin that provides this feature, or null if the feature is not associated with a plugin.
      Since:
      1.2
    • getRank

      public int getRank()
      Gets the rank of a plugin feature.
      Returns:
      The rank of the feature
    • load

      public @Nullable PluginFeature load()

      Loads the plugin containing this PluginFeature if it's not already loaded. this PluginFeature 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;
      
      Returns:
      a reference to the loaded feature, or null on error
    • setRank

      public void setRank(int rank)
      Specifies a rank for a plugin feature, so that autoplugging uses the most appropriate feature.
      Parameters:
      rank - rank value - higher number means more priority rank