Optionalproperties: Partial<GES.Clip.ConstructorProps>Internal$signalsCompile-time signal type information.
This instance property is generated only for TypeScript type checking. It is not defined at runtime and should not be accessed in JS code.
Static$gtypeRead-OnlySince 1.18duration_The maximum GES.TimelineElement.duration that can be currently set for the clip, taking into account the GES.TimelineElement.in_point, GES.TimelineElement.max_duration, GES.TrackElement.active, and GES.TrackElement.track properties of its children, as well as any time effects. If there is no limit, this will be set to #GST_CLOCK_TIME_NONE.
Note that whilst a clip has no children in any tracks, the limit will be unknown, and similarly set to #GST_CLOCK_TIME_NONE.
If the duration-limit would ever go below the current GES.TimelineElement.duration of the clip due to a change in the above variables, its GES.TimelineElement.duration will be set to the new limit.
Read-OnlySince 1.18durationThe maximum GES.TimelineElement.duration that can be currently set for the clip, taking into account the GES.TimelineElement.in_point, GES.TimelineElement.max_duration, GES.TrackElement.active, and GES.TrackElement.track properties of its children, as well as any time effects. If there is no limit, this will be set to #GST_CLOCK_TIME_NONE.
Note that whilst a clip has no children in any tracks, the limit will be unknown, and similarly set to #GST_CLOCK_TIME_NONE.
If the duration-limit would ever go below the current GES.TimelineElement.duration of the clip due to a change in the above variables, its GES.TimelineElement.duration will be set to the new limit.
Read-OnlylayerThe layer this clip lies in.
If you want to connect to this property's GObject.Object::notify signal,
you should connect to it with g_signal_connect_after() since the
signal emission may be stopped internally.
The GES.TrackType-s that the clip supports, which it can create GES.TrackElement-s for. Note that this can be a combination of GES.TrackType flags to indicate support for several GES.TrackElement.track_type elements.
The GES.TrackType-s that the clip supports, which it can create GES.TrackElement-s for. Note that this can be a combination of GES.TrackType flags to indicate support for several GES.TrackElement.track_type elements.
The duration that the element is in effect for in the timeline (a time difference in nanoseconds using the time coordinates of the timeline). For example, for a source element, this would determine for how long it should output its internal content for. For an operation element, this would determine for how long its effect should be applied to any source content.
The span of the container's children's GES.TimelineElement.priority values, which is the number of integers that lie between (inclusive) the minimum and maximum priorities found amongst the container's children (maximum - minimum + 1).
The initial offset to use internally when outputting content (in nanoseconds, but in the time coordinates of the internal content).
For example, for a GES.VideoUriSource that references some media file, the "internal content" is the media file data, and the in-point would correspond to some timestamp in the media file. When playing the timeline, and when the element is first reached at timeline-time GES.TimelineElement.start, it will begin outputting the data from the timestamp in-point onwards, until it reaches the end of its GES.TimelineElement.duration in the timeline.
For elements that have no internal content, this should be kept as 0.
The initial offset to use internally when outputting content (in nanoseconds, but in the time coordinates of the internal content).
For example, for a GES.VideoUriSource that references some media file, the "internal content" is the media file data, and the in-point would correspond to some timestamp in the media file. When playing the timeline, and when the element is first reached at timeline-time GES.TimelineElement.start, it will begin outputting the data from the timestamp in-point onwards, until it reaches the end of its GES.TimelineElement.duration in the timeline.
For elements that have no internal content, this should be kept as 0.
The full duration of internal content that is available (a time difference in nanoseconds using the time coordinates of the internal content).
This will act as a cap on the GES.TimelineElement.in_point of the element (which is in the same time coordinates), and will sometimes be used to limit the GES.TimelineElement.duration of the element in the timeline.
For example, for a GES.VideoUriSource that references some media file, this would be the length of the media file.
For elements that have no internal content, or whose content is indefinite, this should be kept as #GST_CLOCK_TIME_NONE.
The full duration of internal content that is available (a time difference in nanoseconds using the time coordinates of the internal content).
This will act as a cap on the GES.TimelineElement.in_point of the element (which is in the same time coordinates), and will sometimes be used to limit the GES.TimelineElement.duration of the element in the timeline.
For example, for a GES.VideoUriSource that references some media file, this would be the length of the media file.
For elements that have no internal content, or whose content is indefinite, this should be kept as #GST_CLOCK_TIME_NONE.
The name of the element. This should be unique within its timeline.
The parent container of the element.
Whether the element should be serialized.
The starting position of the element in the timeline (in nanoseconds and in the time coordinates of the timeline). For example, for a source element, this would determine the time at which it should start outputting its internal content. For an operation element, this would determine the time at which it should start applying its effect to any source content.
Extracts a GES.TrackElement from an asset and adds it to the clip. This can be used to add effects that derive from the asset to the clip, but this method is not intended to be used to create the core elements of the clip.
An asset with #GES_TYPE_TRACK_ELEMENT as its GES.Asset.extractable_type
The newly created element, or null if an error occurred.
Adds the track element child of the clip to a specific track.
If the given child is already in another track, this will create a copy of the child, add it to the clip, and add this copy to the track.
You should only call this whilst a clip is part of a GES.Timeline, and for tracks that are in the same timeline.
This method is an alternative to using the GES.Timeline.SignalSignatures.select_tracks_for_object | GES.Timeline::select-tracks-for-object signal, but can be used to complement it when, say, you wish to copy a clip's children from one track into a new one.
When the child is a core child, it must be added to a track that does not already contain another core child of the same clip. If it is not a core child (an additional effect), then it must be added to a track that already contains one of the core children of the same clip.
This method can also fail if the adding the track element to the track would break a configuration rule of the corresponding GES.Timeline, such as causing three sources to overlap at a single time, or causing a source to completely overlap another in the same track.
A child of clip
The track to add child to
The element that was added to track, either child or a copy of child, or null if the element could not be added.
Add a top effect to a clip at the given index.
Unlike using ges_container_add(), this allows you to set the index
in advance. It will also check that no error occurred during the track
selection for the effect.
Note, only subclasses of GES.ClipClass that have
#GES_CLIP_CLASS_CAN_ADD_EFFECTS set to true (such as GES.SourceClip
and GES.BaseEffectClip) can have additional top effects added.
Note, if the effect is a time effect, this may be refused if the clip would not be able to adapt itself once the effect is added.
A top effect to add
The index to add effect at, or -1 to add at the highest, see ges_clip_get_top_effect_index for more information
true if effect was successfully added to clip at index.
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.Object instance to be updated with the same value of the "active" property of the action GObject.Object instance.
If flags contains GObject.BindingFlags.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
GObject.Binding 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.Object can have multiple bindings.
the property on source to bind
the target GObject.Object
the property on target to bind
flags to pass to GObject.Binding
the GObject.Binding instance representing the binding between the two GObject.Object instances. The binding is released whenever the GObject.Binding reference count reaches zero.
Complete version of g_object_bind_property().
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.
If flags contains GObject.BindingFlags.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 transform_from function is only used in case
of bidirectional bindings, otherwise it will be ignored
The binding will automatically be removed when either the source or the
target instances are finalized. This will release the reference that is
being held on the GObject.Binding instance; if you want to hold on to the
GObject.Binding instance, you will need to hold a reference to it.
To remove the binding, call g_binding_unbind().
A GObject.Object can have multiple bindings.
The same user_data parameter will be used for both transform_to
and transform_from transformation functions; the notify function will
be called once, when the binding is removed. If you need different data
for each transformation function, please use
g_object_bind_property_with_closures() instead.
the property on source to bind
the target GObject.Object
the property on target to bind
flags to pass to GObject.Binding
Optionaltransform_to: BindingTransformFuncthe transformation function from the source to the target, or null to use the default
Optionaltransform_from: BindingTransformFuncthe transformation function from the target to the source, or null to use the default
Optionalnotify: DestroyNotifya function to call when disposing the binding, to free resources used by the transformation functions, or null if not required
the GObject.Binding instance representing the binding between the two GObject.Object instances. The binding is released whenever the GObject.Binding reference count reaches zero.
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 GObject.Binding instance representing the binding between the two GObject.Object instances. The binding is released whenever the GObject.Binding reference count reaches zero.
Blocks a handler of an instance so it will not be called during any signal emissions
Handler ID of the handler to be blocked
SignalconnectSignalconnect_Disconnects a handler from an instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to.
Handler ID of the handler to be disconnected
SignalemitFinds an element controlled by the clip. If track is given,
then only the track elements in track are searched for. If type is
given, then this function searches for a track element of the given
type.
Note, if multiple track elements in the clip match the given criteria,
this will return the element amongst them with the highest
GES.TimelineElement.priority (numerically, the smallest). See
ges_clip_find_track_elements() if you wish to find all such elements.
The element controlled by clip, in track, and of the given type, or null if no such element could be found.
Finds the GES.TrackElement-s controlled by the clip that match the
given criteria. If track is given as null and track_type is given as
#GES_TRACK_TYPE_UNKNOWN, then the search will match all elements in any
track, including those with no track, and of any
GES.TrackElement.track_type. Otherwise, if track is not null, but
track_type is #GES_TRACK_TYPE_UNKNOWN, then only the track elements in
track are searched for. Otherwise, if track_type is not
#GES_TRACK_TYPE_UNKNOWN, but track is null, then only the track
elements whose GES.TrackElement.track_type matches track_type are
searched for. Otherwise, when both are given, the track elements that
match either criteria are searched for. Therefore, if you wish to
only find elements in a specific track, you should give the track as
track, but you should not give the track's GES.Track.track_type as
track_type because this would also select elements from other tracks
of the same type.
You may also give type to further restrict the search to track
elements of the given type.
A list of all the GES.TrackElement-s controlled by clip, in track or of the given track_type, and of the given type.
This function is intended for GObject.Object implementations to re-enforce
a floating 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().
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.Object::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.
Gets a named field from the objects table of associations (see g_object_set_data()).
name of the key for that association
the data if found, or null if no such data exists.
Convert the timeline time to an internal source time of the child. This will take any time effects placed on the clip into account (see GES.BaseEffect for what time effects are supported, and how to declare them in GES).
When timeline_time is above the GES.TimelineElement.start of clip,
this will return the internal time at which the content that appears at
timeline_time in the output of the timeline is created in child. For
example, if timeline_time corresponds to the current seek position,
this would let you know which part of a media file is being read.
This will be done assuming the clip has an indefinite end, so the internal time may be beyond the current out-point of the child, or even its GES.TimelineElement.max_duration.
If, instead, timeline_time is below the current
GES.TimelineElement.start of clip, this will return what you would
need to set the GES.TimelineElement.in_point of child to if you set
the GES.TimelineElement.start of clip to timeline_time and wanted
to keep the content of child currently found at the current
GES.TimelineElement.start of clip at the same timeline position. If
this would be negative, the conversion fails. This is useful for
determining what GES.TimelineElement.in_point would result from a
#GES_EDIT_MODE_TRIM to timeline_time.
Note that whilst a clip has no time effects, this second return is
equivalent to finding the internal time at which the content that
appears at timeline_time in the timeline can be found in child if it
had indefinite extent in both directions. However, with non-linear time
effects this second return will be more distinct.
In either case, the returned time would be appropriate to use for the GES.TimelineElement.in_point or GES.TimelineElement.max_duration of the child.
See ges_clip_get_timeline_time_from_internal_time(), which performs the
reverse.
An GES.TrackElement.active child of clip with a GES.TrackElement.track
A time in the timeline time coordinates
The time in the internal coordinates of child corresponding to timeline_time, or #GST_CLOCK_TIME_NONE if the conversion could not be performed.
Gets the GES.Clip.layer of the clip.
The layer clip is in, or null if clip is not in any layer.
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 GObject.Value.unset.
Note that GObject.Object.get_property is really intended for language bindings, GObject.Object.get is much more convenient for C programming.
The name of the property to get
Return location for the property value. Can be an empty GObject.Value initialized by G_VALUE_INIT (auto-initialized with expected type since GLib 2.60), a GObject.Value initialized with the expected property type, or a GObject.Value initialized with a transformable type
This function gets back user data pointers stored via
g_object_set_qdata().
A GLib.Quark, naming the user data pointer
The user data pointer set, or null
Gets the GES.Clip.supported_formats of the clip.
The GES.TrackType-s supported by clip.
Convert the internal source time from the child to a timeline time. This will take any time effects placed on the clip into account (see GES.BaseEffect for what time effects are supported, and how to declare them in GES).
When internal_time is above the GES.TimelineElement.in_point of
child, this will return the timeline time at which the internal
content found at internal_time appears in the output of the timeline's
track. For example, this would let you know where in the timeline a
particular scene in a media file would appear.
This will be done assuming the clip has an indefinite end, so the timeline time may be beyond the end of the clip, or even breaking its GES.Clip.duration_limit.
If, instead, internal_time is below the current
GES.TimelineElement.in_point of child, this will return what you would
need to set the GES.TimelineElement.start of clip to if you set the
GES.TimelineElement.in_point of child to internal_time and wanted to
keep the content of child currently found at the current
GES.TimelineElement.start of clip at the same timeline position. If
this would be negative, the conversion fails. This is useful for
determining what position to use in a #GES_EDIT_MODE_TRIM if you wish
to trim to a specific point in the internal content, such as a
particular scene in a media file.
Note that whilst a clip has no time effects, this second return is
equivalent to finding the timeline time at which the content of child
at internal_time would be found in the timeline if it had indefinite
extent in both directions. However, with non-linear time effects this
second return will be more distinct.
In either case, the returned time would be appropriate to use in
ges_timeline_element_edit() for #GES_EDIT_MODE_TRIM, and similar, if
you wish to use a particular internal point as a reference. For
example, you could choose to end a clip at a certain internal
'out-point', similar to the GES.TimelineElement.in_point, by
translating the desired end time into the timeline coordinates, and
using this position to trim the end of a clip.
See ges_clip_get_internal_time_from_timeline_time(), which performs the
reverse, or ges_clip_get_timeline_time_from_source_frame() which does
the same conversion, but using frame numbers.
An GES.TrackElement.active child of clip with a GES.TrackElement.track
A time in the internal time coordinates of child
The time in the timeline coordinates corresponding to internal_time, or #GST_CLOCK_TIME_NONE if the conversion could not be performed.
Convert the source frame number to a timeline time. This acts the same
as ges_clip_get_timeline_time_from_internal_time() using the core
children of the clip and using the frame number to specify the internal
position, rather than a timestamp.
The returned timeline time can be used to seek or edit to a specific frame.
Note that you can get the frame timestamp of a particular clip asset
with ges_clip_asset_get_frame_time().
The frame number to get the corresponding timestamp of in the timeline coordinates
The timestamp corresponding to frame_number in the core children of clip, in the timeline coordinates, or #GST_CLOCK_TIME_NONE if the conversion could not be performed.
Gets the internal index of an effect in the clip. The index of effects in a clip will run from 0 to n-1, where n is the total number of effects. If two effects share the same GES.TrackElement.track, the effect with the numerically lower index will be applied to the source data after the other effect, i.e. output data will always flow from a higher index effect to a lower index effect.
The effect we want to get the index of
The index of effect in clip, or -1 if something went wrong.
Gets the GES.BaseEffect-s that have been added to the clip. The
returned list is ordered by their internal index in the clip. See
ges_clip_get_top_effect_index().
A list of all GES.BaseEffect-s that have been added to clip.
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
Checks whether object has a floating reference.
true if object has a floating reference
Tells you if the clip is currently in the process of being moved from one layer to another. This is useful from the layer::clip-added and layer::clip-removed callbacks to know if the clip is being moved between layers, or is being added/removed for other reasons (like being added for the first time, or being actually removed).
true if clip is currently being moved between layers, false otherwise.
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.:
typedef enum
{
PROP_FOO = 1,
PROP_LAST
} MyObjectProperty;
static GParamSpec *properties[PROP_LAST];
static void
my_object_class_init (MyObjectClass *klass)
{
properties[PROP_FOO] = g_param_spec_int ("foo", NULL, NULL,
0, 100,
50,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
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 GObject.ParamSpec of a property installed on the class of object.
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.
the same object
Increase the reference count of object, and possibly remove the
floating 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().
object
Remove a top effect from the clip.
Note, if the effect is a time effect, this may be refused if the clip would not be able to adapt itself once the effect is removed.
The top effect to remove
true if effect was successfully added to clip at index.
Releases all references to other objects. This can be used to break reference cycles.
This function should only be called from object system implementations.
Sets multiple properties of an object at once. The properties argument should be a dictionary mapping property names to values.
Object containing the properties to set
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 GLib.Quark 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 GLib.Quark storage growing unbounded.
name of the key
Optionaldata: anydata to associate with that key
Sets a property on an object.
The name of the property to set
The value to set the property to
Sets the GES.Clip.supported_formats of the clip. This should normally only be called by subclasses, which should be responsible for updating its value, rather than the user.
The GES.TrackType-s supported by clip
See ges_clip_set_top_effect_index_full(), which also gives an error.
An effect within clip to move
The index for effect in clip
true if effect was successfully moved to newindex.
Set the index of an effect within the clip. See
ges_clip_get_top_effect_index(). The new index must be an existing
index of the clip. The effect is moved to the new index, and the other
effects may be shifted in index accordingly to otherwise maintain the
ordering.
An effect within clip to move
The index for effect in clip
true if effect was successfully moved to newindex.
Splits a clip at the given timeline position into two clips. The clip must already have a GES.Clip.layer.
The original clip's GES.TimelineElement.duration is reduced such that its end point matches the split position. Then a new clip is created in the same layer, whose GES.TimelineElement.start matches the split position and GES.TimelineElement.duration will be set such that its end point matches the old end point of the original clip. Thus, the two clips together will occupy the same positions in the timeline as the original clip did.
The children of the new clip will be new copies of the original clip's children, so it will share the same sources and use the same operations.
The new clip will also have its GES.TimelineElement.in_point set so that any internal data will appear in the timeline at the same time. Thus, when the timeline is played, the playback of data should appear the same. This may be complicated by any additional GES.Effect-s that have been placed on the original clip that depend on the playback time or change the data consumption rate of sources. This method will attempt to translate these effects such that the playback appears the same. In such complex situations, you may get a better result if you place the clip in a separate sub GES.Project, which only contains this clip (and its effects), and in the original layer create two neighbouring GES.UriClip-s that reference this sub-project, but at a different GES.TimelineElement.in_point.
The timeline position at which to perform the split, between the start and end of the clip
The newly created clip resulting from the splitting clip, or null if clip can't be split.
Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
name of the key
the data if found, or null if no such data exists.
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 GLib.Quark, naming the user data pointer
The user data pointer set, or null
Stops a signal's emission by the given signal name. This will prevent the default handler and any subsequent signal handlers from being invoked.
Name of the signal to stop emission of
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.Object::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.
Unblocks a handler so it will be called again during any signal emissions
Handler ID of the handler to be unblocked
Decreases the reference count of object. When its reference count
drops to 0, the object is finalized (i.e. its memory is freed).
If the pointer to the GObject.Object may be reused in future (for example, if it is
an instance variable of another object), it is recommended to clear the
pointer to null rather than retain a dangling pointer to a potentially
invalid GObject.Object instance. Use g_clear_object() for this.
Virtualvfunc_the constructed function is called by g_object_new() as the
final step of the object creation process. At the point of the call, all
construction properties have been set on the object. The purpose of this
call is to allow for object initialisation steps that can only be performed
after construction properties have been set. constructed implementors
should chain up to the constructed call of their parent class to allow it
to complete its initialisation.
Virtualvfunc_Method to create the core GES.TrackElement of a clip
of this class. If a clip of this class may create several track elements per
track type, this should be left as null, and
GESClipClass::create_track_elements should be used instead. Otherwise, you
should implement this class method and leave
GESClipClass::create_track_elements as the default implementation
A GES.TrackType to create a GES.TrackElement for
Virtualvfunc_Method to create the (multiple) core GES.TrackElement-s of a clip of this class. If GESClipClass::create_track_element is implemented, this should be kept as the default implementation
A GES.TrackType to create GES.TrackElement-s for
Virtualvfunc_Virtualvfunc_the dispose function is supposed to drop all references to other
objects, but keep the instance otherwise intact, so that client method
invocations still work. It may be run multiple times (due to reference
loops). Before returning, dispose should chain up to the dispose method
of the parent class.
Virtualvfunc_instance finalization function, should finish the finalization of
the instance begun in dispose and chain up to the finalize method of the
parent class.
Virtualvfunc_Virtualvfunc_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.
Virtualvfunc_the generic setter for all properties of this type. Should be
overridden for every type with properties. If implementations of
set_property don't emit property change notification explicitly, this will
be done implicitly by the type system. However, if the notify signal is
emitted explicitly, the type system will not emit it a second time.
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.
GObject.Closure to watch
Adds a timeline element to the container. The element will now be a child of the container (and the container will be the GES.TimelineElement.parent of the added element), which means that it is now controlled by the container. This may change the properties of the child or the container, depending on the subclass.
Additionally, the children properties of the newly added element will
be shared with the container, meaning they can also be read and set
using ges_timeline_element_get_child_property() and
ges_timeline_element_set_child_property() on the container.
The element to add as a child
true if child was successfully added to container.
Register a property of a child of the element to allow it to be
written with ges_timeline_element_set_child_property() and read with
ges_timeline_element_get_child_property(). A change in the property
will also appear in the GES.TimelineElement.SignalSignatures.deep_notify | GES.TimelineElement::deep-notify signal.
pspec should be unique from other children properties that have been
registered on self.
The specification for the property to add
The Gst.Object who the property belongs to
true if the property was successfully registered.
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
true if the fields in str was successfully deserialized and added to container.
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
true if the meta_item field has been registered on container.
Create a copy of self. All the properties of self are copied into
a new element, with the exception of GES.TimelineElement.parent,
GES.TimelineElement.timeline and GES.TimelineElement.name. Other data,
such the list of a GES.Container's children, is not copied.
If deep is true, then the new element is prepared so that it can be
used in ges_timeline_element_paste() or ges_timeline_paste_element().
In the case of copying a GES.Container, this ensures that the children
of self will also be pasted. The new element should not be used for
anything else and can only be used once in a pasting operation. In
particular, the new element itself is not an actual 'deep' copy of
self, but should be thought of as an intermediate object used for a
single paste operation.
Whether the copy is needed for pasting
The newly create element, copied from self.
Edits the container within its timeline.
A whitelist of layers where the edit can be performed, null allows all layers in the timeline
The priority/index of the layer container should be moved to. -1 means no move
The edit mode
The edge of container where the edit should occur
The edit position: a new location for the edge of container (in nanoseconds)
true if the edit of container completed, false on failure.
Edits the element within its timeline by adjusting its GES.TimelineElement.start, GES.TimelineElement.duration or GES.TimelineElement.in_point, and potentially doing the same for other elements in the timeline. See GES.EditMode for details about each edit mode. An edit may fail if it would place one of these properties out of bounds, or if it would place the timeline in an unsupported configuration.
Note that if you act on a GES.TrackElement, this will edit its parent
GES.Clip instead. Moreover, for any GES.TimelineElement, if you select
#GES_EDGE_NONE for #GES_EDIT_MODE_NORMAL or #GES_EDIT_MODE_RIPPLE, this
will edit the toplevel instead, but still in such a way as to make the
GES.TimelineElement.start of self reach the edit position.
Note that if the element's timeline has a GES.Timeline.snapping_distance set, then the edit position may be snapped to the edge of some element under the edited element.
new_layer_priority can be used to switch self, and other elements
moved by the edit, to a new layer. New layers may be be created if the
the corresponding layer priority/index does not yet exist for the
timeline.
The priority/index of the layer self should be moved to. -1 means no move
The edit mode
The edge of self where the edit should occur
The edit position: a new location for the edge of self (in nanoseconds) in the timeline coordinates
true if the edit of self completed, false on failure.
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
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
true if the boolean value under meta_item was copied to dest.
Gets the property of a child of the element.
property_name can either be in the format "prop-name" or
"TypeName::prop-name", where "prop-name" is the name of the property
to get (as used in g_object_get()), and "TypeName" is the type name of
the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is
useful when two children of different types share the same property
name.
The first child found with the given "prop-name" property that was
registered with ges_timeline_element_add_child_property() (and of the
type "TypeName", if it was given) will have the corresponding
property copied into value.
Note that ges_timeline_element_get_child_properties() may be more
convenient for C programming.
The name of the child property to get
true if the property was found and copied to value.
Get the list of timeline elements contained in the container. If
recursive is true, and the container contains other containers as
children, then their children will be added to the list, in addition to
themselves, and so on.
Whether to recursively get children in container
The list of GES.TimelineElement-s contained in container.
Gets the current date 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
true if the date value under meta_item was copied to dest.
Gets the current date time 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
true if the date time value under meta_item was copied to dest.
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
true if the double value under meta_item was copied to dest.
Gets the GES.TimelineElement.duration for the element.
The duration of self (in nanoseconds).
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
true if the float value under meta_item was copied to dest.
Gets the GES.Asset.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 GES.Asset.id that is compatible with the current state of the object, as determined by the GES.Extractable implementer. If it was indeed extracted from an asset, this should return the same as its corresponding asset GES.Asset.id.
The GES.Asset.id of some associated GES.Asset that is compatible with self's current state.
Gets the GES.TimelineElement.in_point for the element.
The in-point of self (in nanoseconds).
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
true if the int value under meta_item was copied to dest.
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
true if the int64 value under meta_item was copied to dest.
Gets the priority of the layer the element is in. A GES.Group may span several layers, so this would return the highest priority (numerically, the smallest) amongst them.
The priority of the layer self is in, or #GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY if self does not exist in a layer.
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
A copy of the marker list value under key, or null if it could not be fetched.
Gets the GES.TimelineElement.max_duration for the element.
The max-duration of self (in nanoseconds).
Get the "natural" framerate of self. This is to say, for example
for a GES.VideoUriSource the framerate of the source.
Note that a GES.AudioSource may also have a natural framerate if it derives from the same GES.SourceClip asset as a GES.VideoSource, and its value will be that of the video source. For example, if the uri of a GES.UriClip points to a file that contains both a video and audio stream, then the corresponding GES.AudioUriSource will share the natural framerate of the corresponding GES.VideoUriSource.
Whether self has a natural framerate or not, framerate_n and framerate_d will be set to, respectively, 0 and -1 if it is not the case.
Gets the GES.TimelineElement.parent for the element.
The parent of self, or null if self has no parent.
Gets the GES.TimelineElement.start for the element.
The start of self (in nanoseconds).
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
The string value under meta_item, or null if it could not be fetched.
Gets the GES.TimelineElement.timeline for the element.
The timeline of self, or null if self has no timeline.
Gets the toplevel GES.TimelineElement.parent of the element.
The toplevel parent of self.
Gets the track types that the element can interact with, i.e. the type of GES.Track it can exist in, or will create GES.TrackElement-s for.
The track types that self supports.
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
true if the uint value under meta_item was copied to dest.
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
true if the uint64 value under meta_item was copied to dest.
Get a list of children properties of the element, which is a list of
all the specifications passed to
ges_timeline_element_add_child_property().
An array of GObject.ParamSpec corresponding to the child properties of self, or null if something went wrong.
Looks up a child property of the element.
prop_name can either be in the format "prop-name" or
"TypeName::prop-name", where "prop-name" is the name of the property
to look up (as used in g_object_get()), and "TypeName" is the type name
of the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is
useful when two children of different types share the same property
name.
The first child found with the given "prop-name" property that was
registered with ges_timeline_element_add_child_property() (and of the
type "TypeName", if it was given) will be passed to child, and the
registered specification of this property will be passed to pspec.
The name of a child property
true if a child corresponding to the property was found, in which case child and pspec are set.
Serializes the set metadata fields of the meta container to a string.
A serialized container.
Paste an element inside the same timeline and layer as self. self
must be the return of ges_timeline_element_copy() with deep=TRUE,
and it should not be changed before pasting.
self 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 stay within the same timeline and layer, 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_paste_element().
The position in the timeline element should be pasted to, i.e. the GES.TimelineElement.start value for the pasted element.
The newly created element, or null if pasting fails.
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.
true if the meta_item field was successfully registered on container to only hold value types, with the given flags, and the field was successfully set to value.
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.
true if the meta_item field was successfully registered on container to only hold boolean typed values, with the given flags, and the field was successfully set to value.
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.
true if the meta_item field was successfully registered on container to only hold date typed values, with the given flags, and the field was successfully set to value.
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.
true if the meta_item field was successfully registered on container to only hold date time typed values, with the given flags, and the field was successfully set to value.
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.
true if the meta_item field was successfully registered on container to only hold double typed values, with the given flags, and the field was successfully set to value.
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.
true if the meta_item field was successfully registered on container to only hold float typed values, with the given flags, and the field was successfully set to value.
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.
true if the meta_item field was successfully registered on container to only hold int typed values, with the given flags, and the field was successfully set to value.
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.
true if the meta_item field was successfully registered on container to only hold int64 typed values, with the given flags, and the field was successfully set to value.
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.
true if the meta_item field was successfully registered on container to only hold string typed values, with the given flags, and the field was successfully set to value.
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.
true if the meta_item field was successfully registered on container to only hold uint typed values, with the given flags, and the field was successfully set to value.
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.
true if the meta_item field was successfully registered on container to only hold uint64 typed values, with the given flags, and the field was successfully set to value.
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.
true if the meta_item field was successfully registered on container to only hold type values, with the given flags.
Removes a timeline element from the container. The element will no longer be controlled by the container.
The child to remove
true if child was successfully removed from container.
Remove a child property from the element. pspec should be a
specification that was passed to
ges_timeline_element_add_child_property(). The corresponding property
will no longer be registered as a child property for the element.
true if the property was successfully un-registered for self.
Edits the start time of an element within its timeline in ripple mode.
See ges_timeline_element_edit() with #GES_EDIT_MODE_RIPPLE and
#GES_EDGE_NONE.
The new start time of self in ripple mode
true if the ripple edit of self completed, false on failure.
Edits the end time of an element within its timeline in ripple mode.
See ges_timeline_element_edit() with #GES_EDIT_MODE_RIPPLE and
#GES_EDGE_END.
The new end time of self in ripple mode
true if the ripple edit of self completed, false on failure.
Edits the end time of an element within its timeline in roll mode.
See ges_timeline_element_edit() with #GES_EDIT_MODE_ROLL and
#GES_EDGE_END.
The new end time of self in roll mode
true if the roll edit of self completed, false on failure.
Edits the start time of an element within its timeline in roll mode.
See ges_timeline_element_edit() with #GES_EDIT_MODE_ROLL and
#GES_EDGE_START.
The new start time of self in roll mode
true if the roll edit of self completed, false on failure.
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
GES.Extractable 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
GES.Extractable, 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 GES.Asset.id.
true if asset could be successfully set on self.
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
true if value was set under meta_item for container.
See ges_timeline_element_set_child_property_full(), which also gives an
error.
Note that ges_timeline_element_set_child_properties() may be more
convenient for C programming.
The name of the child property to set
The value to set the property to
true if the property was found and set.
Sets the property of a child of the element. Specifically, the property
corresponding to the pspec used in
ges_timeline_element_add_child_property() is set to value.
Sets the property of a child of the element.
property_name can either be in the format "prop-name" or
"TypeName::prop-name", where "prop-name" is the name of the property
to set (as used in g_object_set()), and "TypeName" is the type name of
the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is
useful when two children of different types share the same property
name.
The first child found with the given "prop-name" property that was
registered with ges_timeline_element_add_child_property() (and of the
type "TypeName", if it was given) will have the corresponding
property set to value. Other children that may have also matched the
property name (and type name) are left unchanged!
The name of the child property to set
The value to set the property to
true if the property was found and set.
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
true if value was set under meta_item for container.
Sets GES.TimelineElement.duration for the element.
Whilst the element is part of a GES.Timeline, this is the same as
editing the element with ges_timeline_element_edit() under
#GES_EDIT_MODE_TRIM with #GES_EDGE_END. In particular, the
GES.TimelineElement.duration of the element may be snapped to a
different timeline time difference from the one given. In addition,
setting may fail if it would place the timeline in an unsupported
configuration, or the element does not have enough internal content to
last the desired duration.
The desired duration in its timeline
true if duration could be set for self.
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
true if value was set under meta_item for container.
Sets GES.TimelineElement.in_point for the element. If the new in-point is above the current GES.TimelineElement.max_duration of the element, this method will fail.
The in-point, in internal time coordinates
true if inpoint could be set for self.
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
true if value was set under meta_item for container.
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
true if value was set under meta_item for container.
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
true if value was set under meta_item for container.
Sets GES.TimelineElement.max_duration for the element. If the new maximum duration is below the current GES.TimelineElement.in_point of the element, this method will fail.
The maximum duration, in internal time coordinates
true if maxduration could be set for self.
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.
true if value was set under meta_item for container.
Sets the GES.TimelineElement.name for the element. If null is given
for name, then the library will instead generate a new name based on
the type name of the element, such as the name "uriclip3" for a
GES.UriClip, and will set that name instead.
If self already has a GES.TimelineElement.timeline, you should not
call this function with name set to null.
You should ensure that, within each GES.Timeline, every element has a
unique name. If you call this function with name as null, then
the library should ensure that the set generated name is unique from
previously generated names. However, if you choose a name that
interferes with the naming conventions of the library, the library will
attempt to ensure that the generated names will not conflict with the
chosen name, which may lead to a different name being set instead, but
the uniqueness between generated and user-chosen names is not
guaranteed.
Optionalname: stringThe name self should take
true if name or a generated name for self could be set.
Sets the GES.TimelineElement.parent for the element.
This is used internally and you should normally not call this. A
GES.Container will set the GES.TimelineElement.parent of its children
in ges_container_add() and ges_container_remove().
Note, if parent is not null, self must not already have a parent
set. Therefore, if you wish to switch parents, you will need to call
this function twice: first to set the parent to null, and then to the
new parent.
If parent is not null, you must ensure it already has a
(non-floating) reference to self before calling this.
true if parent could be set for self.
Sets the priority of the element within the containing layer.
The priority
true if priority could be set for self.
Sets GES.TimelineElement.start for the element. If the element has a parent, this will also move its siblings with the same shift.
Whilst the element is part of a GES.Timeline, this is the same as
editing the element with ges_timeline_element_edit() under
#GES_EDIT_MODE_NORMAL with #GES_EDGE_NONE. In particular, the
GES.TimelineElement.start of the element may be snapped to a different
timeline time from the one given. In addition, setting may fail if it
would place the timeline in an unsupported configuration.
The desired start position of the element in its timeline
true if start could be set for self.
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
true if value was set under meta_item for container.
Sets the GES.TimelineElement.timeline of the element.
This is used internally and you should normally not call this. A GES.Clip will have its GES.TimelineElement.timeline set through its GES.Layer. A GES.Track will similarly take care of setting the GES.TimelineElement.timeline of its GES.TrackElement-s. A GES.Group will adopt the same GES.TimelineElement.timeline as its children.
If timeline is null, this will stop its current
GES.TimelineElement.timeline from tracking it, otherwise timeline will
start tracking self. Note, in the latter case, self must not already
have a timeline set. Therefore, if you wish to switch timelines, you
will need to call this function twice: first to set the timeline to
null, and then to the new timeline.
true if timeline could be set for self.
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
true if value was set under meta_item for container.
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
true if value was set under meta_item for container.
Edits the start time of an element within its timeline in trim mode.
See ges_timeline_element_edit() with #GES_EDIT_MODE_TRIM and
#GES_EDGE_START.
The new start time of self in trim mode
true if the trim edit of self completed, false on failure.
Ungroups the container by splitting it into several containers containing various children of the original. The rules for how the container splits depends on the subclass. A GES.Group will simply split into its children. A GES.Clip will split into one GES.Clip per GES.TrackType it overlaps with (so an audio-video clip will split into an audio clip and a video clip), where each clip contains all the GES.TrackElement-s from the original clip with a matching GES.TrackElement.track_type.
If recursive is true, and the container contains other containers as
children, then they will also be ungrouped, and so on.
Whether to recursively ungroup container
The list of new GES.Container-s created from the splitting of container.
Virtualvfunc_Virtualvfunc_Virtual method that is called right after a GES.TimelineElement is added
Virtualvfunc_Virtual method that is called right after a GES.TimelineElement is removed
Virtualvfunc_Prepare copy for pasting as a copy of self. At least by
copying the children properties of self into copy.
Virtualvfunc_Edits the container within its timeline.
A whitelist of layers where the edit can be performed, null allows all layers in the timeline
The priority/index of the layer container should be moved to. -1 means no move
The edit mode
The edge of container where the edit should occur
The edit position: a new location for the edge of container (in nanoseconds)
Virtualvfunc_Gets the GES.Asset.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 GES.Asset.id that is compatible with the current state of the object, as determined by the GES.Extractable implementer. If it was indeed extracted from an asset, this should return the same as its corresponding asset GES.Asset.id.
Virtualvfunc_Gets the priority of the layer the element is in. A GES.Group may span several layers, so this would return the highest priority (numerically, the smallest) amongst them.
Virtualvfunc_Get the "natural" framerate of self. This is to say, for example
for a GES.VideoUriSource the framerate of the source.
Note that a GES.AudioSource may also have a natural framerate if it derives from the same GES.SourceClip asset as a GES.VideoSource, and its value will be that of the video source. For example, if the uri of a GES.UriClip points to a file that contains both a video and audio stream, then the corresponding GES.AudioUriSource will share the natural framerate of the corresponding GES.VideoUriSource.
Virtualvfunc_Gets the track types that the element can interact with, i.e. the type of GES.Track it can exist in, or will create GES.TrackElement-s for.
Virtualvfunc_Looks up a child property of the element.
prop_name can either be in the format "prop-name" or
"TypeName::prop-name", where "prop-name" is the name of the property
to look up (as used in g_object_get()), and "TypeName" is the type name
of the child (as returned by G_OBJECT_TYPE_NAME()). The latter format is
useful when two children of different types share the same property
name.
The first child found with the given "prop-name" property that was
registered with ges_timeline_element_add_child_property() (and of the
type "TypeName", if it was given) will be passed to child, and the
registered specification of this property will be passed to pspec.
The name of a child property
Virtualvfunc_Virtualvfunc_Edits the start time of an element within its timeline in ripple mode.
See ges_timeline_element_edit() with #GES_EDIT_MODE_RIPPLE and
#GES_EDGE_NONE.
The new start time of self in ripple mode
Virtualvfunc_Edits the end time of an element within its timeline in ripple mode.
See ges_timeline_element_edit() with #GES_EDIT_MODE_RIPPLE and
#GES_EDGE_END.
The new end time of self in ripple mode
Virtualvfunc_Edits the end time of an element within its timeline in roll mode.
See ges_timeline_element_edit() with #GES_EDIT_MODE_ROLL and
#GES_EDGE_END.
The new end time of self in roll mode
Virtualvfunc_Edits the start time of an element within its timeline in roll mode.
See ges_timeline_element_edit() with #GES_EDIT_MODE_ROLL and
#GES_EDGE_START.
The new start time of self in roll mode
Virtualvfunc_This method is called after the GES.Asset of an object is
set. If your class supports the asset of an object changing, then you
can use this method to change the parameters of the object to match the
new asset GES.Asset.id. If setting the asset should be able to fail,
you should implement set_asset_full instead.
Virtualvfunc_Virtualvfunc_Virtualvfunc_Virtualvfunc_Sets GES.TimelineElement.duration for the element.
Whilst the element is part of a GES.Timeline, this is the same as
editing the element with ges_timeline_element_edit() under
#GES_EDIT_MODE_TRIM with #GES_EDGE_END. In particular, the
GES.TimelineElement.duration of the element may be snapped to a
different timeline time difference from the one given. In addition,
setting may fail if it would place the timeline in an unsupported
configuration, or the element does not have enough internal content to
last the desired duration.
The desired duration in its timeline
Virtualvfunc_Sets GES.TimelineElement.in_point for the element. If the new in-point is above the current GES.TimelineElement.max_duration of the element, this method will fail.
The in-point, in internal time coordinates
Virtualvfunc_Sets GES.TimelineElement.max_duration for the element. If the new maximum duration is below the current GES.TimelineElement.in_point of the element, this method will fail.
The maximum duration, in internal time coordinates
Virtualvfunc_Sets the GES.TimelineElement.parent for the element.
This is used internally and you should normally not call this. A
GES.Container will set the GES.TimelineElement.parent of its children
in ges_container_add() and ges_container_remove().
Note, if parent is not null, self must not already have a parent
set. Therefore, if you wish to switch parents, you will need to call
this function twice: first to set the parent to null, and then to the
new parent.
If parent is not null, you must ensure it already has a
(non-floating) reference to self before calling this.
Virtualvfunc_Sets the priority of the element within the containing layer.
The priority
Virtualvfunc_Sets GES.TimelineElement.start for the element. If the element has a parent, this will also move its siblings with the same shift.
Whilst the element is part of a GES.Timeline, this is the same as
editing the element with ges_timeline_element_edit() under
#GES_EDIT_MODE_NORMAL with #GES_EDGE_NONE. In particular, the
GES.TimelineElement.start of the element may be snapped to a different
timeline time from the one given. In addition, setting may fail if it
would place the timeline in an unsupported configuration.
The desired start position of the element in its timeline
Virtualvfunc_Edits the start time of an element within its timeline in trim mode.
See ges_timeline_element_edit() with #GES_EDIT_MODE_TRIM and
#GES_EDGE_START.
The new start time of self in trim mode
Virtualvfunc_Ungroups the container by splitting it into several containers containing various children of the original. The rules for how the container splits depends on the subclass. A GES.Group will simply split into its children. A GES.Clip will split into one GES.Clip per GES.TrackType it overlaps with (so an audio-video clip will split into an audio clip and a video clip), where each clip contains all the GES.TrackElement-s from the original clip with a matching GES.TrackElement.track_type.
If recursive is true, and the container contains other containers as
children, then they will also be ungrouped, and so on.
Whether to recursively ungroup container
Static_Staticcompat_Optionaldata: anyStaticfind_StaticgroupGroups the containers into a single container by merging them. The containers must all belong to the same GES.TimelineElement.timeline.
If the elements are all GES.Clip-s then this method will attempt to combine them all into a single GES.Clip. This should succeed if they: share the same GES.TimelineElement.start, GES.TimelineElement.duration and GES.TimelineElement.in_point; exist in the same layer; and all of the sources share the same GES.Asset. If this fails, or one of the elements is not a GES.Clip, this method will try to create a GES.Group instead.
Optionalcontainers: GES.Container[]The GES.Container-s to group
Staticinstall_Staticinstall_the id for the new property
the GObject.ParamSpec for the new property
Staticinterface_Find the GObject.ParamSpec 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.
Staticinterface_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 GObject.ParamSpec, 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
GObject.TypeInfo.) 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 GObject.ParamSpec for the new property
Staticinterface_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
Staticlist_StaticnewvStaticoverride_the new property ID
the name of a property registered in a parent class or in an interface of this class.
GES.Clip-s are the core objects of a GES.Layer. Each clip may exist in a single layer but may control several GES.TrackElement-s that span several GES.Track-s. A clip will ensure that all its children share the same GES.TimelineElement.start and GES.TimelineElement.duration in their tracks, which will match the GES.TimelineElement.start and GES.TimelineElement.duration of the clip itself. Therefore, changing the timing of the clip will change the timing of the children, and a change in the timing of a child will change the timing of the clip and subsequently all its siblings. As such, a clip can be treated as a singular object in its layer.
For most uses of a GES.Timeline, it is often sufficient to only interact with GES.Clip-s directly, which will take care of creating and organising the elements of the timeline's tracks.
Core Children
In more detail, clips will usually have some core GES.TrackElement children, which are created by the clip when it is added to a layer in a timeline. The type and form of these core children will depend on the clip's subclass. You can use
ges_track_element_is_core()to determine whether a track element is considered such a core track element. Note, if a core track element is part of a clip, it will always be treated as a core child of the clip. You can connect to the GES.Container.SignalSignatures.child_added | GES.Container::child-added signal to be notified of their creation.When a child is added to a clip, the timeline will select its tracks using GES.Timeline.SignalSignatures.select_tracks_for_object | GES.Timeline::select-tracks-for-object. Note that it may be the case that the child will still have no set GES.TrackElement.track after this process. For example, if the timeline does not have a track of the corresponding GES.Track.track_type. A clip can safely contain such children, which may have their track set later, although they will play no functioning role in the timeline in the meantime.
If a clip may create track elements with various GES.TrackElement.track_type(s), such as a GES.UriClip, but you only want it to create a subset of these types, you should set the GES.Clip.supported_formats of the clip to the subset of types. This should be done before adding the clip to a layer.
If a clip will produce several core elements of the same GES.TrackElement.track_type, you should connect to the timeline's GES.Timeline.SignalSignatures.select_tracks_for_object | GES.Timeline::select-tracks-for-object signal to coordinate which tracks each element should land in. Note, no two core children within a clip can share the same GES.Track, so you should not select the same track for two separate core children. Provided you stick to this rule, it is still safe to select several tracks for the same core child, the core child will be copied into the additional tracks. You can manually add the child to more tracks later using
ges_clip_add_child_to_track(). If you do not wish to use a core child, you can always select no track.The GES.TimelineElement.in_point of the clip will control the GES.TimelineElement.in_point of its core children to be the same value if their GES.TrackElement.has_internal_source is set to
true.The GES.TimelineElement.max_duration of the clip is the minimum GES.TimelineElement.max_duration of its core children. If you set its value to anything other than its current value, this will also set the GES.TimelineElement.max_duration of all its core children to the same value if their GES.TrackElement.has_internal_source is set to
true. As a special case, whilst a clip does not yet have any core children, its GES.TimelineElement.max_duration may be set to indicate what its value will be once they are created.Effects
Some subclasses (GES.SourceClip and GES.BaseEffectClip) may also allow their objects to have additional non-core GES.BaseEffect-s elements as children. These are additional effects that are applied to the output data of the core elements. They can be added to the clip using
ges_clip_add_top_effect(), which will take care of adding the effect to the timeline's tracks. The new effect will be placed between the clip's core track elements and its other effects. As such, the newly added effect will be applied to any source data before the other existing effects. You can change the ordering of effects usingges_clip_set_top_effect_index().Tracks are selected for top effects in the same way as core children. If you add a top effect to a clip before it is part of a timeline, and later add the clip to a timeline, the track selection for the top effects will occur just after the track selection for the core children. If you add a top effect to a clip that is already part of a timeline, the track selection will occur immediately. Since a top effect must be applied on top of a core child, if you use GES.Timeline.SignalSignatures.select_tracks_for_object | GES.Timeline::select-tracks-for-object, you should ensure that the added effects are destined for a GES.Track that already contains a core child.
In addition, if the core child in the track is not GES.TrackElement.active, then neither can any of its effects be GES.TrackElement.active. Therefore, if a core child is made in-active, all of the additional effects in the same track will also become in-active. Similarly, if an effect is set to be active, then the core child will also become active, but other effects will be left alone. Finally, if an active effect is added to the track of an in-active core child, it will become in-active as well. Note, in contrast, setting a core child to be active, or an effect to be in-active will not change the other children in the same track.
Time Effects
Some effects also change the timing of their data (see GES.BaseEffect for what counts as a time effect). Note that a GES.BaseEffectClip will refuse time effects, but a GES.Source will allow them.
When added to a clip, time effects may adjust the timing of other children in the same track. Similarly, when changing the order of effects, making them (in)-active, setting their time property values or removing time effects. These can cause the GES.Clip.duration_limit to change in value. However, if such an operation would ever cause the GES.TimelineElement.duration to shrink such that a clip's GES.Source is totally overlapped in the timeline, the operation would be prevented. Note that the same can happen when adding non-time effects with a finite GES.TimelineElement.max_duration.
Therefore, when working with time effects, you should -- more so than usual -- not assume that setting the properties of the clip's children will succeed. In particular, you should use
ges_timeline_element_set_child_property_full()when setting the time properties.If you wish to preserve the internal duration of a source in a clip during these time effect operations, you can do something like the following.