Class 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 GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new EncodingTarget.EncodingTarget(MemorySegment address) Create a EncodingTarget 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()Return this instance as if it were its parent type.static EncodingTarget.Builder<? extends EncodingTarget.Builder> builder()AEncodingTarget.Builderobject constructs aEncodingTargetwith the specified properties.static MemoryLayoutThe memory layout of the native struct.getName()@Nullable StringgetPath()@Nullable EncodingProfilegetProfile(String name) static @Nullable TypegetType()Get the GType of the EncodingTarget class.static 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 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, 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 TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
EncodingTarget
Create a EncodingTarget 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 new
GstEncodingTarget.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()Create a new EncodingTarget.
-
-
Method Details
-
getType
Get the GType of the EncodingTarget class.- Returns:
- the GType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code. -
load
Searches for the
GstEncodingTargetwith 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 given
profileto 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
-