Package org.freedesktop.gstreamer.gst
Class GhostPad
- All Implemented Interfaces:
Proxy
GhostPads are useful when organizing pipelines with
GstBin like elements.
The idea here is to create hierarchical element graphs. The bin element
contains a sub-graph. Now one would like to treat the bin-element like any
other GstElement. This is where GhostPads come into play. A GhostPad acts as
a proxy for another pad. Thus the bin can have sink and source ghost-pads
that are associated with sink and source pads of the child elements.
If the target pad is known at creation time, gst_ghost_pad_new() is the function to use to get a ghost-pad. Otherwise one can use gst_ghost_pad_new_no_target() to create the ghost-pad and use gst_ghost_pad_set_target() to establish the association later on.
Note that GhostPads add overhead to the data processing of a pipeline.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classGhostPad.Builder<B extends GhostPad.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class org.freedesktop.gstreamer.gst.ProxyPad
ProxyPad.ProxyPadClassNested classes/interfaces inherited from class org.freedesktop.gstreamer.gst.Pad
Pad.LinkedCallback, Pad.PadClass, Pad.UnlinkedCallbackNested classes/interfaces inherited from class org.freedesktop.gstreamer.gst.GstObject
GstObject.DeepNotifyCallback, GstObject.Object$Impl, GstObject.ObjectClassNested classes/interfaces inherited from class org.gnome.gobject.InitiallyUnowned
InitiallyUnowned.InitiallyUnownedClassNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanactivateModeDefault(Pad pad, @Nullable GstObject parent, PadMode mode, boolean active) Invoke the default activate mode function of a ghost pad.protected GhostPadasParent()Returns this instance as if it were its parent type.static GhostPad.Builder<? extends GhostPad.Builder> builder()AGhostPad.Builderobject constructs aGhostPadwith the specified properties.booleanDeprecated.This function is deprecated since 1.18 and does nothing anymore.static PadfromTemplate(@Nullable String name, Pad target, PadTemplate templ) Create a new ghostpad withtargetas the target.static MemoryLayoutThe memory layout of the native struct.@Nullable PadGet the target pad ofgpad.Unref target pad after usage.static @Nullable TypegetType()Get the GType of the GhostPad classstatic booleaninternalActivateModeDefault(Pad pad, @Nullable GstObject parent, PadMode mode, boolean active) Invoke the default activate mode function of a proxy pad that is owned by a ghost pad.static PadnoTarget(@Nullable String name, PadDirection dir) Create a new ghostpad without a target with the given direction.static PadnoTargetFromTemplate(@Nullable String name, PadTemplate templ) Create a new ghostpad based ontempl,without setting a target.booleanSet the new target of the ghostpadgpad.Any existing target is unlinked and links to the new target are established.Methods inherited from class org.freedesktop.gstreamer.gst.ProxyPad
chainDefault, chainListDefault, getInternal, getrangeDefault, iterateInternalLinksDefaultMethods inherited from class org.freedesktop.gstreamer.gst.Pad
activateMode, addProbe, addProbe, canLink, chain, chainList, checkReconfigure, createStreamId, createStreamIdPrintf, emitLinked, emitUnlinked, eventDefault, forward, fromStaticTemplate, fromTemplate, getAllowedCaps, getCurrentCaps, getDirection, getElementPrivate, getLastFlowReturn, getOffset, getPadTemplate, getPadTemplateCaps, getParentElement, getPeer, getRange, getSingleInternalLink, getStickyEvent, getStream, getStreamId, getTaskState, hasCurrentCaps, isActive, isBlocked, isBlocking, isLinked, iterateInternalLinks, iterateInternalLinksDefault, link, linked, linkFull, linkFull, linkGetName, linkMaybeGhosting, linkMaybeGhostingFull, linkMaybeGhostingFull, markReconfigure, needsReconfigure, onLinked, onUnlinked, pauseTask, peerQuery, peerQueryAcceptCaps, peerQueryCaps, peerQueryConvert, peerQueryDuration, peerQueryPosition, proxyQueryAcceptCaps, proxyQueryCaps, pullRange, push, pushEvent, pushList, query, queryAcceptCaps, queryCaps, queryConvert, queryDefault, queryDuration, queryPosition, removeProbe, sendEvent, setActivateFunctionFull, setActivatemodeFunctionFull, setActive, setChainFunctionFull, setChainListFunctionFull, setElementPrivate, setEventFullFunctionFull, setEventFunctionFull, setGetrangeFunctionFull, setIterateInternalLinksFunctionFull, setLinkFunctionFull, setOffset, setQueryFunctionFull, setUnlinkFunctionFull, startTask, stickyEventsForeach, stopTask, storeStickyEvent, unlink, unlinked, useFixedCapsMethods inherited from class org.freedesktop.gstreamer.gst.GstObject
addControlBinding, checkUniqueness, deepNotify, defaultDeepNotify, defaultError, emitDeepNotify, getControlBinding, getControlRate, getGValueArray, getName, getParent, getPathString, getValue, getValueArray, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, onDeepNotify, ref, refSink, removeControlBinding, replace, setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setName, setParent, suggestNextSync, syncValues, unparent, unrefMethods 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, 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, 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
-
GhostPad
Create a GhostPad proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
GhostPad
-
GhostPad
public GhostPad()Creates a new GhostPad.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
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. -
fromTemplate
Create a new ghostpad withtargetas the target. The direction will be taken from the target pad. The template used on the ghostpad will betemplate.Will ref the target.
- Parameters:
name- the name of the new pad, ornullto assign a default name.target- the pad to ghost.templ- theGstPadTemplateto use on the ghostpad.- Returns:
- a new
GstPad, ornullin case of an error.
-
noTarget
Create a new ghostpad without a target with the given direction. A target can be set on the ghostpad later with the gst_ghost_pad_set_target() function.The created ghostpad will not have a padtemplate.
- Parameters:
name- the name of the new pad, ornullto assign a default name.dir- the direction of the ghostpad- Returns:
- a new
GstPad, ornullin case of an error.
-
noTargetFromTemplate
Create a new ghostpad based ontempl,without setting a target. The direction will be taken from thetempl.- Parameters:
name- the name of the new pad, ornullto assign a default nametempl- theGstPadTemplateto create the ghostpad from.- Returns:
- a new
GstPad, ornullin case of an error.
-
activateModeDefault
public static boolean activateModeDefault(Pad pad, @Nullable GstObject parent, PadMode mode, boolean active) Invoke the default activate mode function of a ghost pad.- Parameters:
pad- theGstPadto activate or deactivate.parent- the parent ofpadornullmode- the requested activation modeactive- whether the pad should be active or not.- Returns:
trueif the operation was successful.
-
internalActivateModeDefault
public static boolean internalActivateModeDefault(Pad pad, @Nullable GstObject parent, PadMode mode, boolean active) Invoke the default activate mode function of a proxy pad that is owned by a ghost pad.- Parameters:
pad- theGstPadto activate or deactivate.parent- the parent ofpadornullmode- the requested activation modeactive- whether the pad should be active or not.- Returns:
trueif the operation was successful.
-
construct
Deprecated.This function is deprecated since 1.18 and does nothing anymore.Finish initialization of a newly allocated ghost pad.This function is most useful in language bindings and when subclassing
GstGhostPad; plugin and application developers normally will not call this function. Call this function directly after a call to g_object_new (GST_TYPE_GHOST_PAD, "direction",dir,..., NULL).- Returns:
trueif the construction succeeds,falseotherwise.
-
getTarget
Get the target pad ofgpad.Unref target pad after usage.- Returns:
- the target
GstPad, can benullif the ghostpad has no target set. Unref target pad after usage.
-
setTarget
Set the new target of the ghostpadgpad.Any existing target is unlinked and links to the new target are established. ifnewtargetisnullthe target will be cleared.- Parameters:
newtarget- the new pad target- Returns:
trueif the new target could be set. This function can returnfalsewhen the internal pads could not be linked.
-
builder
AGhostPad.Builderobject constructs aGhostPadwith the specified properties. Use the variousset...()methods to set properties, and finish construction withGhostPad.Builder.build().- Returns:
- the builder object
-