Package org.freedesktop.gstreamer.gst
Class Element.ElementClass
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeClass
org.gnome.gobject.GObject.ObjectClass
org.gnome.gobject.InitiallyUnowned.InitiallyUnownedClass
org.freedesktop.gstreamer.gst.GstObject.ObjectClass
org.freedesktop.gstreamer.gst.Element.ElementClass
- All Implemented Interfaces:
Proxy
- Direct Known Subclasses:
Aggregator.AggregatorClass
,AudioDecoder.AudioDecoderClass
,AudioEncoder.AudioEncoderClass
,BaseParse.BaseParseClass
,BaseSink.BaseSinkClass
,BaseSrc.BaseSrcClass
,BaseTransform.BaseTransformClass
,Bin.BinClass
,VideoDecoder.VideoDecoderClass
,VideoEncoder.VideoEncoderClass
- Enclosing class:
Element
GStreamer element class. Override the vmethods to implement the element
functionality.
-
Constructor Summary
ConstructorDescriptionAllocate a new ElementClass.ElementClass
(Arena arena) Allocate a new ElementClass.ElementClass
(MemorySegment address) Create a ElementClass proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMetadata
(String key, String value) Setkey
withvalue
as metadata in this ElementClass.void
addPadTemplate
(PadTemplate templ) Adds a padtemplate to an element class.void
addStaticMetadata
(String key, String value) Setkey
withvalue
as metadata in this ElementClass.void
addStaticPadTemplate
(StaticPadTemplate staticTempl) Adds a pad template to an element class based on the static pad templatetempl
.void
addStaticPadTemplateWithGtype
(StaticPadTemplate staticTempl, Type padType) Adds a pad template to an element class based on the static pad templatetempl
.static MemoryLayout
The memory layout of the native struct.getMetadata
(String key) Get metadata withkey
in this ElementClass.getPadTemplate
(String name) Retrieves a padtemplate from this ElementClass with the given name.Retrieves a list of the pad templates associated with this ElementClass.void
overrideChangeState
(Arena arena, Method method) Override virtual methodchange_state
.void
overrideGetState
(Arena arena, Method method) Override virtual methodget_state
.void
overrideNoMorePads
(Arena arena, Method method) Override virtual methodno_more_pads
.void
overridePadAdded
(Arena arena, Method method) Override virtual methodpad_added
.void
overridePadRemoved
(Arena arena, Method method) Override virtual methodpad_removed
.void
overridePostMessage
(Arena arena, Method method) Override virtual methodpost_message
.void
overrideProvideClock
(Arena arena, Method method) Override virtual methodprovide_clock
.void
overrideQuery
(Arena arena, Method method) Override virtual methodquery
.void
overrideReleasePad
(Arena arena, Method method) Override virtual methodrelease_pad
.void
overrideRequestNewPad
(Arena arena, Method method) Override virtual methodrequest_new_pad
.void
overrideSendEvent
(Arena arena, Method method) Override virtual methodsend_event
.void
overrideSetBus
(Arena arena, Method method) Override virtual methodset_bus
.void
overrideSetClock
(Arena arena, Method method) Override virtual methodset_clock
.void
overrideSetContext
(Arena arena, Method method) Override virtual methodset_context
.void
overrideSetState
(Arena arena, Method method) Override virtual methodset_state
.void
overrideStateChanged
(Arena arena, Method method) Override virtual methodstate_changed
.Read the value of the fieldelementfactory
.Read the value of the fieldmetadata
.int
Read the value of the fieldnumpadtemplates
.int
Read the value of the fieldpad_templ_cookie
.void
setMetadata
(String longname, String classification, String description, String author) Sets the detailed information for aGstElementClass
.void
setStaticMetadata
(String longname, String classification, String description, String author) Sets the detailed information for aGstElementClass
.void
writeElementfactory
(ElementFactory elementfactory) Write a value in the fieldelementfactory
.void
writeMetadata
(MemorySegment metadata) Write a value in the fieldmetadata
.void
writeNumpadtemplates
(int numpadtemplates) Write a value in the fieldnumpadtemplates
.void
writePadTemplCookie
(int padTemplCookie) Write a value in the fieldpad_templ_cookie
.Methods inherited from class org.freedesktop.gstreamer.gst.GstObject.ObjectClass
overrideDeepNotify, readPathStringSeparator, writePathStringSeparator
Methods inherited from class org.gnome.gobject.GObject.ObjectClass
findProperty, installProperties, installProperty, listProperties, overrideConstructed, overrideConstructor, overrideDispatchPropertiesChanged, overrideDispose, overrideFinalize, overrideGetProperty, overrideNotify, overrideProperty, overrideSetProperty, readFlags, readNConstructProperties, readNPspecs, readPdummy, readPspecs, writeFlags, writeNConstructProperties, writeNPspecs, writePdummy, writePspecs
Methods inherited from class org.gnome.gobject.TypeClass
addPrivate, adjustPrivateOffset, getInstancePrivateOffset, getPrivate, peek, peekParent, peekStatic, readGType, ref, unref, unrefUncached, writeGType
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ElementClass
Create a ElementClass proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
ElementClass
Allocate a new ElementClass.- Parameters:
arena
- to control the memory allocation scope
-
ElementClass
public ElementClass()Allocate a new ElementClass. The memory is allocated withArena.ofAuto()
.
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readMetadata
Read the value of the fieldmetadata
.- Returns:
- The value of the field
metadata
-
writeMetadata
Write a value in the fieldmetadata
.- Parameters:
metadata
- The new value for the fieldmetadata
-
readElementfactory
Read the value of the fieldelementfactory
.- Returns:
- The value of the field
elementfactory
-
writeElementfactory
Write a value in the fieldelementfactory
.- Parameters:
elementfactory
- The new value for the fieldelementfactory
-
readNumpadtemplates
public int readNumpadtemplates()Read the value of the fieldnumpadtemplates
.- Returns:
- The value of the field
numpadtemplates
-
writeNumpadtemplates
public void writeNumpadtemplates(int numpadtemplates) Write a value in the fieldnumpadtemplates
.- Parameters:
numpadtemplates
- The new value for the fieldnumpadtemplates
-
readPadTemplCookie
public int readPadTemplCookie()Read the value of the fieldpad_templ_cookie
.- Returns:
- The value of the field
pad_templ_cookie
-
writePadTemplCookie
public void writePadTemplCookie(int padTemplCookie) Write a value in the fieldpad_templ_cookie
.- Parameters:
padTemplCookie
- The new value for the fieldpad_templ_cookie
-
overridePadAdded
-
overridePadRemoved
-
overrideNoMorePads
-
overrideRequestNewPad
-
overrideReleasePad
-
overrideGetState
-
overrideSetState
-
overrideChangeState
-
overrideStateChanged
-
overrideSetBus
-
overrideProvideClock
-
overrideSetClock
-
overrideSendEvent
-
overrideQuery
-
overridePostMessage
-
overrideSetContext
-
addMetadata
-
addPadTemplate
Adds a padtemplate to an element class. This is mainly used in the _class_init functions of classes. If a pad template with the same name as an already existing one is added the old one is replaced by the new one.templ
's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink())- Parameters:
templ
- aGstPadTemplate
to add to the element class.
-
addStaticMetadata
Setkey
withvalue
as metadata in this ElementClass.Same as gst_element_class_add_metadata(), but
value
must be a static string or an inlined string, as it will not be copied. (GStreamer plugins will be made resident once loaded, so this function can be used even from dynamically loaded plugins.)- Parameters:
key
- the key to setvalue
- the value to set
-
addStaticPadTemplate
Adds a pad template to an element class based on the static pad templatetempl
. This is mainly used in the _class_init functions of element implementations. If a pad template with the same name already exists, the old one is replaced by the new one.- Parameters:
staticTempl
-GstStaticPadTemplate
to add as pad template to the element class.
-
addStaticPadTemplateWithGtype
Adds a pad template to an element class based on the static pad templatetempl
. This is mainly used in the _class_init functions of element implementations. If a pad template with the same name already exists, the old one is replaced by the new one.- Parameters:
staticTempl
-GstStaticPadTemplate
to add as pad template to the element class.padType
- TheGType
of the pad to create
-
getMetadata
-
getPadTemplate
Retrieves a padtemplate from this ElementClass with the given name.If you use this function in the GInstanceInitFunc of an object class that has subclasses, make sure to pass the g_class parameter of the GInstanceInitFunc here.
- Parameters:
name
- the name of theGstPadTemplate
to get.- Returns:
- the
GstPadTemplate
with the given name, ornull
if none was found. No unreferencing is necessary.
-
getPadTemplateList
Retrieves a list of the pad templates associated with this ElementClass. The list must not be modified by the calling code.If you use this function in the GInstanceInitFunc of an object class that has subclasses, make sure to pass the g_class parameter of the GInstanceInitFunc here.
- Returns:
- the
GList
of pad templates.
-
setMetadata
Sets the detailed information for aGstElementClass
.This function is for use in _class_init functions only.
- Parameters:
longname
- The long English name of the element. E.g. "File Sink"classification
- String describing the type of element, as an unordered list separated with slashes ('/'). See draft-klass.txt of the design docs for more details and common types. E.g: "Sink/File"description
- Sentence describing the purpose of the element. E.g: "Write stream to a file"author
- Name and contact details of the author(s). Use \\n to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>"
-
setStaticMetadata
public void setStaticMetadata(String longname, String classification, String description, String author) Sets the detailed information for aGstElementClass
.This function is for use in _class_init functions only.
Same as gst_element_class_set_metadata(), but
longname
,classification
,description
, andauthor
must be static strings or inlined strings, as they will not be copied. (GStreamer plugins will be made resident once loaded, so this function can be used even from dynamically loaded plugins.)- Parameters:
longname
- The long English name of the element. E.g. "File Sink"classification
- String describing the type of element, as an unordered list separated with slashes ('/'). See draft-klass.txt of the design docs for more details and common types. E.g: "Sink/File"description
- Sentence describing the purpose of the element. E.g: "Write stream to a file"author
- Name and contact details of the author(s). Use \\n to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>"
-