If set to %TRUE, the bin will handle asynchronous state changes. This should be used only if the bin subclass is modifying the state of its children on its own.
Whether to automatically create a transition whenever two #GESSource-s overlap in a track of the timeline. See #GESLayer:auto-transition if you want this to only happen in some layers.
the time of the clock right before the element is set to
PLAYING. Subtracting base_time
from the current clock time in the PLAYING
state will yield the running_time against the clock.
the bus of the element. This bus is provided to the element by the parent element or the application. A #GstPipeline has a bus of its own.
internal bus for handling child messages
the list of children in this bin
updated whenever children
changes
the clock of the element. This clock is usually provided to the element by the toplevel #GstPipeline.
the bin needs to select a new clock
the element that provided provided_clock
list of contexts
the current state of an element
The current duration (in nanoseconds) of the timeline. A timeline 'starts' at time 0, so this is the maximum end time of all of its #GESTimelineElement-s.
flags for this object
the last return value of an element state change
A list of #GESLayer-s sorted by priority. NOTE: Do not modify.
Forward all children messages, even those that would normally be filtered by the bin. This can be interesting when one wants to be notified of the EOS state of individual elements, for example.
The messages are converted to an ELEMENT message with the bin as the
source. The structure of the message is named GstBinForwarded
and contains
a field named message
that contains the original forwarded #GstMessage.
queued and cached messages
The name of the object
the next state of an element, can be #GST_STATE_VOID_PENDING if the element is in the correct state.
the number of children in this bin
number of pads of the element, includes both source and sink pads.
number of sink pads of the element.
number of source pads of the element.
list of pads
updated whenever the a pad is added or removed
this object's parent, weak ref
the final state the element should go to, can be #GST_STATE_VOID_PENDING if the element is in the correct state
the bin is currently calculating its state
the last clock selected
list of sink pads
The distance (in nanoseconds) at which a #GESTimelineElement being moved within the timeline should snap one of its #GESSource-s with another #GESSource-s edge. See #GESEditMode for which edges can snap during an edit. 0 means no snapping.
list of source pads
the running_time of the last PAUSED state
Used to signal completion of a state change
Used to detect concurrent execution of gst_element_set_state() and gst_element_get_state()
the bin needs to recalculate its state (deprecated)
Used to serialize execution of gst_element_set_state()
the target state of an element as set by the application
Deprecated:1.10: (element-type GES.Track): This is not thread safe, use #ges_timeline_get_tracks instead.
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.
Adds the given element to the bin. Sets the element's parent, and thus takes ownership of the element. An element can only be added to one bin.
If the element's pads are linked to other pads, the pads will be unlinked before the element is added to the bin.
When you add an element to an already-running pipeline, you will have to take care to set the state of the newly-added element to the desired state (usually PLAYING or PAUSED, same you set the pipeline to originally) with gst_element_set_state(), or use gst_element_sync_state_with_parent(). The bin or pipeline will not take care of this for you.
Attach the #GstControlBinding to the object. If there already was a #GstControlBinding for this property it will be replaced.
The object's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink())
the #GstControlBinding that should be used
Add a layer to the timeline.
If the layer contains #GESClip-s, then this may trigger the creation of their core track element children for the timeline's tracks, and the placement of the clip's children in the tracks of the timeline using #GESTimeline::select-tracks-for-object. Some errors may occur if this would break one of the configuration rules of the timeline in one of its tracks. In such cases, some track elements would fail to be added to their tracks, but this method would still return %TRUE. As such, it is advised that you only add clips to layers that already part of a timeline. In such situations, ges_layer_add_clip() is able to fail if adding the clip would cause such an error.
Deserializes the given string, and adds and sets the found fields and their values on the container. The string should be the return of ges_meta_container_metas_to_string().
A string to deserialize and add to container
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.
Add a track to the timeline.
If the timeline already contains clips, then this may trigger the creation of their core track element children for the track, and the placement of the clip's children in the track of the timeline using #GESTimeline::select-tracks-for-object. Some errors may occur if this would break one of the configuration rules for the timeline in the track. In such cases, some track elements would fail to be added to the track, but this method would still return %TRUE. As such, it is advised that you avoid adding tracks to timelines that already contain clips.
The track to add
Creates a binding between source_property
on source
and target_property
on target
.
Whenever the source_property
is changed the target_property
is
updated using the same value. For instance:
g_object_bind_property (action, "active", widget, "sensitive", 0);
Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.
If flags
contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
if target_property
on target
changes then the source_property
on source
will be updated as well.
The binding will automatically be removed when either the source
or the
target
instances are finalized. To remove the binding without affecting the
source
and the target
you can just call g_object_unref() on the returned
#GBinding instance.
Removing the binding by calling g_object_unref() on it must only be done if
the binding, source
and target
are only used from a single thread and it
is clear that both source
and target
outlive the binding. Especially it
is not safe to rely on this if the binding, source
or target
can be
finalized from different threads. Keep another reference to the binding and
use g_binding_unbind() instead to be on the safe side.
A #GObject can have multiple bindings.
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
Creates a binding between source_property
on source
and target_property
on target,
allowing you to set the transformation functions to be used by
the binding.
This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
a #GClosure wrapping the transformation function from the source
to the target,
or %NULL to use the default
a #GClosure wrapping the transformation function from the target
to the source,
or %NULL to use the default
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.
Function to call asynchronously from another thread
Perform transition
on element
.
This function must be called with STATE_LOCK held and is mainly used internally.
the requested transition
Checks whether the specified field has been registered as static, and gets the registered type and flags of the field, as used in ges_meta_container_register_meta() and ges_meta_container_register_static_meta().
The key for the container
field to check
Commit all the pending changes of the clips contained in the timeline.
When changes happen in a timeline, they are not immediately executed internally, in a way that effects the output data of the timeline. You should call this method when you are done with a set of changes and you want them to be executed.
Any pending changes will be executed in the backend. The #GESTimeline::commited signal will be emitted once this has completed. You should not try to change the state of the timeline, seek it or add tracks to it before receiving this signal. You can use ges_timeline_commit_sync() if you do not want to perform other tasks in the mean time.
Note that all the pending changes will automatically be executed when the timeline goes from #GST_STATE_READY to #GST_STATE_PAUSED, which is usually triggered by a corresponding state changes in a containing #GESPipeline.
Commit all the pending changes of the clips contained in the timeline and wait for the changes to complete.
See ges_timeline_commit().
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.
The previous state return value
Creates a pad for each pad template that is always available. This function is only useful during object initialization of subclasses of #GstElement.
Recursively looks for elements with an unlinked pad of the given direction within the specified bin and returns an unlinked pad if one is found, or %NULL otherwise. If a pad is found, the caller owns a reference to it and should use gst_object_unref() on the pad when it is not needed any longer.
whether to look for an unlinked source or sink pad
This function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().
Calls the given function on each of the meta container's set metadata fields.
A function to call on each of container'
s set metadata fields
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.
function to call for each pad
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.
function to call for each sink pad
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.
function to call for each source pad
Freezes the timeline from being committed. This is usually needed while the
timeline is being rendered to ensure that not change to the timeline are
taken into account during that moment. Once the rendering is done, you
should call #ges_timeline_thaw_commit so that comiting becomes possible
again and any call to commit()
that happened during the rendering is
actually taken into account.
Increases the freeze count on object
. If the freeze count is
non-zero, the emission of "notify" signals on object
is
stopped. The signals are queued until the freeze count is decreased
to zero. Duplicate notifications are squashed so that at most one
#GObject::notify signal is emitted for each property modified while the
object is frozen.
This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.
Get the asset that has been set on the extractable object.
Gets #GESTimeline:auto-transition for the timeline.
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.
Gets the current boolean value of the specified field of the meta container. If the field does not have a set value, or it is of the wrong type, the method will fail.
The key for the container
field to get
Looks for an element inside the bin that implements the given interface. If such an element is found, it returns the element. You can cast this element to the given interface afterwards. If you want all elements that implement the interface, use gst_bin_iterate_all_by_interface(). This function recurses into child bins.
the #GType of an interface
Gets the number of child objects this parent contains.
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
.
the #GstPad to find a compatible one for.
the #GstCaps to use as a filter.
Retrieves a pad template from element
that is compatible with compattempl
.
Pads from compatible templates can be linked together.
the #GstPadTemplate to find a compatible template for
Gets the corresponding #GstControlBinding for the property. This should be unreferenced again after use.
name of the property
Obtain the control-rate for this object
. Audio processing #GstElement
objects will use this rate to sub-divide their processing loop and call
gst_object_sync_values() in between. The length of the processing segment
should be up to control-rate
nanoseconds.
If the object
is not under property control, this will return
%GST_CLOCK_TIME_NONE. This allows the element to avoid the sub-dividing.
The control-rate is not expected to change if the element is in %GST_STATE_PAUSED or %GST_STATE_PLAYING.
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.
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.
Gets a named field from the objects table of associations (see g_object_set_data()).
name of the key for that association
Gets the current double value of the specified field of the meta container. If the field does not have a set value, or it is of the wrong type, the method will fail.
The key for the container
field to get
Get the current #GESTimeline:duration of the timeline
Gets the element contained in the timeline with the given name.
The name of the element to find
Retrieves the factory that was used to create this element.
Gets the current float value of the specified field of the meta container. If the field does not have a set value, or it is of the wrong type, the method will fail.
The key for the container
field to get
This method allows you to convert a timeline #GstClockTime into its corresponding #GESFrameNumber in the timeline's output.
The timestamp to get the corresponding frame number of
This method allows you to convert a timeline output frame number into a timeline #GstClockTime. For example, this time could be used to seek to a particular frame in the timeline's output, or as the edit position for an element within the timeline.
The frame number to get the corresponding timestamp of in the timeline coordinates
Gets a number of #GValues for the given controlled property starting at the
requested time. The array values
need to hold enough space for n_values
of
#GValue.
This function is useful if one wants to e.g. draw a graph of the control curve or apply a control curve sample by sample.
the name of the property to get
the time that should be processed
the time spacing between subsequent values
array to put control-values in
Gets the #GESAsset:id of some associated asset. It may be the case that the object has no set asset, or even that such an asset does not yet exist in the GES cache. Instead, this will return the asset #GESAsset:id that is compatible with the current state of the object, as determined by the #GESExtractable implementer. If it was indeed extracted from an asset, this should return the same as its corresponding asset #GESAsset:id.
Gets the current int value of the specified field of the meta container. If the field does not have a set value, or it is of the wrong type, the method will fail.
The key for the container
field to get
Gets the current int64 value of the specified field of the meta container. If the field does not have a set value, or it is of the wrong type, the method will fail.
The key for the container
field to get
Gets the current marker list value of the specified field of the meta container. If the field does not have a set value, or it is of the wrong type, the method will fail.
The key for the container
field to get
Gets the current value of the specified field of the meta container.
The key for the container
field to get
Get metadata with key
in klass
.
the key to get
Returns a copy of the name of object
.
Caller should g_free() the return value after usage.
For a nameless object, this returns %NULL, which you can safely g_free()
as well.
Free-function: g_free
Retrieves a padtemplate from element
with the given name.
the name of the #GstPadTemplate to get.
Retrieves a list of the pad templates associated with element
. The
list must not be modified by the calling code.
Generates a string describing the path of object
in
the object hierarchy. Only useful (or used) for debugging.
Free-function: g_free
Gets a property of an object.
The value
can be:
In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().
Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.
This function gets back user data pointers stored via g_object_set_qdata().
A #GQuark, naming the user data pointer
Gets the #GESTimeline:snapping-distance for the timeline.
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.
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.
a #GstClockTime to specify the timeout for an async state change or %GST_CLOCK_TIME_NONE for infinite timeout.
Gets the current string value of the specified field of the meta container. If the field does not have a set value, or it is of the wrong type, the method will fail.
The key for the container
field to get
Get the list of #GESTrack-s used by the timeline.
Gets the current uint value of the specified field of the meta container. If the field does not have a set value, or it is of the wrong type, the method will fail.
The key for the container
field to get
Gets the current uint64 value of the specified field of the meta container. If the field does not have a set value, or it is of the wrong type, the method will fail.
The key for the container
field to get
Gets the value for the given controlled property at the requested time.
the name of the property to get
the time the control-change should be read from
Gets n_properties
properties for an object
.
Obtained properties will be set to values
. All properties must be valid.
Warnings will be emitted and undefined behaviour may result if invalid
properties are passed in.
the names of each property to get
the values of each property to get
Check if the object
has active controlled properties.
Check whether the timeline is empty or not.
Checks whether object
has a [floating][floating-ref] reference.
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.
Looks for all elements inside the bin that implements the given interface. You can safely cast all returned elements to the given interface. The function recurses inside child bins. The iterator will yield a series of #GstElement.
the #GType of an interface
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.
Gets an iterator for the elements in this bin in topologically sorted order. This means that the elements are returned from the most downstream elements (sinks) to the sources.
This function is used internally to perform the state changes of the bin elements and for clock selection.
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.
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.
the #GstElement containing the destination pad.
the #GstCaps to filter the link, or %NULL for no 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.
the name of the #GstPad in source element or %NULL for any pad.
the #GstElement containing the destination pad.
the name of the #GstPad in destination element, or %NULL for any pad.
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
.
the name of the #GstPad in source element or %NULL for any pad.
the #GstElement containing the destination pad.
the name of the #GstPad in destination element or %NULL for any pad.
the #GstCaps to filter the link, or %NULL for no 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.
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().
the name of the #GstPad in source element or %NULL for any pad.
the #GstElement containing the destination pad.
the name of the #GstPad in destination element, or %NULL for any pad.
the #GstPadLinkCheck to be performed when linking pads.
Loads the contents of URI into the timeline.
The URI to load from
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.
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.
the #GstMessageType
the GStreamer GError domain this message belongs to
the GError code belonging to the domain
an allocated text string to be used as a replacement for the default message connected to code, or %NULL
an allocated debug message to be used as a replacement for the default debugging information, or %NULL
the source code file where the error was generated
the source code function where the error was generated
the source code line where the error was generated
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.
the #GstMessageType
the GStreamer GError domain this message belongs to
the GError code belonging to the domain
an allocated text string to be used as a replacement for the default message connected to code, or %NULL
an allocated debug message to be used as a replacement for the default debugging information, or %NULL
the source code file where the error was generated
the source code function where the error was generated
the source code line where the error was generated
optional details structure
Serializes the set metadata fields of the meta container to a string.
Moves a layer within the timeline to the index given by
new_layer_priority
.
An index of 0 corresponds to the layer with the highest priority in a
timeline. If new_layer_priority
is greater than the number of layers
present in the timeline, it will become the lowest priority layer.
A layer within timeline,
whose priority should be changed
The new index for layer
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.
Emits a "notify" signal for the property property_name
on object
.
When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.
Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.
the name of a property installed on the class of object
.
Emits a "notify" signal for the property specified by pspec
on object
.
This function omits the property name lookup, hence it is faster than g_object_notify().
One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:
enum
{
PROP_0,
PROP_FOO,
PROP_LAST
};
static GParamSpec *properties[PROP_LAST];
static void
my_object_class_init (MyObjectClass *klass)
{
properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
0, 100,
50,
G_PARAM_READWRITE);
g_object_class_install_property (gobject_class,
PROP_FOO,
properties[PROP_FOO]);
}
and then notify a change on the "foo" property with:
g_object_notify_by_pspec (self, properties[PROP_FOO]);
the #GParamSpec of a property installed on the class of object
.
Paste an element inside the timeline. element
must be the return of
ges_timeline_element_copy() with deep=TRUE
,
and it should not be changed before pasting. element
itself is not
placed in the timeline, instead a new element is created, alike to the
originally copied element. Note that the originally copied element must
also lie within timeline,
at both the point of copying and pasting.
Pasting may fail if it would place the timeline in an unsupported configuration.
After calling this function element
should not be used. In particular,
element
can not be pasted again. Instead, you can copy the
returned element and paste that copy (although, this is only possible
if the paste was successful).
See also ges_timeline_element_paste().
The element to paste
The position in the timeline element
should be pasted to, i.e. the #GESTimelineElement:start value for the pasted element.
The layer into which the element should be pasted. -1 means paste to the same layer from which element
has been copied from
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.
Queries an element (usually top-level pipeline or playbin element) for the total stream duration in nanoseconds. This query will only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case.
If the duration changes for some reason, you will get a DURATION_CHANGED message on the pipeline bus, in which case you should re-query the duration using this function.
Queries an element (usually top-level pipeline or playbin element) for the stream position in nanoseconds. This will be a value between 0 and the stream duration (if the stream duration is known). This query will usually only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case.
If one repeatedly calls this function one can also create a query and reuse it in gst_element_query().
Queries bin
for the current latency and reconfigures this latency on all the
elements using a LATENCY event.
This method is typically called on the pipeline when a #GST_MESSAGE_LATENCY is posted on the bus.
This function simply emits the #GstBin::do-latency signal so any custom latency calculations will be performed.
Increases the reference count of object
.
Since GLib 2.56, if GLIB_VERSION_MAX_ALLOWED
is 2.56 or greater, the type
of object
will be propagated to the return type (using the GCC typeof()
extension), so any casting the caller needs to do on the return type must be
explicit.
Increase the reference count of object,
and possibly remove the
[floating][floating-ref] reference, if object
has a floating reference.
In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.
Since GLib 2.56, the type of object
will be propagated to the return type
under the same conditions as for g_object_ref().
Sets the value of the specified field of the meta container to the
given value, and registers the field to only hold a value of the
same type. After calling this, only values of the same type as value
can be set for this field. The given flags can be set to make this
field only readable after calling this method.
Flags to be used for the registered field
The key for the container
field to register
The value to set for the registered field
Sets the value of the specified field of the meta container to the given boolean value, and registers the field to only hold a boolean typed value. After calling this, only boolean values can be set for this field. The given flags can be set to make this field only readable after calling this method.
Flags to be used for the registered field
The key for the container
field to register
The value to set for the registered field
Sets the value of the specified field of the meta container to the given date value, and registers the field to only hold a date typed value. After calling this, only date values can be set for this field. The given flags can be set to make this field only readable after calling this method.
Flags to be used for the registered field
The key for the container
field to register
The value to set for the registered field
Sets the value of the specified field of the meta container to the given date time value, and registers the field to only hold a date time typed value. After calling this, only date time values can be set for this field. The given flags can be set to make this field only readable after calling this method.
Flags to be used for the registered field
The key for the container
field to register
The value to set for the registered field
Sets the value of the specified field of the meta container to the given double value, and registers the field to only hold a double typed value. After calling this, only double values can be set for this field. The given flags can be set to make this field only readable after calling this method.
Flags to be used for the registered field
The key for the container
field to register
The value to set for the registered field
Sets the value of the specified field of the meta container to the given float value, and registers the field to only hold a float typed value. After calling this, only float values can be set for this field. The given flags can be set to make this field only readable after calling this method.
Flags to be used for the registered field
The key for the container
field to register
The value to set for the registered field
Sets the value of the specified field of the meta container to the given int value, and registers the field to only hold an int typed value. After calling this, only int values can be set for this field. The given flags can be set to make this field only readable after calling this method.
Flags to be used for the registered field
The key for the container
field to register
The value to set for the registered field
Sets the value of the specified field of the meta container to the given int64 value, and registers the field to only hold an int64 typed value. After calling this, only int64 values can be set for this field. The given flags can be set to make this field only readable after calling this method.
Flags to be used for the registered field
The key for the container
field to register
The value to set for the registered field
Sets the value of the specified field of the meta container to the given string value, and registers the field to only hold a string typed value. After calling this, only string values can be set for this field. The given flags can be set to make this field only readable after calling this method.
Flags to be used for the registered field
The key for the container
field to register
The value to set for the registered field
Sets the value of the specified field of the meta container to the given uint value, and registers the field to only hold a uint typed value. After calling this, only uint values can be set for this field. The given flags can be set to make this field only readable after calling this method.
Flags to be used for the registered field
The key for the container
field to register
The value to set for the registered field
Sets the value of the specified field of the meta container to the given uint64 value, and registers the field to only hold a uint64 typed value. After calling this, only uint64 values can be set for this field. The given flags can be set to make this field only readable after calling this method.
Flags to be used for the registered field
The key for the container
field to register
The value to set for the registered field
Registers a static metadata field on the container to only hold the specified type. After calling this, setting a value under this field can only succeed if its type matches the registered type of the field.
Unlike ges_meta_container_register_meta(), no (initial) value is set for this field, which means you can use this method to reserve the space to be optionally set later.
Note that if a value has already been set for the field being
registered, then its type must match the registering type, and its
value will be left in place. If the field has no set value, then
you will likely want to include #GES_META_WRITABLE in flags
to allow
the value to be set later.
Flags to be used for the registered field
The key for the container
field to register
The required value type for the registered field
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.
Removes the element from the bin, unparenting it as well. Unparenting the element means that the element will be dereferenced, so if the bin holds the only reference to the element, the element will be freed in the process of removing it from the bin. If you want the element to still exist after removing, you need to call gst_object_ref() before removing it from the bin.
If the element's pads are linked to other pads, the pads will be unlinked before the element is removed from the bin.
Removes the corresponding #GstControlBinding. If it was the last ref of the binding, it will be disposed.
the binding
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.
Remove a track from the timeline.
The track to remove
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().
a #GstPadTemplate of which we want a pad of.
the name of the request #GstPad to retrieve. Can be %NULL.
the caps of the pad we want to request. Can be %NULL.
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.
the name of the request #GstPad to retrieve.
Releases all references to other objects. This can be used to break reference cycles.
This function should only be called from object system implementations.
Saves the timeline to the given location. If formatter_asset
is %NULL,
the method will attempt to save in the same format the timeline was
loaded from, before defaulting to the formatter with highest rank.
The location to save to
The formatter asset to use, or %NULL
%TRUE to overwrite file if it exists
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.
The new playback rate
The format of the seek values
The optional seek flags.
The type and flags for the new start position
The value of the new start position
The type and flags for the new stop position
The value of the new stop position
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.
a #GstFormat to execute the seek in, such as #GST_FORMAT_TIME
seek options; playback applications will usually want to use GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT here
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.
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.
Sets the asset for this extractable object.
When an object is extracted from an asset using ges_asset_extract() its
asset will be automatically set. Note that many classes that implement
#GESExtractable will automatically create their objects using assets
when you call their new
methods. However, you can use this method to
associate an object with a compatible asset if it was created by other
means and does not yet have an asset. Or, for some implementations of
#GESExtractable, you can use this to change the asset of the given
extractable object, which will lead to a change in its state to
match the new asset #GESAsset:id.
The asset to set
Sets #GESTimeline:auto-transition for the timeline. This will also set the corresponding #GESLayer:auto-transition for all of the timeline's layers to the same value. See ges_layer_set_auto_transition() if you wish to set the layer's #GESLayer:auto-transition individually.
Whether transitions should be automatically added to timeline'
s layers
Set the base time of an element. See gst_element_get_base_time().
MT safe.
the base time to set.
Sets the value of the specified field of the meta container to the given boolean value.
The key for the container
field to set
The value to set under meta_item
This function is used to disable the control bindings on a property for some time, i.e. gst_object_sync_values() will do nothing for the property.
property to disable
boolean that specifies whether to disable the controller or not.
This function is used to disable all controlled properties of the object
for
some time, i.e. gst_object_sync_values() will do nothing.
boolean that specifies whether to disable the controller or not.
Change the control-rate for this object
. Audio processing #GstElement
objects will use this rate to sub-divide their processing loop and call
gst_object_sync_values() in between. The length of the processing segment
should be up to control-rate
nanoseconds.
The control-rate should not change if the element is in %GST_STATE_PAUSED or %GST_STATE_PLAYING.
the new control-rate in nanoseconds.
Each object carries around a table of associations from strings to pointers. This function lets you set an association.
If the object already had an association with that name, the old association will be destroyed.
Internally, the key
is converted to a #GQuark using g_quark_from_string().
This means a copy of key
is kept permanently (even after object
has been
finalized) — so it is recommended to only use a small, bounded set of values
for key
in your program, to avoid the #GQuark storage growing unbounded.
name of the key
data to associate with that key
Sets the value of the specified field of the meta container to the given double value.
The key for the container
field to set
The value to set under meta_item
Sets the value of the specified field of the meta container to the given float value.
The key for the container
field to set
The value to set under meta_item
Sets the value of the specified field of the meta container to the given int value.
The key for the container
field to set
The value to set under meta_item
Sets the value of the specified field of the meta container to the given int64 value.
The key for the container
field to set
The value to set under meta_item
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.
%TRUE to lock the element's state
Sets the value of the specified field of the meta container to the given marker list value.
The key for the container
field to set
The value to set under meta_item
Sets the value of the specified field of the meta container to a
copy of the given value. If the given value
is %NULL, the field
given by meta_item
is removed and %TRUE is returned.
The key for the container
field to set
The value to set under meta_item,
or %NULL to remove the corresponding field
Sets the name of object,
or gives object
a guaranteed unique
name (if name
is %NULL).
This function makes a copy of the provided name, so the caller
retains ownership of the name it sent.
new name of object
Sets a property on an object.
the name of the property to set
the value
Sets #GESTimeline:snapping-distance for the timeline. This new value will only effect future snappings and will not be used to snap the current element positions within the timeline.
The snapping distance to use (in nanoseconds)
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.
the base time to set.
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.
Sets the value of the specified field of the meta container to the given string value.
The key for the container
field to set
The value to set under meta_item
Suppresses the given flags on the bin. #GstElementFlags of a child element are propagated when it is added to the bin. When suppressed flags are set, those specified flags will not be propagated to the bin.
the #GstElementFlags to suppress
Sets the value of the specified field of the meta container to the given uint value.
The key for the container
field to set
The value to set under meta_item
Sets the value of the specified field of the meta container to the given uint64 value.
The key for the container
field to set
The value to set under meta_item
Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
name of the key
This function gets back user data pointers stored via
g_object_set_qdata() and removes the data
from object
without invoking its destroy() function (if any was
set).
Usually, calling this function is only required to update
user data pointers with a destroy notifier, for example:
void
object_add_to_user_list (GObject *object,
const gchar *new_string)
{
// the quark, naming the object data
GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
// retrieve the old string list
GList *list = g_object_steal_qdata (object, quark_string_list);
// prepend new string
list = g_list_prepend (list, g_strdup (new_string));
// this changed 'list', so we need to set it again
g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
}
static void
free_string_list (gpointer data)
{
GList *node, *list = data;
for (node = list; node; node = node->next)
g_free (node->data);
g_list_free (list);
}
Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().
A #GQuark, naming the user data pointer
Returns a suggestion for timestamps where buffers should be split to get best controller results.
Synchronizes the state of every child of bin
with the state
of bin
. See also gst_element_sync_state_with_parent().
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.
Sets the properties of the object, according to the #GstControlSources that (maybe) handle them and for the given timestamp.
If this function fails, it is most likely the application developers fault. Most probably the control sources are not setup correctly.
the time that should be processed
Thaw the timeline so that comiting becomes possible
again and any call to commit()
that happened during the rendering is
actually taken into account.
Reverts the effect of a previous call to
g_object_freeze_notify(). The freeze count is decreased on object
and when it reaches zero, queued "notify" signals are emitted.
Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.
It is an error to call this function when the freeze count is zero.
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().
Unlinks the two named pads of the source and destination elements.
This is a convenience function for gst_pad_unlink().
the name of the #GstPad in source element.
a #GstElement containing the destination pad.
the name of the #GstPad in destination element.
Clear the parent of object,
removing the associated reference.
This function decreases the refcount of object
.
MT safe. Grabs and releases object'
s lock.
Decrements the reference count on object
. If reference count hits
zero, destroy object
. This function does not take the lock
on object
as it relies on atomic refcounting.
The unref method should never be called with the LOCK held since this might deadlock the dispose function.
Perform transition
on element
.
This function must be called with STATE_LOCK held and is mainly used internally.
the requested transition
Gets the number of child objects this parent contains.
Gets the #GESAsset:id of some associated asset. It may be the case that the object has no set asset, or even that such an asset does not yet exist in the GES cache. Instead, this will return the asset #GESAsset:id that is compatible with the current state of the object, as determined by the #GESExtractable implementer. If it was indeed extracted from an asset, this should return the same as its corresponding asset #GESAsset:id.
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.
a #GstClockTime to specify the timeout for an async state change or %GST_CLOCK_TIME_NONE for infinite timeout.
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.
Emits a "notify" signal for the property property_name
on object
.
When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.
Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.
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.
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().
a #GstPadTemplate of which we want a pad of.
the name of the request #GstPad to retrieve. Can be %NULL.
the caps of the pad we want to request. Can be %NULL.
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.
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.
This function essentially limits the life time of the closure
to
the life time of the object. That is, when the object is finalized,
the closure
is invalidated by calling g_closure_invalidate() on
it, in order to prevent invocations of the closure with a finalized
(nonexisting) object. Also, g_object_ref() and g_object_unref() are
added as marshal guards to the closure,
to ensure that an extra
reference count is held on object
during invocation of the
closure
. Usually, this function will be called on closures that
use this object
as closure data.
#GClosure to watch
Checks to see if there is any object named name
in list
. This function
does not do any locking of any kind. You might want to protect the
provided list with the lock of the owner of the list. This function
will lock each #GstObject in the list to compare the name, so be
careful when passing a list with a locked object.
A default deep_notify signal callback for an object. The user data should contain a pointer to an array of strings that should be excluded from the notify. The default handler will print the new value of the property using g_print.
MT safe. This function grabs and releases object'
s LOCK for getting its
path string.
the #GObject that signalled the notify.
a #GstObject that initiated the notify.
a #GParamSpec of the property.
a set of user-specified properties to exclude or %NULL to show all changes.
Find the #GParamSpec with the given name for an
interface. Generally, the interface vtable passed in as g_iface
will be the default vtable from g_type_default_interface_ref(), or,
if you know the interface has already been loaded,
g_type_default_interface_peek().
any interface vtable for the interface, or the default vtable for the interface
name of a property to look up.
Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.
This function is meant to be called from the interface's default
vtable initialization function (the class_init
member of
#GTypeInfo.) It must not be called after after class_init
has
been called for any object types implementing this interface.
If pspec
is a floating reference, it will be consumed.
any interface vtable for the interface, or the default vtable for the interface.
the #GParamSpec for the new property
Lists the properties of an interface.Generally, the interface
vtable passed in as g_iface
will be the default vtable from
g_type_default_interface_ref(), or, if you know the interface has
already been loaded, g_type_default_interface_peek().
any interface vtable for the interface, or the default vtable for the interface
Creates a new instance of a #GObject subtype and sets its properties.
Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.
the type id of the #GObject subtype to instantiate
an array of #GParameter
Create a new elementfactory capable of instantiating objects of the
type
and add the factory to plugin
.
#GstPlugin to register the element with, or %NULL for a static element.
name of elements of this type
rank of element (higher rank means more importance when autoplugging)
GType of element to register
Atomically modifies a pointer to point to a new object.
The reference count of oldobj
is decreased and the reference count of
newobj
is increased.
Either newobj
and the value pointed to by oldobj
may be %NULL.
pointer to a place of a #GstObject to replace
a new #GstObject
Gets a string representing the given state change result.
a #GstStateChangeReturn to get the name of.
Marks type
as "documentation should be skipped".
Can be useful for dynamically registered element to be excluded from
plugin documentation system.
Example:
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);
a #GType of element
#GESTimeline is the central object for any multimedia timeline.
A timeline is composed of a set of #GESTrack-s and a set of #GESLayer-s, which are added to the timeline using ges_timeline_add_track() and ges_timeline_append_layer(), respectively.
The contained tracks define the supported types of the timeline and provide the media output. Essentially, each track provides an additional source #GstPad.
Most usage of a timeline will likely only need a single #GESAudioTrack and/or a single #GESVideoTrack. You can create such a timeline with ges_timeline_new_audio_video(). After this, you are unlikely to need to work with the tracks directly.
A timeline's layers contain #GESClip-s, which in turn control the creation of #GESTrackElement-s, which are added to the timeline's tracks. See #GESTimeline::select-tracks-for-object if you wish to have more control over which track a clip's elements are added to.
The layers are ordered, with higher priority layers having their content prioritised in the tracks. This ordering can be changed using ges_timeline_move_layer().
Editing
See #GESTimelineElement for the various ways the elements of a timeline can be edited.
If you change the timing or ordering of a timeline's #GESTimelineElement-s, then these changes will not actually be taken into account in the output of the timeline's tracks until the ges_timeline_commit() method is called. This allows you to move its elements around, say, in response to an end user's mouse dragging, with little expense before finalising their effect on the produced data.
Overlaps and Auto-Transitions
There are certain restrictions placed on how #GESSource-s may overlap in a #GESTrack that belongs to a timeline. These will be enforced by GES, so the user will not need to keep track of them, but they should be aware that certain edits will be refused as a result if the overlap rules would be broken.
Consider two #GESSource-s,
A
andB
, with start timesstartA
andstartB
, and end timesendA
andendB
, respectively. The start time refers to their #GESTimelineElement:start, and the end time is their #GESTimelineElement:start + #GESTimelineElement:duration. These two sources overlap if:startA < endB
andstartB < endA
.Note that when
startA = endB
orstartB = endA
then the two sources will touch at their edges, but are not considered overlapping.If, in addition,
startA < startB < endA
, then we can say that the end ofA
overlaps the start ofB
.If, instead,
startA <= startB
andendA >= endB
, then we can say thatA
fully overlapsB
.The overlap rules for a timeline are that:
The last two rules combined essentially mean that at any given timeline position, only up to two #GESSource-s may overlap at that position. So triple or more overlaps are not allowed.
If you switch on #GESTimeline:auto-transition, then at any moment when the end of one source (the first source) overlaps the start of another (the second source), a #GESTransitionClip will be automatically created for the pair in the same layer and it will cover their overlap. If the two elements are edited in a way such that the end of the first source no longer overlaps the start of the second, the transition will be automatically removed from the timeline. However, if the two sources still overlap at the same edges after the edit, then the same transition object will be kept, but with its timing and layer adjusted accordingly.
Saving
To save/load a timeline, you can use the ges_timeline_load_from_uri() and ges_timeline_save_to_uri() methods that use the default format.
Playing
A timeline is a #GstBin with a source #GstPad for each of its tracks, which you can fetch with ges_timeline_get_pad_for_track(). You will likely want to link these to some compatible sink #GstElement-s to be able to play or capture the content of the timeline.
You can use a #GESPipeline to easily preview/play the timeline's content, or render it to a file.