Package ch.bailu.gtk.gst
Klasse Pipeline
- Alle implementierten Schnittstellen:
PointerInterface
A #GstPipeline is a special #GstBin used as the toplevel container for
the filter graph. The #GstPipeline will manage the selection and
distribution of a global #GstClock as well as provide a #GstBus to the
application.
gst_pipeline_new() is used to create a pipeline. when you are done with
the pipeline, use gst_object_unref() to free its resources including all
added #GstElement objects (if not otherwise referenced).
Elements are added and removed from the pipeline using the #GstBin
methods like gst_bin_add() and gst_bin_remove() (see #GstBin).
Before changing the state of the #GstPipeline (see #GstElement) a #GstBus
should be retrieved with gst_pipeline_get_bus(). This #GstBus should then
be used to receive #GstMessage from the elements in the pipeline. Listening
to the #GstBus is necessary for retrieving error messages from the
#GstPipeline and otherwise the #GstPipeline might stop without any
indication, why. Furthermore, the #GstPipeline posts messages even if
nobody listens on the #GstBus, which will pile up and use up memory.
By default, a #GstPipeline will automatically flush the pending #GstBus
messages when going to the NULL state to ensure that no circular
references exist when no messages are read from the #GstBus. This
behaviour can be changed with gst_pipeline_set_auto_flush_bus().
When the #GstPipeline performs the PAUSED to PLAYING state change it will
select a clock for the elements. The clock selection algorithm will by
default select a clock provided by an element that is most upstream
(closest to the source). For live pipelines (ones that return
#GST_STATE_CHANGE_NO_PREROLL from the gst_element_set_state() call) this
will select the clock provided by the live source. For normal pipelines
this will select a clock provided by the sinks (most likely the audio
sink). If no element provides a clock, a default #GstSystemClock is used.
The clock selection can be controlled with the gst_pipeline_use_clock()
method, which will enforce a given clock on the pipeline. With
gst_pipeline_auto_clock() the default clock selection algorithm can be
restored.
A #GstPipeline maintains a running time for the elements. The running
time is defined as the difference between the current clock time and
the base time. When the pipeline goes to READY or a flushing seek is
performed on it, the running time is reset to 0. When the pipeline is
set from PLAYING to PAUSED, the current clock time is sampled and used to
configure the base time for the elements when the pipeline is set
to PLAYING again. The effect is that the running time (as the difference
between the clock time and the base time) will count how much time was spent
in the PLAYING state. This default behaviour can be changed with the
gst_element_set_start_time() method.
the filter graph. The #GstPipeline will manage the selection and
distribution of a global #GstClock as well as provide a #GstBus to the
application.
gst_pipeline_new() is used to create a pipeline. when you are done with
the pipeline, use gst_object_unref() to free its resources including all
added #GstElement objects (if not otherwise referenced).
Elements are added and removed from the pipeline using the #GstBin
methods like gst_bin_add() and gst_bin_remove() (see #GstBin).
Before changing the state of the #GstPipeline (see #GstElement) a #GstBus
should be retrieved with gst_pipeline_get_bus(). This #GstBus should then
be used to receive #GstMessage from the elements in the pipeline. Listening
to the #GstBus is necessary for retrieving error messages from the
#GstPipeline and otherwise the #GstPipeline might stop without any
indication, why. Furthermore, the #GstPipeline posts messages even if
nobody listens on the #GstBus, which will pile up and use up memory.
By default, a #GstPipeline will automatically flush the pending #GstBus
messages when going to the NULL state to ensure that no circular
references exist when no messages are read from the #GstBus. This
behaviour can be changed with gst_pipeline_set_auto_flush_bus().
When the #GstPipeline performs the PAUSED to PLAYING state change it will
select a clock for the elements. The clock selection algorithm will by
default select a clock provided by an element that is most upstream
(closest to the source). For live pipelines (ones that return
#GST_STATE_CHANGE_NO_PREROLL from the gst_element_set_state() call) this
will select the clock provided by the live source. For normal pipelines
this will select a clock provided by the sinks (most likely the audio
sink). If no element provides a clock, a default #GstSystemClock is used.
The clock selection can be controlled with the gst_pipeline_use_clock()
method, which will enforce a given clock on the pipeline. With
gst_pipeline_auto_clock() the default clock selection algorithm can be
restored.
A #GstPipeline maintains a running time for the elements. The running
time is defined as the difference between the current clock time and
the base time. When the pipeline goes to READY or a flushing seek is
performed on it, the running time is reset to 0. When the pipeline is
set from PLAYING to PAUSED, the current clock time is sampled and used to
configure the base time for the elements when the pipeline is set
to PLAYING again. The effect is that the running time (as the difference
between the clock time and the base time) will count how much time was spent
in the PLAYING state. This default behaviour can be changed with the
gst_element_set_start_time() method.
https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gst.Bin
Bin.OnDeepElementAdded, Bin.OnDeepElementRemoved, Bin.OnDoLatency, Bin.OnElementAdded, Bin.OnElementRemoved
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gst.Element
Element.OnDestroyNotify, Element.OnElementCallAsyncFunc, Element.OnElementForeachPadFunc, Element.OnNoMorePads, Element.OnPadAdded, Element.OnPadRemoved
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
Von Klasse geerbte Felder ch.bailu.gtk.gst.Bin
SIGNAL_ON_DEEP_ELEMENT_ADDED, SIGNAL_ON_DEEP_ELEMENT_REMOVED, SIGNAL_ON_DO_LATENCY, SIGNAL_ON_ELEMENT_ADDED, SIGNAL_ON_ELEMENT_REMOVED
Von Klasse geerbte Felder ch.bailu.gtk.gst.Element
SIGNAL_ON_NO_MORE_PADS, SIGNAL_ON_PAD_ADDED, SIGNAL_ON_PAD_REMOVED
Von Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungImplements interfaceChildProxy
.void
Let @pipeline select a clock automatically.boolean
Check if @pipeline will automatically flush messages when going to
the NULL state.getBus()
Gets the #GstBus of @pipeline.static ClassHandler
getClock()
Gets the current clock used by @pipeline.long
Return the configured latency on @pipeline.long
getDelay()
Get the configured delay (see gst_pipeline_set_delay()).static int
long
Gets the latency that should be configured on the pipeline.static long
static TypeSystem.TypeSize
Gets the current clock used by @pipeline.static long
static TypeSystem.TypeSize
boolean
isLive()
Check if @pipeline is live.void
setAutoFlushBus
(boolean auto_flush) Usually, when a pipeline goes from READY to NULL state, it automatically
flushes all pending messages on the bus, which is done for refcounting
purposes, to break circular references.boolean
Set the clock for @pipeline.void
setDelay
(long delay) Set the expected delay needed for all elements to perform the
PAUSED to PLAYING state change.void
setLatency
(long latency) Sets the latency that should be configured on the pipeline.void
Force @pipeline to use the given @clock.Von Klasse geerbte Methoden ch.bailu.gtk.gst.Bin
add, addMany, findUnlinkedPad, getByInterface, getByName, getByName, getByNameRecurseUp, getByNameRecurseUp, getSuppressedFlags, iterateAllByElementFactoryName, iterateAllByElementFactoryName, iterateAllByInterface, iterateElements, iterateRecurse, iterateSinks, iterateSorted, iterateSources, onDeepElementAdded, onDeepElementRemoved, onDoLatency, onElementAdded, onElementRemoved, recalculateLatency, remove, removeMany, setSuppressedFlags, syncChildrenStates
Von Klasse geerbte Methoden ch.bailu.gtk.gst.Element
abortState, addPad, addPropertyDeepNotifyWatch, addPropertyDeepNotifyWatch, addPropertyNotifyWatch, addPropertyNotifyWatch, callAsync, changeState, continueState, createAllPads, decorateStreamId, decorateStreamId, decorateStreamIdPrintf, decorateStreamIdPrintf, foreachPad, foreachSinkPad, foreachSrcPad, getBaseTime, getCompatiblePad, getCompatiblePadTemplate, getContext, getContext, getContexts, getContextUnlocked, getContextUnlocked, getCurrentClockTime, getCurrentRunningTime, getFactory, getMetadata, getMetadata, getPadTemplate, getPadTemplate, getPadTemplateList, getRequestPad, getRequestPad, getStartTime, getState, getStaticPad, getStaticPad, isLockedState, iteratePads, iterateSinkPads, iterateSrcPads, link, linkFiltered, linkMany, linkPads, linkPads, linkPadsFiltered, linkPadsFiltered, linkPadsFull, linkPadsFull, lostState, makeFromUri, messageFull, messageFull, messageFullWithDetails, messageFullWithDetails, noMorePads, onNoMorePads, onPadAdded, onPadRemoved, postMessage, provideClock, query, register, releaseRequestPad, removePad, removePropertyNotifyWatch, requestPad, requestPad, requestPadSimple, requestPadSimple, seek, seekSimple, sendEvent, setBaseTime, setBus, setContext, setLockedState, setStartTime, setState, stateChangeReturnGetName, stateGetName, syncStateWithParent, typeSetSkipDocumentation, unlink, unlinkMany, unlinkPads, unlinkPads
Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
Pipeline
-
Pipeline
Create a new pipeline with the given name.- Parameter:
name
- name of new pipeline
-
Pipeline
Create a new pipeline with the given name.- Parameter:
name
- name of new pipeline
-
-
Methodendetails
-
getClassHandler
-
autoClock
public void autoClock()Let @pipeline select a clock automatically. This is the default
behaviour.
Use this function if you previous forced a fixed clock with
gst_pipeline_use_clock() and want to restore the default
pipeline clock selection algorithm.
MT safe. -
getAutoFlushBus
public boolean getAutoFlushBus()Check if @pipeline will automatically flush messages when going to
the NULL state.- Gibt zurück:
- whether the pipeline will automatically flush its bus when going from READY to NULL state or not. MT safe.
-
getBus
Gets the #GstBus of @pipeline. The bus allows applications to receive
#GstMessage packets. -
getClock
Gets the current clock used by @pipeline. Users of object
oriented languages should use gst_pipeline_get_pipeline_clock()
to avoid confusion with gst_element_get_clock() which has a different behavior.
Unlike gst_element_get_clock(), this function will always return a
clock, even if the pipeline is not in the PLAYING state. -
getConfiguredLatency
public long getConfiguredLatency()Return the configured latency on @pipeline.- Gibt zurück:
- @pipeline configured latency, or %GST_CLOCK_TIME_NONE if none has been configured because @pipeline did not reach the PLAYING state yet. MT safe.
-
getDelay
public long getDelay()Get the configured delay (see gst_pipeline_set_delay()).- Gibt zurück:
- The configured delay. MT safe.
-
getLatency
public long getLatency()Gets the latency that should be configured on the pipeline. See
gst_pipeline_set_latency().- Gibt zurück:
- Latency to configure on the pipeline or GST_CLOCK_TIME_NONE
-
getPipelineClock
Gets the current clock used by @pipeline.
Unlike gst_element_get_clock(), this function will always return a
clock, even if the pipeline is not in the PLAYING state.- Gibt zurück:
- a #GstClock, unref after usage.
-
isLive
public boolean isLive()Check if @pipeline is live.- Gibt zurück:
- %TRUE if @pipeline is live, %FALSE if not or if it did not reach the PAUSED state yet. MT safe.
-
setAutoFlushBus
public void setAutoFlushBus(boolean auto_flush) Usually, when a pipeline goes from READY to NULL state, it automatically
flushes all pending messages on the bus, which is done for refcounting
purposes, to break circular references.
This means that applications that update state using (async) bus messages
(e.g. do certain things when a pipeline goes from PAUSED to READY) might
not get to see messages when the pipeline is shut down, because they might
be flushed before they can be dispatched in the main thread. This behaviour
can be disabled using this function.
It is important that all messages on the bus are handled when the
automatic flushing is disabled else memory leaks will be introduced.
MT safe.- Parameter:
auto_flush
- whether or not to automatically flush the bus when the pipeline goes from READY to NULL state
-
setClock
Set the clock for @pipeline. The clock will be distributed
to all the elements managed by the pipeline. -
setDelay
public void setDelay(long delay) Set the expected delay needed for all elements to perform the
PAUSED to PLAYING state change. @delay will be added to the
base time of the elements so that they wait an additional @delay
amount of time before starting to process buffers and cannot be
#GST_CLOCK_TIME_NONE.
This option is used for tuning purposes and should normally not be
used.
MT safe.- Parameter:
delay
- the delay
-
setLatency
public void setLatency(long latency) Sets the latency that should be configured on the pipeline. Setting
GST_CLOCK_TIME_NONE will restore the default behaviour of using the minimum
latency from the LATENCY query. Setting this is usually not required and
the pipeline will figure out an appropriate latency automatically.
Setting a too low latency, especially lower than the minimum latency from
the LATENCY query, will most likely cause the pipeline to fail.- Parameter:
latency
- latency to configure
-
useClock
Force @pipeline to use the given @clock. The pipeline will
always use the given clock even if new clock providers are added
to this pipeline.
If @clock is %NULL all clocking will be disabled which will make
the pipeline run as fast as possible.
MT safe.- Parameter:
clock
- the clock to use
-
asChildProxy
Implements interfaceChildProxy
. Call this to get access to interface functions.- Setzt außer Kraft:
asChildProxy
in KlasseBin
- Gibt zurück:
ChildProxy
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-