Class EncodingTarget
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.freedesktop.gstreamer.pbutils.EncodingTarget
- All Implemented Interfaces:
Proxy
Collection of
GstEncodingProfile
for a specific target or use-case.
When being stored/loaded, targets come from a specific category, like
GST_ENCODING_CATEGORY_DEVICE
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
EncodingTarget.Builder<B extends EncodingTarget.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionEncodingTarget
(MemorySegment address) Create a EncodingTarget proxy instance for the provided memory address.EncodingTarget
(String name, String category, String description, List<EncodingProfile> profiles) Creates a newGstEncodingTarget
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addProfile
(EncodingProfile profile) Adds the givenprofile
to the this EncodingTarget.protected EncodingTarget
asParent()
Returns this instance as if it were its parent type.static EncodingTarget.Builder
<? extends EncodingTarget.Builder> builder()
AEncodingTarget.Builder
object constructs aEncodingTarget
with the specified properties.getName()
getPath()
getProfile
(String name) static Type
getType()
Get the GType of the EncodingTarget classstatic EncodingTarget
Searches for theGstEncodingTarget
with the given name, loads it and returns it.static EncodingTarget
loadFromFile
(String filepath) Opens the provided file and returns the containedGstEncodingTarget
.boolean
save()
Saves the this EncodingTarget to a default user-local directory.boolean
saveToFile
(String filepath) Saves the this EncodingTarget to the provided file location.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, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newInstance, newInstance, newv, notify_, notify_, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, 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
-
EncodingTarget
Create a EncodingTarget proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
EncodingTarget
public EncodingTarget(String name, String category, String description, List<EncodingProfile> profiles) Creates a newGstEncodingTarget
.The name and category can only consist of lowercase ASCII letters for the first character, followed by either lowercase ASCII letters, digits or hyphens ('-').
The
category
should be one of the existing well-defined categories, likeGST_ENCODING_CATEGORY_DEVICE
, but it can be a application or user specific category if needed.- Parameters:
name
- The name of the target.category
- The name of the category to which thistarget
belongs. For example:GST_ENCODING_CATEGORY_DEVICE
.description
- A description ofGstEncodingTarget
in the current locale.profiles
- AGList
ofGstEncodingProfile
.
-
-
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. -
load
public static EncodingTarget load(String name, @Nullable @Nullable String category) throws GErrorException Searches for theGstEncodingTarget
with the given name, loads it and returns it.If the category name is specified only targets from that category will be searched for.
- Parameters:
name
- the name of theGstEncodingTarget
to load (automatically converted to lower case internally as capital letters are not valid for target names).category
- the name of the target category, likeGST_ENCODING_CATEGORY_DEVICE
. Can benull
- Returns:
- The
GstEncodingTarget
if available, elsenull
. - Throws:
GErrorException
- seeGError
-
loadFromFile
Opens the provided file and returns the containedGstEncodingTarget
.- Parameters:
filepath
- The file location to load theGstEncodingTarget
from- Returns:
- The
GstEncodingTarget
contained in the file, elsenull
- Throws:
GErrorException
- seeGError
-
addProfile
Adds the givenprofile
to the this EncodingTarget. Each added profile must have a unique name within the profile.The this EncodingTarget will steal a reference to the
profile
. If you wish to use the profile after calling this method, you should increase its reference count.- Parameters:
profile
- theGstEncodingProfile
to add- Returns:
true
if the profile was added, elsefalse
.
-
getCategory
-
getDescription
-
getName
-
getPath
-
getProfile
-
getProfiles
-
save
Saves the this EncodingTarget to a default user-local directory.- Returns:
true
if the target was correctly saved, elsefalse
.- Throws:
GErrorException
- seeGError
-
saveToFile
Saves the this EncodingTarget to the provided file location.- Parameters:
filepath
- the location to store the this EncodingTarget at.- Returns:
true
if the target was correctly saved, elsefalse
.- Throws:
GErrorException
- seeGError
-
builder
AEncodingTarget.Builder
object constructs aEncodingTarget
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withEncodingTarget.Builder.build()
.
-