Package ch.bailu.gtk.gst
Klasse Element
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gst.Element
- Alle implementierten Schnittstellen:
PointerInterface
- Bekannte direkte Unterklassen:
Bin
GstElement is the abstract base class needed to construct an element that
can be used in a GStreamer pipeline. Please refer to the plugin writers
guide for more information on creating #GstElement subclasses.
The name of a #GstElement can be get with gst_element_get_name() and set with
gst_element_set_name(). For speed, GST_ELEMENT_NAME() can be used in the
core when using the appropriate locking. Do not use this in plug-ins or
applications in order to retain ABI compatibility.
Elements can have pads (of the type #GstPad). These pads link to pads on
other elements. #GstBuffer flow between these linked pads.
A #GstElement has a #GList of #GstPad structures for all their input (or sink)
and output (or source) pads.
Core and plug-in writers can add and remove pads with gst_element_add_pad()
and gst_element_remove_pad().
An existing pad of an element can be retrieved by name with
gst_element_get_static_pad(). A new dynamic pad can be created using
gst_element_request_pad() with a #GstPadTemplate.
An iterator of all pads can be retrieved with gst_element_iterate_pads().
Elements can be linked through their pads.
If the link is straightforward, use the gst_element_link()
convenience function to link two elements, or gst_element_link_many()
for more elements in a row.
Use gst_element_link_filtered() to link two elements constrained by
a specified set of #GstCaps.
For finer control, use gst_element_link_pads() and
gst_element_link_pads_filtered() to specify the pads to link on
each element by name.
Each element has a state (see #GstState). You can get and set the state
of an element with gst_element_get_state() and gst_element_set_state().
Setting a state triggers a #GstStateChange. To get a string representation
of a #GstState, use gst_element_state_get_name().
You can get and set a #GstClock on an element using gst_element_get_clock()
and gst_element_set_clock().
Some elements can provide a clock for the pipeline if
the #GST_ELEMENT_FLAG_PROVIDE_CLOCK flag is set. With the
gst_element_provide_clock() method one can retrieve the clock provided by
such an element.
Not all elements require a clock to operate correctly. If the
#GST_ELEMENT_FLAG_REQUIRE_CLOCK() flag is set, a clock should be set on the
element with gst_element_set_clock().
Note that clock selection and distribution is normally handled by the
toplevel #GstPipeline so the clock functions are only to be used in very
specific situations.
can be used in a GStreamer pipeline. Please refer to the plugin writers
guide for more information on creating #GstElement subclasses.
The name of a #GstElement can be get with gst_element_get_name() and set with
gst_element_set_name(). For speed, GST_ELEMENT_NAME() can be used in the
core when using the appropriate locking. Do not use this in plug-ins or
applications in order to retain ABI compatibility.
Elements can have pads (of the type #GstPad). These pads link to pads on
other elements. #GstBuffer flow between these linked pads.
A #GstElement has a #GList of #GstPad structures for all their input (or sink)
and output (or source) pads.
Core and plug-in writers can add and remove pads with gst_element_add_pad()
and gst_element_remove_pad().
An existing pad of an element can be retrieved by name with
gst_element_get_static_pad(). A new dynamic pad can be created using
gst_element_request_pad() with a #GstPadTemplate.
An iterator of all pads can be retrieved with gst_element_iterate_pads().
Elements can be linked through their pads.
If the link is straightforward, use the gst_element_link()
convenience function to link two elements, or gst_element_link_many()
for more elements in a row.
Use gst_element_link_filtered() to link two elements constrained by
a specified set of #GstCaps.
For finer control, use gst_element_link_pads() and
gst_element_link_pads_filtered() to specify the pads to link on
each element by name.
Each element has a state (see #GstState). You can get and set the state
of an element with gst_element_get_state() and gst_element_set_state().
Setting a state triggers a #GstStateChange. To get a string representation
of a #GstState, use gst_element_state_get_name().
You can get and set a #GstClock on an element using gst_element_get_clock()
and gst_element_set_clock().
Some elements can provide a clock for the pipeline if
the #GST_ELEMENT_FLAG_PROVIDE_CLOCK flag is set. With the
gst_element_provide_clock() method one can retrieve the clock provided by
such an element.
Not all elements require a clock to operate correctly. If the
#GST_ELEMENT_FLAG_REQUIRE_CLOCK() flag is set, a clock should be set on the
element with gst_element_set_clock().
Note that clock selection and distribution is normally handled by the
toplevel #GstPipeline so the clock functions are only to be used in very
specific situations.
https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interface
static interface
static interface
static interface
static interface
static interface
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
FelderVon Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
Abort the state change of the element.boolean
Adds a pad (link point) to @element.long
addPropertyDeepNotifyWatch
(Str property_name, boolean include_value) long
addPropertyDeepNotifyWatch
(String property_name, boolean include_value) long
addPropertyNotifyWatch
(Str property_name, boolean include_value) long
addPropertyNotifyWatch
(String property_name, boolean include_value) void
callAsync
(Element.OnElementCallAsyncFunc func, Pointer user_data, Element.OnDestroyNotify destroy_notify) Calls @func from another thread and passes @user_data to it.int
changeState
(int transition) Perform @transition on @element.int
continueState
(int ret) Commit the state change of the element and proceed to the next
pending state if any.void
Creates a pad for each pad template that is always available.decorateStreamId
(Str stream_id) Creates a stream-id for @element by combining the upstream information with
the @stream_id.decorateStreamId
(String stream_id) Creates a stream-id for @element by combining the upstream information with
the @stream_id.decorateStreamIdPrintf
(Str format, Object... _ellipsis) Creates a stream-id for @element by combining the upstream information with
the @format.decorateStreamIdPrintf
(String format, Object... _ellipsis) Creates a stream-id for @element by combining the upstream information with
the @format.boolean
foreachPad
(Element.OnElementForeachPadFunc func, Pointer user_data) Call @func with @user_data for each of @element's pads.boolean
foreachSinkPad
(Element.OnElementForeachPadFunc func, Pointer user_data) Call @func with @user_data for each of @element's sink pads.boolean
foreachSrcPad
(Element.OnElementForeachPadFunc func, Pointer user_data) Call @func with @user_data for each of @element's source pads.long
Returns the base time of the element.getBus()
Returns the bus of the element.static ClassHandler
getClock()
Gets the currently configured clock of the element.getCompatiblePad
(Pad pad, Caps caps) Looks for an unlinked pad to which the given pad can link.getCompatiblePadTemplate
(PadTemplate compattempl) Retrieves a pad template from @element that is compatible with @compattempl.getContext
(Str context_type) Gets the context with @context_type set on the element or NULL.getContext
(String context_type) Gets the context with @context_type set on the element or NULL.Gets the contexts set on the element.getContextUnlocked
(Str context_type) Gets the context with @context_type set on the element or NULL.getContextUnlocked
(String context_type) Gets the context with @context_type set on the element or NULL.long
Returns the current clock time of the element, as in, the time of the
element's clock, or GST_CLOCK_TIME_NONE if there is no clock.long
Returns the running time of the element.Retrieves the factory that was used to create this element.static int
getMetadata
(Str key) Get metadata with @key in @klass.getMetadata
(String key) Get metadata with @key in @klass.getPadTemplate
(Str name) Retrieves a padtemplate from @element with the given name.getPadTemplate
(String name) Retrieves a padtemplate from @element with the given name.Retrieves a list of the pad templates associated with @element.static long
static TypeSystem.TypeSize
getRequestPad
(Str name) Veraltet.getRequestPad
(String name) Veraltet.long
Returns the start time of the element.int
Gets the state of the element.getStaticPad
(Str name) Retrieves a pad from @element by name.getStaticPad
(String name) Retrieves a pad from @element by name.static long
static TypeSystem.TypeSize
boolean
Checks if the state of an element is locked.Retrieves an iterator of @element's pads.Retrieves an iterator of @element's sink pads.Retrieves an iterator of @element's source pads.boolean
Links @src to @dest.boolean
linkFiltered
(Element dest, Caps filter) Links @src to @dest using the given caps as filtercaps.boolean
Chain together a series of elements.boolean
Links the two named pads of the source and destination elements.boolean
Links the two named pads of the source and destination elements.boolean
linkPadsFiltered
(Str srcpadname, Element dest, Str destpadname, Caps filter) Links the two named pads of the source and destination elements.boolean
linkPadsFiltered
(String srcpadname, Element dest, String destpadname, Caps filter) Links the two named pads of the source and destination elements.boolean
linkPadsFull
(Str srcpadname, Element dest, Str destpadname, int flags) Links the two named pads of the source and destination elements.boolean
linkPadsFull
(String srcpadname, Element dest, String destpadname, int flags) Links the two named pads of the source and destination elements.void
Brings the element to the lost state.static Element
makeFromUri
(int type, Str uri, Str elementname) Creates an element for handling the given URI.void
messageFull
(int type, int domain, int code, Str text, Str debug, Str file, Str function, int line) Post an error, warning or info message on the bus from inside an element.void
messageFull
(int type, int domain, int code, Str text, Str debug, String file, String function, int line) Post an error, warning or info message on the bus from inside an element.void
messageFullWithDetails
(int type, int domain, int code, Str text, Str debug, Str file, Str function, int line, Structure structure) Post an error, warning or info message on the bus from inside an element.void
messageFullWithDetails
(int type, int domain, int code, Str text, Str debug, String file, String function, int line, Structure structure) Post an error, warning or info message on the bus from inside an element.void
Use this function to signal that the element does not expect any more pads
to show up in the current pipeline.onNoMorePads
(Element.OnNoMorePads signal) Connect to signal "no-more-pads".onPadAdded
(Element.OnPadAdded signal) Connect to signal "pad-added".onPadRemoved
(Element.OnPadRemoved signal) Connect to signal "pad-removed".boolean
postMessage
(Message message) Post a message on the element's #GstBus.Get the clock provided by the given element.boolean
Performs a query on the given element.static boolean
Create a new elementfactory capable of instantiating objects of the
@type and add the factory to @plugin.void
releaseRequestPad
(Pad pad) Makes the element free the previously requested pad as obtained
with gst_element_request_pad().boolean
Removes @pad from @element.void
removePropertyNotifyWatch
(long watch_id) requestPad
(PadTemplate templ, Str name, Caps caps) Retrieves a request pad from the element according to the provided template.requestPad
(PadTemplate templ, String name, Caps caps) Retrieves a request pad from the element according to the provided template.requestPadSimple
(Str name) Retrieves a pad from the element by name (e.g.requestPadSimple
(String name) Retrieves a pad from the element by name (e.g.boolean
seek
(double rate, int format, int flags, int start_type, long start, int stop_type, long stop) Sends a seek event to an element.boolean
seekSimple
(int format, int seek_flags, long seek_pos) Simple API to perform a seek on the given element, meaning it just seeks
to the given position relative to the start of the stream.boolean
Sends an event to an element.void
setBaseTime
(long time) Set the base time of an element.void
Sets the bus of the element.boolean
Sets the clock for the element.void
setContext
(Context context) Sets the context of the element.boolean
setLockedState
(boolean locked_state) Locks the state of an element, so state changes of the parent don't affect
this element anymore.void
setStartTime
(long time) Set the start time of an element.int
setState
(int state) Sets the state of the element.static Str
stateChangeReturnGetName
(int state_ret) Gets a string representing the given state change result.static Str
stateGetName
(int state) Gets a string representing the given state.boolean
Tries to change the state of the element to the same as its parent.static void
typeSetSkipDocumentation
(long type) Marks @type as "documentation should be skipped".void
Unlinks all source pads of the source element with all sink pads
of the sink element to which they are linked.void
unlinkMany
(Element element_2, Object... _ellipsis) Unlinks a series of elements.void
unlinkPads
(Str srcpadname, Element dest, Str destpadname) Unlinks the two named pads of the source and destination elements.void
unlinkPads
(String srcpadname, Element dest, String destpadname) Unlinks the two named pads of the source and destination elements.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
-
Felddetails
-
SIGNAL_ON_NO_MORE_PADS
- Siehe auch:
-
SIGNAL_ON_PAD_ADDED
- Siehe auch:
-
SIGNAL_ON_PAD_REMOVED
- Siehe auch:
-
-
Konstruktordetails
-
Element
-
-
Methodendetails
-
getClassHandler
-
abortState
public void abortState()Abort the state change of the element. This function is used
by elements that do asynchronous state changes and find out
something is wrong.
This function should be called with the STATE_LOCK held.
MT safe. -
addPad
Adds a pad (link point) to @element. @pad's parent will be set to @element;
see gst_object_set_parent() for refcounting information.
Pads are automatically activated when added in the PAUSED or PLAYING
state.
The pad and the element should be unlocked when calling this function.
This function will emit the #GstElement::pad-added signal on the element.- Parameter:
pad
- the #GstPad to add to the element.- Gibt zurück:
- %TRUE if the pad could be added. This function can fail when a pad with the same name already existed or the pad already had another parent. MT safe.
-
addPropertyDeepNotifyWatch
- Parameter:
property_name
- name of property to watch for changes, or NULL to watch all propertiesinclude_value
- whether to include the new property value in the message- Gibt zurück:
- a watch id, which can be used in connection with gst_element_remove_property_notify_watch() to remove the watch again.
-
addPropertyDeepNotifyWatch
- Parameter:
property_name
- name of property to watch for changes, or NULL to watch all propertiesinclude_value
- whether to include the new property value in the message- Gibt zurück:
- a watch id, which can be used in connection with gst_element_remove_property_notify_watch() to remove the watch again.
-
addPropertyNotifyWatch
- Parameter:
property_name
- name of property to watch for changes, or NULL to watch all propertiesinclude_value
- whether to include the new property value in the message- Gibt zurück:
- a watch id, which can be used in connection with gst_element_remove_property_notify_watch() to remove the watch again.
-
addPropertyNotifyWatch
- Parameter:
property_name
- name of property to watch for changes, or NULL to watch all propertiesinclude_value
- whether to include the new property value in the message- Gibt zurück:
- a watch id, which can be used in connection with gst_element_remove_property_notify_watch() to remove the watch again.
-
callAsync
public void callAsync(Element.OnElementCallAsyncFunc func, @Nullable Pointer user_data, Element.OnDestroyNotify destroy_notify) Calls @func from another thread and passes @user_data to it. This is to be
used for cases when a state change has to be performed from a streaming
thread, directly via gst_element_set_state() or indirectly e.g. via SEEK
events.
Calling those functions directly from the streaming thread will cause
deadlocks in many situations, as they might involve waiting for the
streaming thread to shut down from this very streaming thread.
MT safe.- Parameter:
func
- Function to call asynchronously from another threaduser_data
- Data to pass to @funcdestroy_notify
- GDestroyNotify for @user_data
-
changeState
public int changeState(int transition) Perform @transition on @element.
This function must be called with STATE_LOCK held and is mainly used
internally.- Parameter:
transition
- the requested transition- Gibt zurück:
- the #GstStateChangeReturn of the state transition.
-
continueState
public int continueState(int ret) Commit the state change of the element and proceed to the next
pending state if any. This function is used
by elements that do asynchronous state changes.
The core will normally call this method automatically when an
element returned %GST_STATE_CHANGE_SUCCESS from the state change function.
If after calling this method the element still has not reached
the pending state, the next state change is performed.
This method is used internally and should normally not be called by plugins
or applications.
This function must be called with STATE_LOCK held.- Parameter:
ret
- The previous state return value- Gibt zurück:
- The result of the commit state change. MT safe.
-
createAllPads
public void createAllPads()Creates a pad for each pad template that is always available.
This function is only useful during object initialization of
subclasses of #GstElement. -
decorateStreamId
Creates a stream-id for @element by combining the upstream information with
the @stream_id.
This function generates an unique stream-id by getting the upstream
stream-start event stream ID and appending @stream_id to it. If the element
has no sinkpad it will generate an upstream stream-id by doing an URI query
on the element and in the worst case just uses a random number. Source
elements that don't implement the URI handler interface should ideally
generate a unique, deterministic stream-id manually instead.
Since stream IDs are sorted alphabetically, any numbers in the stream ID
should be printed with a fixed number of characters, preceded by 0's, such as
by using the format \%03u instead of \%u.- Parameter:
stream_id
- The stream-id- Gibt zurück:
- A stream-id for @element.
-
decorateStreamId
Creates a stream-id for @element by combining the upstream information with
the @stream_id.
This function generates an unique stream-id by getting the upstream
stream-start event stream ID and appending @stream_id to it. If the element
has no sinkpad it will generate an upstream stream-id by doing an URI query
on the element and in the worst case just uses a random number. Source
elements that don't implement the URI handler interface should ideally
generate a unique, deterministic stream-id manually instead.
Since stream IDs are sorted alphabetically, any numbers in the stream ID
should be printed with a fixed number of characters, preceded by 0's, such as
by using the format \%03u instead of \%u.- Parameter:
stream_id
- The stream-id- Gibt zurück:
- A stream-id for @element.
-
decorateStreamIdPrintf
Creates a stream-id for @element by combining the upstream information with
the @format.
This function generates an unique stream-id by getting the upstream
stream-start event stream ID and appending the stream-id to it. If the element
has no sinkpad it will generate an upstream stream-id by doing an URI query
on the element and in the worst case just uses a random number. Source
elements that don't implement the URI handler interface should ideally
generate a unique, deterministic stream-id manually instead.
Since stream IDs are sorted alphabetically, any numbers in the stream ID
should be printed with a fixed number of characters, preceded by 0's, such as
by using the format \%03u instead of \%u.- Parameter:
format
- The stream-id_ellipsis
-- Gibt zurück:
- A stream-id for @element.
-
decorateStreamIdPrintf
Creates a stream-id for @element by combining the upstream information with
the @format.
This function generates an unique stream-id by getting the upstream
stream-start event stream ID and appending the stream-id to it. If the element
has no sinkpad it will generate an upstream stream-id by doing an URI query
on the element and in the worst case just uses a random number. Source
elements that don't implement the URI handler interface should ideally
generate a unique, deterministic stream-id manually instead.
Since stream IDs are sorted alphabetically, any numbers in the stream ID
should be printed with a fixed number of characters, preceded by 0's, such as
by using the format \%03u instead of \%u.- Parameter:
format
- The stream-id_ellipsis
-- Gibt zurück:
- A stream-id for @element.
-
foreachPad
Call @func with @user_data for each of @element's pads. @func will be called
exactly once for each pad that exists at the time of this call, unless
one of the calls to @func returns %FALSE in which case we will stop
iterating pads and return early. If new pads are added or pads are removed
while pads are being iterated, this will not be taken into account until
next time this function is used.- Parameter:
func
- function to call for each paduser_data
- user data passed to @func- Gibt zurück:
- %FALSE if @element had no pads or if one of the calls to @func returned %FALSE.
-
foreachSinkPad
Call @func with @user_data for each of @element's sink pads. @func will be
called exactly once for each sink pad that exists at the time of this call,
unless one of the calls to @func returns %FALSE in which case we will stop
iterating pads and return early. If new sink pads are added or sink pads
are removed while the sink pads are being iterated, this will not be taken
into account until next time this function is used.- Parameter:
func
- function to call for each sink paduser_data
- user data passed to @func- Gibt zurück:
- %FALSE if @element had no sink pads or if one of the calls to @func returned %FALSE.
-
foreachSrcPad
Call @func with @user_data for each of @element's source pads. @func will be
called exactly once for each source pad that exists at the time of this call,
unless one of the calls to @func returns %FALSE in which case we will stop
iterating pads and return early. If new source pads are added or source pads
are removed while the source pads are being iterated, this will not be taken
into account until next time this function is used.- Parameter:
func
- function to call for each source paduser_data
- user data passed to @func- Gibt zurück:
- %FALSE if @element had no source pads or if one of the calls to @func returned %FALSE.
-
getBaseTime
public long getBaseTime()Returns the base time of the element. The base time is the
absolute time of the clock when this element was last put to
PLAYING. Subtracting the base time from the clock time gives
the running time of the element.- Gibt zurück:
- the base time of the element. MT safe.
-
getBus
Returns the bus of the element. Note that only a #GstPipeline will provide a
bus for the application.- Gibt zurück:
- the element's #GstBus. unref after usage. MT safe.
-
getClock
Gets the currently configured clock of the element. This is the clock as was
last set with gst_element_set_clock().
Elements in a pipeline will only have their clock set when the
pipeline is in the PLAYING state.- Gibt zurück:
- the #GstClock of the element. unref after usage. MT safe.
-
getCompatiblePad
Looks for an unlinked pad to which the given pad can link. It is not
guaranteed that linking the pads will work, though it should work in most
cases.
This function will first attempt to find a compatible unlinked ALWAYS pad,
and if none can be found, it will request a compatible REQUEST pad by looking
at the templates of @element.- Parameter:
pad
- the #GstPad to find a compatible one for.caps
- the #GstCaps to use as a filter.- Gibt zurück:
- the #GstPad to which a link can be made, or %NULL if one cannot be found. gst_object_unref() after usage.
-
getCompatiblePadTemplate
Retrieves a pad template from @element that is compatible with @compattempl.
Pads from compatible templates can be linked together.- Parameter:
compattempl
- the #GstPadTemplate to find a compatible template for- Gibt zurück:
- a compatible #GstPadTemplate, or %NULL if none was found. No unreferencing is necessary.
-
getContext
Gets the context with @context_type set on the element or NULL.
MT safe.- Parameter:
context_type
- a name of a context to retrieve- Gibt zurück:
- A #GstContext or NULL
-
getContext
Gets the context with @context_type set on the element or NULL.
MT safe.- Parameter:
context_type
- a name of a context to retrieve- Gibt zurück:
- A #GstContext or NULL
-
getContextUnlocked
Gets the context with @context_type set on the element or NULL.- Parameter:
context_type
- a name of a context to retrieve- Gibt zurück:
- A #GstContext or NULL
-
getContextUnlocked
Gets the context with @context_type set on the element or NULL.- Parameter:
context_type
- a name of a context to retrieve- Gibt zurück:
- A #GstContext or NULL
-
getContexts
Gets the contexts set on the element.
MT safe.- Gibt zurück:
- List of #GstContext
-
getCurrentClockTime
public long getCurrentClockTime()Returns the current clock time of the element, as in, the time of the
element's clock, or GST_CLOCK_TIME_NONE if there is no clock.- Gibt zurück:
- the clock time of the element, or GST_CLOCK_TIME_NONE if there is no clock.
-
getCurrentRunningTime
public long getCurrentRunningTime()Returns the running time of the element. The running time is the
element's clock time minus its base time. Will return GST_CLOCK_TIME_NONE
if the element has no clock, or if its base time has not been set.- Gibt zurück:
- the running time of the element, or GST_CLOCK_TIME_NONE if the element has no clock or its base time has not been set.
-
getFactory
Retrieves the factory that was used to create this element.- Gibt zurück:
- the #GstElementFactory used for creating this element or %NULL if element has not been registered (static element). no refcounting is needed.
-
getMetadata
Get metadata with @key in @klass.- Parameter:
key
- the key to get- Gibt zurück:
- the metadata for @key.
-
getMetadata
Get metadata with @key in @klass.- Parameter:
key
- the key to get- Gibt zurück:
- the metadata for @key.
-
getPadTemplate
Retrieves a padtemplate from @element with the given name.- Parameter:
name
- the name of the #GstPadTemplate to get.- Gibt zurück:
- the #GstPadTemplate with the given name, or %NULL if none was found. No unreferencing is necessary.
-
getPadTemplate
Retrieves a padtemplate from @element with the given name.- Parameter:
name
- the name of the #GstPadTemplate to get.- Gibt zurück:
- the #GstPadTemplate with the given name, or %NULL if none was found. No unreferencing is necessary.
-
getPadTemplateList
Retrieves a list of the pad templates associated with @element. The
list must not be modified by the calling code.- Gibt zurück:
- the #GList of pad templates.
-
getRequestPad
Veraltet.The name of this function is confusing to people learning GStreamer.
gst_element_request_pad_simple() aims at making it more explicit it is
a simplified gst_element_request_pad().- Parameter:
name
- the name of the request #GstPad to retrieve.- Gibt zurück:
- requested #GstPad if found, otherwise %NULL. Release after usage.
-
getRequestPad
Veraltet.The name of this function is confusing to people learning GStreamer.
gst_element_request_pad_simple() aims at making it more explicit it is
a simplified gst_element_request_pad().- Parameter:
name
- the name of the request #GstPad to retrieve.- Gibt zurück:
- requested #GstPad if found, otherwise %NULL. Release after usage.
-
getStartTime
public long getStartTime()Returns the start time of the element. The start time is the
running time of the clock when this element was last put to PAUSED.
Usually the start_time is managed by a toplevel element such as
#GstPipeline.
MT safe.- Gibt zurück:
- the start time of the element.
-
getState
Gets the state of the element.
For elements that performed an ASYNC state change, as reported by
gst_element_set_state(), this function will block up to the
specified timeout value for the state change to complete.
If the element completes the state change or goes into
an error, this function returns immediately with a return value of
%GST_STATE_CHANGE_SUCCESS or %GST_STATE_CHANGE_FAILURE respectively.
For elements that did not return %GST_STATE_CHANGE_ASYNC, this function
returns the current and pending state immediately.
This function returns %GST_STATE_CHANGE_NO_PREROLL if the element
successfully changed its state but is not able to provide data yet.
This mostly happens for live sources that only produce data in
%GST_STATE_PLAYING. While the state change return is equivalent to
%GST_STATE_CHANGE_SUCCESS, it is returned to the application to signal that
some sink elements might not be able to complete their state change because
an element is not producing data to complete the preroll. When setting the
element to playing, the preroll will complete and playback will start.- Parameter:
state
- a pointer to #GstState to hold the state. Can be %NULL.pending
- a pointer to #GstState to hold the pending state. Can be %NULL.timeout
- a #GstClockTime to specify the timeout for an async state change or %GST_CLOCK_TIME_NONE for infinite timeout.- Gibt zurück:
- %GST_STATE_CHANGE_SUCCESS if the element has no more pending state and the last state change succeeded, %GST_STATE_CHANGE_ASYNC if the element is still performing a state change or %GST_STATE_CHANGE_FAILURE if the last state change failed. MT safe.
-
getStaticPad
Retrieves a pad from @element by name. This version only retrieves
already-existing (i.e. 'static') pads.- Parameter:
name
- the name of the static #GstPad to retrieve.- Gibt zurück:
- the requested #GstPad if found, otherwise %NULL. unref after usage. MT safe.
-
getStaticPad
Retrieves a pad from @element by name. This version only retrieves
already-existing (i.e. 'static') pads.- Parameter:
name
- the name of the static #GstPad to retrieve.- Gibt zurück:
- the requested #GstPad if found, otherwise %NULL. unref after usage. MT safe.
-
isLockedState
public boolean isLockedState()Checks if the state of an element is locked.
If the state of an element is locked, state changes of the parent don't
affect the element.
This way you can leave currently unused elements inside bins. Just lock their
state before changing the state from #GST_STATE_NULL.
MT safe.- Gibt zurück:
- %TRUE, if the element's state is locked.
-
iteratePads
Retrieves an iterator of @element's pads. The iterator should
be freed after usage. Also more specialized iterators exists such as
gst_element_iterate_src_pads() or gst_element_iterate_sink_pads().
The order of pads returned by the iterator will be the order in which
the pads were added to the element.- Gibt zurück:
- the #GstIterator of #GstPad. MT safe.
-
iterateSinkPads
Retrieves an iterator of @element's sink pads.
The order of pads returned by the iterator will be the order in which
the pads were added to the element.- Gibt zurück:
- the #GstIterator of #GstPad. MT safe.
-
iterateSrcPads
Retrieves an iterator of @element's source pads.
The order of pads returned by the iterator will be the order in which
the pads were added to the element.- Gibt zurück:
- the #GstIterator of #GstPad. MT safe.
-
link
Links @src to @dest. The link must be from source to
destination; the other direction will not be tried. The function looks for
existing pads that aren't linked yet. It will request new pads if necessary.
Such pads need to be released manually when unlinking.
If multiple links are possible, only one is established.
Make sure you have added your elements to a bin or pipeline with
gst_bin_add() before trying to link them.- Parameter:
dest
- the #GstElement containing the destination pad.- Gibt zurück:
- %TRUE if the elements could be linked, %FALSE otherwise.
-
linkFiltered
Links @src to @dest using the given caps as filtercaps.
The link must be from source to
destination; the other direction will not be tried. The function looks for
existing pads that aren't linked yet. It will request new pads if necessary.
If multiple links are possible, only one is established.
Make sure you have added your elements to a bin or pipeline with
gst_bin_add() before trying to link them.- Parameter:
dest
- the #GstElement containing the destination pad.filter
- the #GstCaps to filter the link, or %NULL for no filter.- Gibt zurück:
- %TRUE if the pads could be linked, %FALSE otherwise.
-
linkMany
Chain together a series of elements. Uses gst_element_link().
Make sure you have added your elements to a bin or pipeline with
gst_bin_add() before trying to link them.- Parameter:
element_2
- the second #GstElement in the link chain._ellipsis
- the %NULL-terminated list of elements to link in order.- Gibt zurück:
- %TRUE on success, %FALSE otherwise.
-
linkPads
Links the two named pads of the source and destination elements.
Side effect is that if one of the pads has no parent, it becomes a
child of the parent of the other element. If they have different
parents, the link fails.- Parameter:
srcpadname
- the name of the #GstPad in source element or %NULL for any pad.dest
- the #GstElement containing the destination pad.destpadname
- the name of the #GstPad in destination element, or %NULL for any pad.- Gibt zurück:
- %TRUE if the pads could be linked, %FALSE otherwise.
-
linkPads
Links the two named pads of the source and destination elements.
Side effect is that if one of the pads has no parent, it becomes a
child of the parent of the other element. If they have different
parents, the link fails.- Parameter:
srcpadname
- the name of the #GstPad in source element or %NULL for any pad.dest
- the #GstElement containing the destination pad.destpadname
- the name of the #GstPad in destination element, or %NULL for any pad.- Gibt zurück:
- %TRUE if the pads could be linked, %FALSE otherwise.
-
linkPadsFiltered
public boolean linkPadsFiltered(@Nullable Str srcpadname, @Nonnull Element dest, @Nullable Str destpadname, @Nullable Caps filter) Links the two named pads of the source and destination elements. Side effect
is that if one of the pads has no parent, it becomes a child of the parent of
the other element. If they have different parents, the link fails. If @caps
is not %NULL, makes sure that the caps of the link is a subset of @caps.- Parameter:
srcpadname
- the name of the #GstPad in source element or %NULL for any pad.dest
- the #GstElement containing the destination pad.destpadname
- the name of the #GstPad in destination element or %NULL for any pad.filter
- the #GstCaps to filter the link, or %NULL for no filter.- Gibt zurück:
- %TRUE if the pads could be linked, %FALSE otherwise.
-
linkPadsFiltered
public boolean linkPadsFiltered(String srcpadname, @Nonnull Element dest, String destpadname, @Nullable Caps filter) Links the two named pads of the source and destination elements. Side effect
is that if one of the pads has no parent, it becomes a child of the parent of
the other element. If they have different parents, the link fails. If @caps
is not %NULL, makes sure that the caps of the link is a subset of @caps.- Parameter:
srcpadname
- the name of the #GstPad in source element or %NULL for any pad.dest
- the #GstElement containing the destination pad.destpadname
- the name of the #GstPad in destination element or %NULL for any pad.filter
- the #GstCaps to filter the link, or %NULL for no filter.- Gibt zurück:
- %TRUE if the pads could be linked, %FALSE otherwise.
-
linkPadsFull
public boolean linkPadsFull(@Nullable Str srcpadname, @Nonnull Element dest, @Nullable Str destpadname, int flags) Links the two named pads of the source and destination elements.
Side effect is that if one of the pads has no parent, it becomes a
child of the parent of the other element. If they have different
parents, the link fails.
Calling gst_element_link_pads_full() with @flags == %GST_PAD_LINK_CHECK_DEFAULT
is the same as calling gst_element_link_pads() and the recommended way of
linking pads with safety checks applied.
This is a convenience function for gst_pad_link_full().- Parameter:
srcpadname
- the name of the #GstPad in source element or %NULL for any pad.dest
- the #GstElement containing the destination pad.destpadname
- the name of the #GstPad in destination element, or %NULL for any pad.flags
- the #GstPadLinkCheck to be performed when linking pads.- Gibt zurück:
- %TRUE if the pads could be linked, %FALSE otherwise.
-
linkPadsFull
public boolean linkPadsFull(String srcpadname, @Nonnull Element dest, String destpadname, int flags) Links the two named pads of the source and destination elements.
Side effect is that if one of the pads has no parent, it becomes a
child of the parent of the other element. If they have different
parents, the link fails.
Calling gst_element_link_pads_full() with @flags == %GST_PAD_LINK_CHECK_DEFAULT
is the same as calling gst_element_link_pads() and the recommended way of
linking pads with safety checks applied.
This is a convenience function for gst_pad_link_full().- Parameter:
srcpadname
- the name of the #GstPad in source element or %NULL for any pad.dest
- the #GstElement containing the destination pad.destpadname
- the name of the #GstPad in destination element, or %NULL for any pad.flags
- the #GstPadLinkCheck to be performed when linking pads.- Gibt zurück:
- %TRUE if the pads could be linked, %FALSE otherwise.
-
lostState
public void lostState()Brings the element to the lost state. The current state of the
element is copied to the pending state so that any call to
gst_element_get_state() will return %GST_STATE_CHANGE_ASYNC.
An ASYNC_START message is posted. If the element was PLAYING, it will
go to PAUSED. The element will be restored to its PLAYING state by
the parent pipeline when it prerolls again.
This is mostly used for elements that lost their preroll buffer
in the %GST_STATE_PAUSED or %GST_STATE_PLAYING state after a flush,
they will go to their pending state again when a new preroll buffer is
queued. This function can only be called when the element is currently
not in error or an async state change.
This function is used internally and should normally not be called from
plugins or applications. -
messageFull
public void messageFull(int type, int domain, int code, @Nullable Str text, @Nullable Str debug, @Nonnull Str file, @Nonnull Str function, int line) Post an error, warning or info message on the bus from inside an element.
@type must be of #GST_MESSAGE_ERROR, #GST_MESSAGE_WARNING or
#GST_MESSAGE_INFO.
MT safe.- Parameter:
type
- the #GstMessageTypedomain
- the GStreamer GError domain this message belongs tocode
- the GError code belonging to the domaintext
- an allocated text string to be used as a replacement for the default message connected to code, or %NULLdebug
- an allocated debug message to be used as a replacement for the default debugging information, or %NULLfile
- the source code file where the error was generatedfunction
- the source code function where the error was generatedline
- the source code line where the error was generated
-
messageFull
public void messageFull(int type, int domain, int code, @Nullable Str text, @Nullable Str debug, String file, String function, int line) Post an error, warning or info message on the bus from inside an element.
@type must be of #GST_MESSAGE_ERROR, #GST_MESSAGE_WARNING or
#GST_MESSAGE_INFO.
MT safe.- Parameter:
type
- the #GstMessageTypedomain
- the GStreamer GError domain this message belongs tocode
- the GError code belonging to the domaintext
- an allocated text string to be used as a replacement for the default message connected to code, or %NULLdebug
- an allocated debug message to be used as a replacement for the default debugging information, or %NULLfile
- the source code file where the error was generatedfunction
- the source code function where the error was generatedline
- the source code line where the error was generated
-
messageFullWithDetails
public void messageFullWithDetails(int type, int domain, int code, @Nullable Str text, @Nullable Str debug, @Nonnull Str file, @Nonnull Str function, int line, @Nonnull Structure structure) Post an error, warning or info message on the bus from inside an element.
@type must be of #GST_MESSAGE_ERROR, #GST_MESSAGE_WARNING or
#GST_MESSAGE_INFO.- Parameter:
type
- the #GstMessageTypedomain
- the GStreamer GError domain this message belongs tocode
- the GError code belonging to the domaintext
- an allocated text string to be used as a replacement for the default message connected to code, or %NULLdebug
- an allocated debug message to be used as a replacement for the default debugging information, or %NULLfile
- the source code file where the error was generatedfunction
- the source code function where the error was generatedline
- the source code line where the error was generatedstructure
- optional details structure
-
messageFullWithDetails
public void messageFullWithDetails(int type, int domain, int code, @Nullable Str text, @Nullable Str debug, String file, String function, int line, @Nonnull Structure structure) Post an error, warning or info message on the bus from inside an element.
@type must be of #GST_MESSAGE_ERROR, #GST_MESSAGE_WARNING or
#GST_MESSAGE_INFO.- Parameter:
type
- the #GstMessageTypedomain
- the GStreamer GError domain this message belongs tocode
- the GError code belonging to the domaintext
- an allocated text string to be used as a replacement for the default message connected to code, or %NULLdebug
- an allocated debug message to be used as a replacement for the default debugging information, or %NULLfile
- the source code file where the error was generatedfunction
- the source code function where the error was generatedline
- the source code line where the error was generatedstructure
- optional details structure
-
noMorePads
public void noMorePads()Use this function to signal that the element does not expect any more pads
to show up in the current pipeline. This function should be called whenever
pads have been added by the element itself. Elements with #GST_PAD_SOMETIMES
pad templates use this in combination with autopluggers to figure out that
the element is done initializing its pads.
This function emits the #GstElement::no-more-pads signal.
MT safe. -
postMessage
Post a message on the element's #GstBus. This function takes ownership of the
message; if you want to access the message after this call, you should add an
additional reference before calling.- Parameter:
message
- a #GstMessage to post- Gibt zurück:
- %TRUE if the message was successfully posted. The function returns %FALSE if the element did not have a bus. MT safe.
-
provideClock
Get the clock provided by the given element.
> An element is only required to provide a clock in the PAUSED
> state. Some elements can provide a clock in other states.- Gibt zurück:
- the GstClock provided by the element or %NULL if no clock could be provided. Unref after usage. MT safe.
-
query
Performs a query on the given element.
For elements that don't implement a query handler, this function
forwards the query to a random srcpad or to the peer of a
random linked sinkpad of this element.
Please note that some queries might need a running pipeline to work.- Parameter:
query
- the #GstQuery.- Gibt zurück:
- %TRUE if the query could be performed. MT safe.
-
releaseRequestPad
Makes the element free the previously requested pad as obtained
with gst_element_request_pad().
This does not unref the pad. If the pad was created by using
gst_element_request_pad(), gst_element_release_request_pad() needs to be
followed by gst_object_unref() to free the @pad.
MT safe.- Parameter:
pad
- the #GstPad to release.
-
removePad
Removes @pad from @element. @pad will be destroyed if it has not been
referenced elsewhere using gst_object_unparent().
This function is used by plugin developers and should not be used
by applications. Pads that were dynamically requested from elements
with gst_element_request_pad() should be released with the
gst_element_release_request_pad() function instead.
Pads are not automatically deactivated so elements should perform the needed
steps to deactivate the pad in case this pad is removed in the PAUSED or
PLAYING state. See gst_pad_set_active() for more information about
deactivating pads.
The pad and the element should be unlocked when calling this function.
This function will emit the #GstElement::pad-removed signal on the element.- Parameter:
pad
- the #GstPad to remove from the element.- Gibt zurück:
- %TRUE if the pad could be removed. Can return %FALSE if the pad does not belong to the provided element. MT safe.
-
removePropertyNotifyWatch
public void removePropertyNotifyWatch(long watch_id) - Parameter:
watch_id
- watch id to remove
-
requestPad
Retrieves a request pad from the element according to the provided template.
Pad templates can be looked up using
gst_element_factory_get_static_pad_templates().
The pad should be released with gst_element_release_request_pad().- Parameter:
templ
- a #GstPadTemplate of which we want a pad of.name
- the name of the request #GstPad to retrieve. Can be %NULL.caps
- the caps of the pad we want to request. Can be %NULL.- Gibt zurück:
- requested #GstPad if found, otherwise %NULL. Release after usage.
-
requestPad
Retrieves a request pad from the element according to the provided template.
Pad templates can be looked up using
gst_element_factory_get_static_pad_templates().
The pad should be released with gst_element_release_request_pad().- Parameter:
templ
- a #GstPadTemplate of which we want a pad of.name
- the name of the request #GstPad to retrieve. Can be %NULL.caps
- the caps of the pad we want to request. Can be %NULL.- Gibt zurück:
- requested #GstPad if found, otherwise %NULL. Release after usage.
-
requestPadSimple
Retrieves a pad from the element by name (e.g. "src_\%d"). This version only
retrieves request pads. The pad should be released with
gst_element_release_request_pad().
This method is slower than manually getting the pad template and calling
gst_element_request_pad() if the pads should have a specific name (e.g.
@name is "src_1" instead of "src_\%u").
Note that this function was introduced in GStreamer 1.20 in order to provide
a better name to gst_element_get_request_pad(). Prior to 1.20, users
should use gst_element_get_request_pad() which provides the same
functionality.- Parameter:
name
- the name of the request #GstPad to retrieve.- Gibt zurück:
- requested #GstPad if found, otherwise %NULL. Release after usage.
-
requestPadSimple
Retrieves a pad from the element by name (e.g. "src_\%d"). This version only
retrieves request pads. The pad should be released with
gst_element_release_request_pad().
This method is slower than manually getting the pad template and calling
gst_element_request_pad() if the pads should have a specific name (e.g.
@name is "src_1" instead of "src_\%u").
Note that this function was introduced in GStreamer 1.20 in order to provide
a better name to gst_element_get_request_pad(). Prior to 1.20, users
should use gst_element_get_request_pad() which provides the same
functionality.- Parameter:
name
- the name of the request #GstPad to retrieve.- Gibt zurück:
- requested #GstPad if found, otherwise %NULL. Release after usage.
-
seek
public boolean seek(double rate, int format, int flags, int start_type, long start, int stop_type, long stop) Sends a seek event to an element. See gst_event_new_seek() for the details of
the parameters. The seek event is sent to the element using
gst_element_send_event().
MT safe.- Parameter:
rate
- The new playback rateformat
- The format of the seek valuesflags
- The optional seek flags.start_type
- The type and flags for the new start positionstart
- The value of the new start positionstop_type
- The type and flags for the new stop positionstop
- The value of the new stop position- Gibt zurück:
- %TRUE if the event was handled. Flushing seeks will trigger a preroll, which will emit %GST_MESSAGE_ASYNC_DONE.
-
seekSimple
public boolean seekSimple(int format, int seek_flags, long seek_pos) Simple API to perform a seek on the given element, meaning it just seeks
to the given position relative to the start of the stream. For more complex
operations like segment seeks (e.g. for looping) or changing the playback
rate or seeking relative to the last configured playback segment you should
use gst_element_seek().
In a completely prerolled PAUSED or PLAYING pipeline, seeking is always
guaranteed to return %TRUE on a seekable media type or %FALSE when the media
type is certainly not seekable (such as a live stream).
Some elements allow for seeking in the READY state, in this
case they will store the seek event and execute it when they are put to
PAUSED. If the element supports seek in READY, it will always return %TRUE when
it receives the event in the READY state.- Parameter:
format
- a #GstFormat to execute the seek in, such as #GST_FORMAT_TIMEseek_flags
- seek options; playback applications will usually want to use GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT hereseek_pos
- position to seek to (relative to the start); if you are doing a seek in #GST_FORMAT_TIME this value is in nanoseconds - multiply with #GST_SECOND to convert seconds to nanoseconds or with #GST_MSECOND to convert milliseconds to nanoseconds.- Gibt zurück:
- %TRUE if the seek operation succeeded. Flushing seeks will trigger a preroll, which will emit %GST_MESSAGE_ASYNC_DONE.
-
sendEvent
Sends an event to an element. If the element doesn't implement an
event handler, the event will be pushed on a random linked sink pad for
downstream events or a random linked source pad for upstream events.
This function takes ownership of the provided event so you should
gst_event_ref() it if you want to reuse the event after this call.
MT safe.- Parameter:
event
- the #GstEvent to send to the element.- Gibt zurück:
- %TRUE if the event was handled. Events that trigger a preroll (such as flushing seeks and steps) will emit %GST_MESSAGE_ASYNC_DONE.
-
setBaseTime
public void setBaseTime(long time) Set the base time of an element. See gst_element_get_base_time().
MT safe.- Parameter:
time
- the base time to set.
-
setBus
Sets the bus of the element. Increases the refcount on the bus.
For internal use only, unless you're testing elements.
MT safe.- Parameter:
bus
- the #GstBus to set.
-
setClock
Sets the clock for the element. This function increases the
refcount on the clock. Any previously set clock on the object
is unreffed.- Parameter:
clock
- the #GstClock to set for the element.- Gibt zurück:
- %TRUE if the element accepted the clock. An element can refuse a clock when it, for example, is not able to slave its internal clock to the @clock or when it requires a specific clock to operate. MT safe.
-
setContext
Sets the context of the element. Increases the refcount of the context.
MT safe.- Parameter:
context
- the #GstContext to set.
-
setLockedState
public boolean setLockedState(boolean locked_state) Locks the state of an element, so state changes of the parent don't affect
this element anymore.
Note that this is racy if the state lock of the parent bin is not taken.
The parent bin might've just checked the flag in another thread and as the
next step proceed to change the child element's state.
MT safe.- Parameter:
locked_state
- %TRUE to lock the element's state- Gibt zurück:
- %TRUE if the state was changed, %FALSE if bad parameters were given or the elements state-locking needed no change.
-
setStartTime
public void setStartTime(long time) Set the start time of an element. The start time of the element is the
running time of the element when it last went to the PAUSED state. In READY
or after a flushing seek, it is set to 0.
Toplevel elements like #GstPipeline will manage the start_time and
base_time on its children. Setting the start_time to #GST_CLOCK_TIME_NONE
on such a toplevel element will disable the distribution of the base_time to
the children and can be useful if the application manages the base_time
itself, for example if you want to synchronize capture from multiple
pipelines, and you can also ensure that the pipelines have the same clock.
MT safe.- Parameter:
time
- the base time to set.
-
setState
public int setState(int state) Sets the state of the element. This function will try to set the
requested state by going through all the intermediary states and calling
the class's state change function for each.
This function can return #GST_STATE_CHANGE_ASYNC, in which case the
element will perform the remainder of the state change asynchronously in
another thread.
An application can use gst_element_get_state() to wait for the completion
of the state change or it can wait for a %GST_MESSAGE_ASYNC_DONE or
%GST_MESSAGE_STATE_CHANGED on the bus.
State changes to %GST_STATE_READY or %GST_STATE_NULL never return
#GST_STATE_CHANGE_ASYNC.- Parameter:
state
- the element's new #GstState.- Gibt zurück:
- Result of the state change using #GstStateChangeReturn. MT safe.
-
syncStateWithParent
public boolean syncStateWithParent()Tries to change the state of the element to the same as its parent.
If this function returns %FALSE, the state of element is undefined.- Gibt zurück:
- %TRUE, if the element's state could be synced to the parent's state. MT safe.
-
unlink
Unlinks all source pads of the source element with all sink pads
of the sink element to which they are linked.
If the link has been made using gst_element_link(), it could have created an
requestpad, which has to be released using gst_element_release_request_pad().- Parameter:
dest
- the sink #GstElement to unlink.
-
unlinkMany
Unlinks a series of elements. Uses gst_element_unlink().- Parameter:
element_2
- the second #GstElement in the link chain._ellipsis
- the %NULL-terminated list of elements to unlink in order.
-
unlinkPads
Unlinks the two named pads of the source and destination elements.
This is a convenience function for gst_pad_unlink().- Parameter:
srcpadname
- the name of the #GstPad in source element.dest
- a #GstElement containing the destination pad.destpadname
- the name of the #GstPad in destination element.
-
unlinkPads
Unlinks the two named pads of the source and destination elements.
This is a convenience function for gst_pad_unlink().- Parameter:
srcpadname
- the name of the #GstPad in source element.dest
- a #GstElement containing the destination pad.destpadname
- the name of the #GstPad in destination element.
-
onNoMorePads
Connect to signal "no-more-pads".
SeeElement.OnNoMorePads.onNoMorePads()
for signal description.
FieldSIGNAL_ON_NO_MORE_PADS
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onPadAdded
Connect to signal "pad-added".
SeeElement.OnPadAdded.onPadAdded(ch.bailu.gtk.gst.Pad)
for signal description.
FieldSIGNAL_ON_PAD_ADDED
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onPadRemoved
Connect to signal "pad-removed".
SeeElement.OnPadRemoved.onPadRemoved(ch.bailu.gtk.gst.Pad)
for signal description.
FieldSIGNAL_ON_PAD_REMOVED
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
makeFromUri
public static Element makeFromUri(int type, @Nonnull Str uri, @Nullable Str elementname) throws AllocationError Creates an element for handling the given URI.- Parameter:
type
- Whether to create a source or a sinkuri
- URI to create an element forelementname
- Name of created element, can be %NULL.- Gibt zurück:
- a new element or %NULL if none could be created
- Löst aus:
AllocationError
-
register
Create a new elementfactory capable of instantiating objects of the
@type and add the factory to @plugin.- Parameter:
plugin
- #GstPlugin to register the element with, or %NULL for a static element.name
- name of elements of this typerank
- rank of element (higher rank means more importance when autoplugging)type
- GType of element to register- Gibt zurück:
- %TRUE, if the registering succeeded, %FALSE on error
-
stateChangeReturnGetName
Gets a string representing the given state change result.- Parameter:
state_ret
- a #GstStateChangeReturn to get the name of.- Gibt zurück:
- a string with the name of the state result.
-
stateGetName
Gets a string representing the given state.- Parameter:
state
- a #GstState to get the name of.- Gibt zurück:
- a string with the name of the state.
-
typeSetSkipDocumentation
public static void typeSetSkipDocumentation(long type) Marks @type as "documentation should be skipped".
Can be useful for dynamically registered element to be excluded from
plugin documentation system.
Example:
```c
GType my_type;
GTypeInfo my_type_info;
// Fill "my_type_info"
...
my_type = g_type_register_static (GST_TYPE_MY_ELEMENT, "my-type-name",
&my_type_info, 0);
gst_element_type_set_skip_documentation (my_type);
gst_element_register (plugin, "my-plugin-feature-name", rank, my_type);
```- Parameter:
type
- a #GType of element
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-