Package org.freedesktop.gstreamer.gst
Class PluginFeature
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.gobject.InitiallyUnowned
org.freedesktop.gstreamer.gst.GstObject
org.freedesktop.gstreamer.gst.PluginFeature
- All Implemented Interfaces:
Proxy
- Direct Known Subclasses:
DeviceProviderFactory,DynamicTypeFactory,ElementFactory,PluginFeature.PluginFeature$Impl,TracerFactory,TypeFindFactory
This is a base class for anything that can be added to a
GstPlugin.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPluginFeature.Builder<B extends PluginFeature.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classThe PluginFeature$Impl type represents a native instance of the abstract PluginFeature class.static classNested classes/interfaces inherited from class org.freedesktop.gstreamer.gst.GstObject
GstObject.DeepNotifyCallback, GstObject.Object$Impl, GstObject.ObjectClassNested classes/interfaces inherited from class org.gnome.gobject.InitiallyUnowned
InitiallyUnowned.InitiallyUnownedClassNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new PluginFeature.PluginFeature(MemorySegment address) Create a PluginFeature proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected PluginFeatureasParent()Returns this instance as if it were its parent type.booleancheckVersion(int minMajor, int minMinor, int minMicro) Checks whether the given plugin feature is at least the required version.@Nullable PluginGet the plugin that provides this feature.@Nullable StringGet the name of the plugin that provides this feature.intgetRank()Gets the rank of a plugin feature.static @Nullable TypegetType()Get the GType of the PluginFeature classstatic List<PluginFeature> listCopy(List<PluginFeature> list) Copies the list of features.static voidlistDebug(List<PluginFeature> list) Debug the plugin feature names inlist.static voidlistFree(List<PluginFeature> list) Unrefs each member oflist,then frees the list.@Nullable PluginFeatureload()Loads the plugin containing this PluginFeature if it's not already loaded.static intrankCompareFunc(@Nullable MemorySegment p1, @Nullable MemorySegment p2) Compares the two givenGstPluginFeatureinstances.voidsetRank(int rank) Specifies a rank for a plugin feature, so that autoplugging uses the most appropriate feature.Methods inherited from class org.freedesktop.gstreamer.gst.GstObject
addControlBinding, checkUniqueness, deepNotify, defaultDeepNotify, defaultError, emitDeepNotify, getControlBinding, getControlRate, getGValueArray, getMemoryLayout, getName, getParent, getPathString, getValue, getValueArray, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, onDeepNotify, ref, refSink, removeControlBinding, replace, setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setName, setParent, suggestNextSync, syncValues, unparent, unrefMethods inherited from class org.gnome.gobject.InitiallyUnowned
builderMethods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
PluginFeature
Create a PluginFeature proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
PluginFeature
public PluginFeature()Creates a new PluginFeature.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
listCopy
Copies the list of features. Caller should callgstPluginFeatureListFreewhen done with the list.- Parameters:
list- list ofGstPluginFeature- Returns:
- a copy of
list,with each feature's reference count incremented.
-
listDebug
Debug the plugin feature names inlist.- Parameters:
list- aGListof plugin features
-
listFree
Unrefs each member oflist,then frees the list.- Parameters:
list- list ofGstPluginFeature
-
rankCompareFunc
Compares the two givenGstPluginFeatureinstances. This function can be used as aGCompareFuncwhen sorting by rank and then by name.- Parameters:
p1- aGstPluginFeaturep2- aGstPluginFeature- 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
trueif 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 returntruefor 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 versionminMinor- minimum required minor versionminMicro- minimum required micro version- Returns:
trueif the plugin feature has at least the required version, otherwisefalse.
-
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
Get the name of the plugin that provides this feature.- Returns:
- the name of the plugin that provides this
feature, or
nullif 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
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
nullon 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
-