Package org.freedesktop.gstreamer.gst
Class PluginFeature
java.lang.Object
io.github.jwharm.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.PluginFeatureImpl
,TracerFactory
,TypeFindFactory
This is a base class for anything that can be added to a
GstPlugin
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
PluginFeature.Builder<B extends PluginFeature.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static class
static class
The PluginFeatureImpl type represents a native instance of the abstract PluginFeature class.Nested classes/interfaces inherited from class org.freedesktop.gstreamer.gst.GstObject
GstObject.DeepNotifyCallback, GstObject.ObjectClass, GstObject.ObjectImpl
Nested classes/interfaces inherited from class org.gnome.gobject.InitiallyUnowned
InitiallyUnowned.InitiallyUnownedClass
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback
-
Constructor Summary
ConstructorDescriptionPluginFeature
(MemorySegment address) Create a PluginFeature proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected PluginFeature
asParent()
Returns this instance as if it were its parent type.static PluginFeature.Builder
<? extends PluginFeature.Builder> builder()
APluginFeature.Builder
object constructs aPluginFeature
with the specified properties.boolean
checkVersion
(int minMajor, int minMinor, int minMicro) Checks whether the given plugin feature is at least the required version.Get the plugin that provides this feature.Get the name of the plugin that provides this feature.int
getRank()
Gets the rank of a plugin feature.static Type
getType()
Get the GType of the PluginFeature classstatic List
<PluginFeature> listCopy
(List<PluginFeature> list) Copies the list of features.static void
listDebug
(List<PluginFeature> list) Debug the plugin feature names inlist
.static void
listFree
(List<PluginFeature> list) Unrefs each member oflist
, then frees the list.load()
Loads the plugin containing this PluginFeature if it's not already loaded.static int
rankCompareFunc
(@Nullable MemorySegment p1, @Nullable MemorySegment p2) Compares the two givenGstPluginFeature
instances.void
setRank
(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, unref
Methods 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, 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, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.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
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, 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 callgstPluginFeatureListFree
when 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
- aGList
of plugin features
-
listFree
Unrefs each member oflist
, then frees the list.- Parameters:
list
- list ofGstPluginFeature
-
rankCompareFunc
public static int rankCompareFunc(@Nullable @Nullable MemorySegment p1, @Nullable @Nullable MemorySegment p2) Compares the two givenGstPluginFeature
instances. This function can be used as aGCompareFunc
when sorting by rank and then by name.- Parameters:
p1
- aGstPluginFeature
p2
- 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
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 returntrue
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 versionminMinor
- minimum required minor versionminMicro
- minimum required micro version- Returns:
true
if 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
null
if the feature is not associated with a plugin.
-
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
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
-
builder
APluginFeature.Builder
object constructs aPluginFeature
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withPluginFeature.Builder.build()
.
-