Class BaseSink
- All Implemented Interfaces:
Proxy
- Direct Known Subclasses:
AppSink,AudioBaseSink,BaseSink.BaseSink$Impl,VideoSink
GstBaseSink is the base class for sink elements in GStreamer, such as
xvimagesink or filesink. It is a layer on top of GstElement that provides a
simplified interface to plugin writers. GstBaseSink handles many details
for you, for example: preroll, clock synchronization, state changes,
activation in push or pull mode, and queries.
In most cases, when writing sink elements, there is no need to implement
class methods from GstElement or to set functions on pads, because the
GstBaseSink infrastructure should be sufficient.
GstBaseSink provides support for exactly one sink pad, which should be
named "sink". A sink implementation (subclass of GstBaseSink) should
install a pad template in its class_init function, like so:
static void
my_element_class_init (GstMyElementClass *klass)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
// sinktemplate should be a #GstStaticPadTemplate with direction
// %GST_PAD_SINK and name "sink"
gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate);
gst_element_class_set_static_metadata (gstelement_class,
"Sink name",
"Sink",
"My Sink element",
"The author <my.sink@my.email>");
}
GstBaseSink will handle the prerolling correctly. This means that it will
return StateChangeReturn.ASYNC from a state change to PAUSED until the first
buffer arrives in this element. The base class will call the
GstBaseSinkClass::preroll vmethod with this preroll buffer and will then
commit the state change to the next asynchronously pending state.
When the element is set to PLAYING, GstBaseSink will synchronise on the
clock using the times returned from GstBaseSinkClass::get_times. If this
function returns GST_CLOCK_TIME_NONE for the start time, no synchronisation
will be done. Synchronisation can be disabled entirely by setting the object
GstBaseSink:sync property to false.
After synchronisation the virtual method GstBaseSinkClass::render will be
called. Subclasses should minimally implement this method.
Subclasses that synchronise on the clock in the GstBaseSinkClass::render
method are supported as well. These classes typically receive a buffer in
the render method and can then potentially block on the clock while
rendering. A typical example is an audiosink.
These subclasses can use gst_base_sink_wait_preroll() to perform the
blocking wait.
Upon receiving the EOS event in the PLAYING state, GstBaseSink will wait
for the clock to reach the time indicated by the stop time of the last
GstBaseSinkClass::get_times call before posting an EOS message. When the
element receives EOS in PAUSED, preroll completes, the event is queued and an
EOS message is posted when going to PLAYING.
GstBaseSink will internally use the EventType.SEGMENT events to schedule
synchronisation and clipping of buffers. Buffers that fall completely outside
of the current segment are dropped. Buffers that fall partially in the
segment are rendered (and prerolled). Subclasses should do any subbuffer
clipping themselves when needed.
GstBaseSink will by default report the current playback position in
Format.TIME based on the current clock time and segment information.
If no clock has been set on the element, the query will be forwarded
upstream.
The GstBaseSinkClass::set_caps function will be called when the subclass
should configure itself to process a specific media type.
The GstBaseSinkClass::start and GstBaseSinkClass::stop virtual methods
will be called when resources should be allocated. Any
GstBaseSinkClass::preroll, GstBaseSinkClass::render and
GstBaseSinkClass::set_caps function will be called between the
GstBaseSinkClass::start and GstBaseSinkClass::stop calls.
The GstBaseSinkClass::event virtual method will be called when an event is
received by GstBaseSink. Normally this method should only be overridden by
very specific elements (such as file sinks) which need to handle the
newsegment event specially.
The GstBaseSinkClass::unlock method is called when the elements should
unblock any blocking operations they perform in the
GstBaseSinkClass::render method. This is mostly useful when the
GstBaseSinkClass::render method performs a blocking write on a file
descriptor, for example.
The GstBaseSink:max-lateness property affects how the sink deals with
buffers that arrive too late in the sink. A buffer arrives too late in the
sink when the presentation time (as a combination of the last segment, buffer
timestamp and element base_time) plus the duration is before the current
time of the clock.
If the frame is later than max-lateness, the sink will drop the buffer
without calling the render method.
This feature is disabled if sync is disabled, the
GstBaseSinkClass::get_times method does not return a valid start time or
max-lateness is set to -1 (the default).
Subclasses can use gst_base_sink_set_max_lateness() to configure the
max-lateness value.
The GstBaseSink:qos property will enable the quality-of-service features of
the basesink which gather statistics about the real-time performance of the
clock synchronisation. For each buffer received in the sink, statistics are
gathered and a QOS event is sent upstream with these numbers. This
information can then be used by upstream elements to reduce their processing
rate, for example.
The GstBaseSink:async property can be used to instruct the sink to never
perform an ASYNC state change. This feature is mostly usable when dealing
with non-synchronized streams or sparse streams.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe BaseSink$Impl type represents a native instance of the abstract BaseSink class.static classSubclasses can override any of the available virtual methods or not, as needed.static classBaseSink.Builder<B extends BaseSink.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.Nested classes/interfaces inherited from class org.freedesktop.gstreamer.gst.Element
Element.Element$Impl, Element.ElementClass, Element.NoMorePadsCallback, Element.PadAddedCallback, Element.PadRemovedCallbackNested 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
ConstructorsConstructorDescriptionBaseSink()Creates a new BaseSink.BaseSink(MemorySegment address) Create a BaseSink proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanactivatePull(boolean active) Subclasses should override this when they can provide an alternate method of spawning a thread to drive the pipeline in pull mode.protected BaseSinkasParent()Returns this instance as if it were its parent type.doPreroll(MiniObject obj) If the this BaseSink spawns its own thread for pulling buffers from upstream it should call this method after it has pulled a buffer.protected booleanOverride this to handle events arriving on the sink padprotected CapsOnly useful in pull mode.intGet the number of bytes that the sink will pull when it is operating in pull mode.protected CapsCalled to get sink pad caps from the subclass.booleanChecks if this BaseSink is currently configured to drop buffers which are outside the current segment@Nullable SampleGet the last sample that arrived in the sink and was used for preroll or for rendering.Get the currently configured latency.longGet the maximum amount of bits per second that the sink will render.longGets the max lateness value.static MemoryLayoutThe memory layout of the native struct.Get the processing deadline ofsink.see gst_base_sink_set_processing_deadline() for more information about the processing deadline.Get the render delay ofsink.see gst_base_sink_set_render_delay() for more information about the render delay.getStats()Return variousGstBaseSinkstatistics.booleangetSync()Checks if this BaseSink is currently configured to synchronize against the clock.longGet the time that will be inserted between frames to control the maximum buffers per second.protected voidGet the start and end times for syncing on this buffer.Get the synchronisation offset ofsink.static @Nullable TypegetType()Get the GType of the BaseSink classbooleanChecks if this BaseSink is currently configured to perform asynchronous state changes to PAUSED.booleanChecks if this BaseSink is currently configured to store the last received sample in the last-sample property.booleanChecks if this BaseSink is currently configured to send Quality-of-Service events upstream.protected FlowReturnCalled to prepare the buffer forrenderandpreroll.This function is called before synchronisation is performed.protected FlowReturnprepareList(BufferList bufferList) Called to prepare the buffer list forrenderList.This function is called before synchronisation is performed.protected FlowReturnCalled to present the preroll buffer if desired.protected booleanproposeAllocation(Query query) configure the allocation querybooleanperform aGstQueryon the element.booleanqueryLatency(@Nullable Out<Boolean> live, @Nullable Out<Boolean> upstreamLive, @Nullable ClockTime minLatency, @Nullable ClockTime maxLatency) Query the sink for the latency parameters.protected FlowReturnCalled when a buffer should be presented or output, at the correct moment if theGstBaseSinkhas been set to sync to the clock.protected FlowReturnrenderList(BufferList bufferList) Same asrenderbut used with buffer lists instead of buffers.voidsetAsyncEnabled(boolean enabled) Configures this BaseSink to perform all state changes asynchronously.voidsetBlocksize(int blocksize) Set the number of bytes that the sink will pull when it is operating in pull mode.protected booleanNotify subclass of changed capsvoidsetDropOutOfSegment(boolean dropOutOfSegment) Configure this BaseSink to drop buffers which are outside the current segmentvoidsetLastSampleEnabled(boolean enabled) Configures this BaseSink to store the last received sample in the last-sample property.voidsetMaxBitrate(long maxBitrate) Set the maximum amount of bits per second that the sink will render.voidsetMaxLateness(long maxLateness) Sets the new max lateness value tomaxLateness.This value is used to decide if a buffer should be dropped or not based on the buffer timestamp and the current clock time.voidsetProcessingDeadline(ClockTime processingDeadline) Maximum amount of time (in nanoseconds) that the pipeline can take for processing the buffer.voidsetQosEnabled(boolean enabled) Configures this BaseSink to send Quality-of-Service events upstream.voidsetRenderDelay(ClockTime delay) Set the render delay in this BaseSink todelay.The render delay is the time between actual rendering of a buffer and its synchronisation time.voidsetSync(boolean sync) Configures this BaseSink to synchronize on the clock or not.voidsetThrottleTime(long throttle) Set the time that will be inserted between rendered buffers.voidsetTsOffset(ClockTimeDiff offset) Adjust the synchronisation of this BaseSink withoffset.A negative value will render buffers earlier than their timestamp.protected booleanstart()Start processing.protected booleanstop()Stop processing.protected booleanunlock()Unlock any pending access to the resource.protected booleanClear the previous unlock request.wait_(ClockTime time, @Nullable ClockTimeDiff jitter) This function will wait for preroll to complete and will then block untiltimeis reached.waitClock(ClockTime time, @Nullable ClockTimeDiff jitter) This function will block untiltimeis reached.protected FlowReturnOverride this to implement custom logic to wait for the event time (for events like EOS and GAP).If theGstBaseSinkClass::render method performs its own synchronisation against the clock it must unblock when going from PLAYING to the PAUSED state and call this method before continuing to render the remaining data.Methods inherited from class org.freedesktop.gstreamer.gst.Element
abortState, addPad, addPropertyDeepNotifyWatch, addPropertyNotifyWatch, callAsync, changeState, continueState, createAllPads, decorateStreamId, decorateStreamIdPrintf, emitNoMorePads, emitPadAdded, emitPadRemoved, foreachPad, foreachSinkPad, foreachSrcPad, getBaseTime, getBus, getClock, getCompatiblePad, getCompatiblePadTemplate, getContext, getContexts, getContextUnlocked, getCurrentClockTime, getCurrentRunningTime, getFactory, getMetadata, getPadTemplate, getPadTemplateList, getRequestPad, getStartTime, getState, getStaticPad, isLockedState, iteratePads, iterateSinkPads, iterateSrcPads, link, linkFiltered, linkMany, linkPads, linkPadsFiltered, linkPadsFull, linkPadsFull, lostState, makeFromUri, messageFull, messageFull, messageFullWithDetails, messageFullWithDetails, noMorePads, onNoMorePads, onPadAdded, onPadRemoved, padAdded, padRemoved, postMessage, provideClock, queryConvert, queryDuration, queryPosition, register, releasePad, releaseRequestPad, removePad, removePropertyNotifyWatch, requestPad, requestPadSimple, seek, seek, seekSimple, seekSimple, sendEvent, setBaseTime, setBus, setClock, setContext, setLockedState, setStartTime, setState, stateChanged, stateChangeReturnGetName, stateGetName, syncStateWithParent, typeSetSkipDocumentation, unlink, unlinkMany, unlinkPadsMethods 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.InitiallyUnowned
builderMethods 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
-
BaseSink
Create a BaseSink proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
BaseSink
public BaseSink()Creates a new BaseSink.
-
-
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. -
doPreroll
If the this BaseSink spawns its own thread for pulling buffers from upstream it should call this method after it has pulled a buffer. If the element needed to preroll, this function will perform the preroll and will then block until the element state is changed.This function should be called with the PREROLL_LOCK held.
- Parameters:
obj- the mini object that caused the preroll- Returns:
FlowReturn.OKif the preroll completed and processing can continue. Any other return value should be returned from the render vmethod.
-
getBlocksize
public int getBlocksize()Get the number of bytes that the sink will pull when it is operating in pull mode.- Returns:
- the number of bytes this BaseSink will pull in pull mode.
-
getDropOutOfSegment
public boolean getDropOutOfSegment()Checks if this BaseSink is currently configured to drop buffers which are outside the current segment- Returns:
trueif the sink is configured to drop buffers outside the current segment.- Since:
- 1.12
-
getLastSample
Get the last sample that arrived in the sink and was used for preroll or for rendering. This property can be used to generate thumbnails.The
GstCapson the sample can be used to determine the type of the buffer.Free-function: gst_sample_unref
- Returns:
- a
GstSample. gst_sample_unref() after usage. This function returnsnullwhen no buffer has arrived in the sink yet or when the sink is not in PAUSED or PLAYING.
-
getLatency
Get the currently configured latency.- Returns:
- The configured latency.
-
getMaxBitrate
public long getMaxBitrate()Get the maximum amount of bits per second that the sink will render.- Returns:
- the maximum number of bits per second this BaseSink will render.
- Since:
- 1.2
-
getMaxLateness
public long getMaxLateness()Gets the max lateness value. See gst_base_sink_set_max_lateness() for more details.- Returns:
- The maximum time in nanoseconds that a buffer can be late before it is dropped and not rendered. A value of -1 means an unlimited time.
-
getProcessingDeadline
Get the processing deadline ofsink.see gst_base_sink_set_processing_deadline() for more information about the processing deadline.- Returns:
- the processing deadline
- Since:
- 1.16
-
getRenderDelay
Get the render delay ofsink.see gst_base_sink_set_render_delay() for more information about the render delay.- Returns:
- the render delay of
sink.
-
getStats
Return variousGstBaseSinkstatistics. This function returns aGstStructurewith nameapplication/x-gst-base-sink-statswith the following fields:- "average-rate" G_TYPE_DOUBLE average frame rate
- "dropped" G_TYPE_UINT64 Number of dropped frames
- "rendered" G_TYPE_UINT64 Number of rendered frames
- Returns:
- pointer to
GstStructure - Since:
- 1.18
-
getSync
public boolean getSync()Checks if this BaseSink is currently configured to synchronize against the clock.- Returns:
trueif the sink is configured to synchronize against the clock.
-
getThrottleTime
public long getThrottleTime()Get the time that will be inserted between frames to control the maximum buffers per second.- Returns:
- the number of nanoseconds this BaseSink will put between frames.
-
getTsOffset
Get the synchronisation offset ofsink.- Returns:
- The synchronisation offset.
-
isAsyncEnabled
public boolean isAsyncEnabled()Checks if this BaseSink is currently configured to perform asynchronous state changes to PAUSED.- Returns:
trueif the sink is configured to perform asynchronous state changes.
-
isLastSampleEnabled
public boolean isLastSampleEnabled()Checks if this BaseSink is currently configured to store the last received sample in the last-sample property.- Returns:
trueif the sink is configured to store the last received sample.
-
isQosEnabled
public boolean isQosEnabled()Checks if this BaseSink is currently configured to send Quality-of-Service events upstream.- Returns:
trueif the sink is configured to perform Quality-of-Service.
-
queryLatency
public boolean queryLatency(@Nullable Out<Boolean> live, @Nullable Out<Boolean> upstreamLive, @Nullable ClockTime minLatency, @Nullable ClockTime maxLatency) Query the sink for the latency parameters. The latency will be queried from the upstream elements.livewill betrueif this BaseSink is configured to synchronize against the clock.upstreamLivewill betrueif an upstream element is live.If both
liveandupstreamLivearetrue, the sink will want to compensate for the latency introduced by the upstream elements by setting theminLatencyto a strictly positive value.This function is mostly used by subclasses.
- Parameters:
live- if the sink is liveupstreamLive- if an upstream element is liveminLatency- the min latency of the upstream elementsmaxLatency- the max latency of the upstream elements- Returns:
trueif the query succeeded.
-
setAsyncEnabled
public void setAsyncEnabled(boolean enabled) Configures this BaseSink to perform all state changes asynchronously. When async is disabled, the sink will immediately go to PAUSED instead of waiting for a preroll buffer. This feature is useful if the sink does not synchronize against the clock or when it is dealing with sparse streams.- Parameters:
enabled- the new async value.
-
setBlocksize
public void setBlocksize(int blocksize) Set the number of bytes that the sink will pull when it is operating in pull mode.- Parameters:
blocksize- the blocksize in bytes
-
setDropOutOfSegment
public void setDropOutOfSegment(boolean dropOutOfSegment) Configure this BaseSink to drop buffers which are outside the current segment- Parameters:
dropOutOfSegment- drop buffers outside the segment- Since:
- 1.12
-
setLastSampleEnabled
public void setLastSampleEnabled(boolean enabled) Configures this BaseSink to store the last received sample in the last-sample property.- Parameters:
enabled- the new enable-last-sample value.
-
setMaxBitrate
public void setMaxBitrate(long maxBitrate) Set the maximum amount of bits per second that the sink will render.- Parameters:
maxBitrate- the max_bitrate in bits per second- Since:
- 1.2
-
setMaxLateness
public void setMaxLateness(long maxLateness) Sets the new max lateness value tomaxLateness.This value is used to decide if a buffer should be dropped or not based on the buffer timestamp and the current clock time. A value of -1 means an unlimited time.- Parameters:
maxLateness- the new max lateness value.
-
setProcessingDeadline
Maximum amount of time (in nanoseconds) that the pipeline can take for processing the buffer. This is added to the latency of live pipelines.This function is usually called by subclasses.
- Parameters:
processingDeadline- the new processing deadline in nanoseconds.- Since:
- 1.16
-
setQosEnabled
public void setQosEnabled(boolean enabled) Configures this BaseSink to send Quality-of-Service events upstream.- Parameters:
enabled- the new qos value.
-
setRenderDelay
Set the render delay in this BaseSink todelay.The render delay is the time between actual rendering of a buffer and its synchronisation time. Some devices might delay media rendering which can be compensated for with this function.After calling this function, this sink will report additional latency and other sinks will adjust their latency to delay the rendering of their media.
This function is usually called by subclasses.
- Parameters:
delay- the new delay
-
setSync
public void setSync(boolean sync) Configures this BaseSink to synchronize on the clock or not. Whensyncisfalse, incoming samples will be played as fast as possible. Ifsyncistrue, the timestamps of the incoming buffers will be used to schedule the exact render time of its contents.- Parameters:
sync- the new sync value.
-
setThrottleTime
public void setThrottleTime(long throttle) Set the time that will be inserted between rendered buffers. This can be used to control the maximum buffers per second that the sink will render.- Parameters:
throttle- the throttle time in nanoseconds
-
setTsOffset
Adjust the synchronisation of this BaseSink withoffset.A negative value will render buffers earlier than their timestamp. A positive value will delay rendering. This function can be used to fix playback of badly timestamped buffers.- Parameters:
offset- the new offset
-
wait_
This function will wait for preroll to complete and will then block untiltimeis reached. It is usually called by subclasses that use their own internal synchronisation but want to let some synchronization (like EOS) be handled by the base class.This function should only be called with the PREROLL_LOCK held (like when receiving an EOS event in the ::event vmethod or when handling buffers in ::render).
The
timeargument should be the running_time of when the timeout should happen and will be adjusted with any latency and offset configured in the sink.- Parameters:
time- the running_time to be reachedjitter- the jitter to be filled with time diff, ornull- Returns:
GstFlowReturn
-
waitClock
This function will block untiltimeis reached. It is usually called by subclasses that use their own internal synchronisation.If
timeis not valid, no synchronisation is done andClockReturn.BADTIMEis returned. Likewise, if synchronisation is disabled in the element or there is no clock, no synchronisation is done andClockReturn.BADTIMEis returned.This function should only be called with the PREROLL_LOCK held, like when receiving an EOS event in the
GstBaseSinkClass::event vmethod or when receiving a buffer in theGstBaseSinkClass::render vmethod.The
timeargument should be the running_time of when this method should return and is not adjusted with any latency or offset configured in the sink.- Parameters:
time- the running_time to be reachedjitter- the jitter to be filled with time diff, ornull- Returns:
GstClockReturn
-
waitPreroll
If theGstBaseSinkClass::render method performs its own synchronisation against the clock it must unblock when going from PLAYING to the PAUSED state and call this method before continuing to render the remaining data.If the
GstBaseSinkClass::render method can block on something else than the clock, it must also be ready to unblock immediately on theGstBaseSinkClass::unlock method and cause theGstBaseSinkClass::render method to immediately call this function. In this case, the subclass must be prepared to continue rendering where it left off if this function returnsFlowReturn.OK.This function will block until a state change to PLAYING happens (in which case this function returns
FlowReturn.OK) or the processing must be stopped due to a state change to READY or a FLUSH event (in which case this function returnsFlowReturn.FLUSHING).This function should only be called with the PREROLL_LOCK held, like in the render function.
- Returns:
FlowReturn.OKif the preroll completed and processing can continue. Any other return value should be returned from the render vmethod.
-
activatePull
protected boolean activatePull(boolean active) Subclasses should override this when they can provide an alternate method of spawning a thread to drive the pipeline in pull mode. Should start or stop the pulling thread, depending on the value of the "active" argument. Called after actually activating the sink pad in pull mode. The default implementation starts a task on the sink pad. -
event
Override this to handle events arriving on the sink pad -
fixate
-
getCaps
-
getTimes
-
prepare
Called to prepare the buffer forrenderandpreroll.This function is called before synchronisation is performed. -
prepareList
Called to prepare the buffer list forrenderList.This function is called before synchronisation is performed. -
preroll
Called to present the preroll buffer if desired. -
proposeAllocation
configure the allocation query -
query
-
render
Called when a buffer should be presented or output, at the correct moment if theGstBaseSinkhas been set to sync to the clock. -
renderList
Same asrenderbut used with buffer lists instead of buffers. -
setCaps
Notify subclass of changed caps -
start
protected boolean start()Start processing. Ideal for opening resources in the subclass -
stop
protected boolean stop()Stop processing. Subclasses should use this to close resources. -
unlock
protected boolean unlock()Unlock any pending access to the resource. Subclasses should unblock any blocked function ASAP and call gst_base_sink_wait_preroll() -
unlockStop
protected boolean unlockStop()Clear the previous unlock request. Subclasses should clear any state they set duringGstBaseSinkClass::unlock, and be ready to continue where they left off after gst_base_sink_wait_preroll(), gst_base_sink_wait() or gst_wait_sink_wait_clock() return orGstBaseSinkClass::render is called again. -
waitEvent
Override this to implement custom logic to wait for the event time (for events like EOS and GAP). Subclasses should always first chain up to the default implementation.
-