Class EncodingTarget
java.lang.Object
org.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
Nested ClassesModifier and TypeClassDescriptionstatic classEncodingTarget.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
ConstructorsConstructorDescriptionCreates a new EncodingTarget.EncodingTarget(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 TypeMethodDescriptionbooleanaddProfile(EncodingProfile profile) Adds the givenprofileto thetarget.Each added profile must have a unique name within the profile.protected EncodingTargetasParent()Returns this instance as if it were its parent type.static EncodingTarget.Builder<? extends EncodingTarget.Builder> builder()AEncodingTarget.Builderobject constructs aEncodingTargetwith the specified properties.getName()@Nullable StringgetPath()@Nullable EncodingProfilegetProfile(String name) static @Nullable TypegetType()Get the GType of the EncodingTarget classstatic EncodingTargetSearches for theGstEncodingTargetwith the given name, loads it and returns it.static EncodingTargetloadFromFile(String filepath) Opens the provided file and returns the containedGstEncodingTarget.booleansave()Saves the this EncodingTarget to a default user-local directory.booleansaveToFile(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, 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, 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
-
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
categoryshould 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 thistargetbelongs. For example:GST_ENCODING_CATEGORY_DEVICE.description- A description ofGstEncodingTargetin the current locale.profiles- AGListofGstEncodingProfile.
-
EncodingTarget
public EncodingTarget()Creates a new EncodingTarget.
-
-
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. -
load
Searches for theGstEncodingTargetwith 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 theGstEncodingTargetto 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
GstEncodingTargetif available, elsenull. - Throws:
GErrorException- seeGError
-
loadFromFile
Opens the provided file and returns the containedGstEncodingTarget.- Parameters:
filepath- The file location to load theGstEncodingTargetfrom- Returns:
- The
GstEncodingTargetcontained in the file, elsenull - Throws:
GErrorException- seeGError
-
addProfile
Adds the givenprofileto thetarget.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- theGstEncodingProfileto add- Returns:
trueif the profile was added, elsefalse.
-
getCategory
-
getDescription
-
getName
-
getPath
-
getProfile
-
getProfiles
-
save
Saves the this EncodingTarget to a default user-local directory.- Returns:
trueif 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:
trueif the target was correctly saved, elsefalse.- Throws:
GErrorException- seeGError
-
builder
AEncodingTarget.Builderobject constructs aEncodingTargetwith the specified properties. Use the variousset...()methods to set properties, and finish construction withEncodingTarget.Builder.build().- Returns:
- the builder object
-