A datatype to hold a frame number.
A #GESAsset in the GStreamer Editing Services represents a resources
that can be used. In particular, any class that implements the
#GESExtractable interface may have some associated assets with a
corresponding #GESAsset:extractable-type, from which its objects can be
extracted using ges_asset_extract(). Some examples would be
#GESClip, #GESFormatter and #GESTrackElement.
All assets that are created within GES are stored in a cache; one per
each #GESAsset:id and #GESAsset:extractable-type pair. These assets can
be fetched, and initialized if they do not yet exist in the cache,
using ges_asset_request().
``` c
GESAsset *effect_asset;
GESEffect *effect;
// You create an asset for an effect
effect_asset = ges_asset_request (GES_TYPE_EFFECT, "agingtv", NULL);
// And now you can extract an instance of GESEffect from that asset
effect = GES_EFFECT (ges_asset_extract (effect_asset));
```
The advantage of using assets, rather than simply creating the object
directly, is that the currently loaded resources can be listed with
ges_list_assets() and displayed to an end user. For example, to show
which media files have been loaded, and a standard list of effects. In
fact, the GES library already creates assets for #GESTransitionClip and
#GESFormatter, which you can use to list all the available transition
types and supported formats.
The other advantage is that #GESAsset implements #GESMetaContainer, so
metadata can be set on the asset, with some subclasses automatically
creating this metadata on initiation.
For example, to display information about the supported formats, you
could do the following:
|[
GList *formatter_assets, *tmp;
// List all the transitions
formatter_assets = ges_list_assets (GES_TYPE_FORMATTER);
// Print some infos about the formatter GESAsset
for (tmp = formatter_assets; tmp; tmp = tmp->next) {
g_print ("Name of the formatter: %s, file extension it produces: %s",
ges_meta_container_get_string (
GES_META_CONTAINER (tmp->data), GES_META_FORMATTER_NAME),
ges_meta_container_get_string (
GES_META_CONTAINER (tmp->data), GES_META_FORMATTER_EXTENSION));
}
g_list_free (transition_assets);
]|
## ID
Each asset is uniquely defined in the cache by its
#GESAsset:extractable-type and #GESAsset:id. Depending on the
#GESAsset:extractable-type, the #GESAsset:id can be used to parametrise
the creation of the object upon extraction. By default, a class that
implements #GESExtractable will only have a single associated asset,
with an #GESAsset:id set to the type name of its objects. However, this
is overwritten by some implementations, which allow a class to have
multiple associated assets. For example, for #GESTransitionClip the
#GESAsset:id will be a nickname of the #GESTransitionClip:vtype. You
should check the documentation for each extractable type to see if they
differ from the default.
Moreover, each #GESAsset:extractable-type may also associate itself
with a specific asset subclass. In such cases, when their asset is
requested, an asset of this subclass will be returned instead.
## Managing
You can use a #GESProject to easily manage the assets of a
#GESTimeline.
## Proxies
Some assets can (temporarily) act as the #GESAsset:proxy of another
asset. When the original asset is requested from the cache, the proxy
will be returned in its place. This can be useful if, say, you want
to substitute a #GESUriClipAsset corresponding to a high resolution
media file with the asset of a lower resolution stand in.
An asset may even have several proxies, the first of which will act as
its default and be returned on requests, but the others will be ordered
to take its place once it is removed. You can add a proxy to an asset,
or set its default, using ges_asset_set_proxy(), and you can remove
them with ges_asset_unproxy().
Indicate that an existing #GESAsset in the cache should be reloaded
upon the next request. This can be used when some condition has
changed, which may require that an existing asset should be updated.
For example, if an external resource has changed or now become
available.
Note, the asset is not immediately changed, but will only actually
reload on the next call to ges_asset_request() or
ges_asset_request_async().
%TRUE if the specified asset exists in the cache and could be
marked for reloading.
The #GESAsset:extractable-type of the asset that
needs reloading
The #GESAsset:id of the asset asset that needs
reloading
Returns an asset with the given properties. If such an asset already
exists in the cache (it has been previously created in GES), then a
reference to the existing asset is returned. Otherwise, a newly created
asset is returned, and also added to the cache.
If the requested asset has been loaded with an error, then @error is
set, if given, and %NULL will be returned instead.
Note that the given @id may not be exactly the #GESAsset:id that is
set on the returned asset. For instance, it may be adjusted into a
standard format. Or, if a #GESExtractable type does not have its
extraction parametrised, as is the case by default, then the given @id
may be ignored entirely and the #GESAsset:id set to some standard, in
which case a %NULL @id can be given.
Similarly, the given @extractable_type may not be exactly the
#GESAsset:extractable-type that is set on the returned asset. Instead,
the actual extractable type may correspond to a subclass of the given
@extractable_type, depending on the given @id.
Moreover, depending on the given @extractable_type, the returned asset
may belong to a subclass of #GESAsset.
Finally, if the requested asset has a #GESAsset:proxy, then the proxy
that is found at the end of the chain of proxies is returned (a proxy's
proxy will take its place, and so on, unless it has no proxy).
Some asset subclasses only support asynchronous construction of its
assets, such as #GESUriClip. For such assets this method will fail, and
you should use ges_asset_request_async() instead. In the case of
#GESUriClip, you can use ges_uri_clip_asset_request_sync() if you only
want to wait for the request to finish.
A reference to the requested
asset, or %NULL if an error occurred.
The #GESAsset:extractable-type of the asset
The #GESAsset:id of the asset
Requests an asset with the given properties asynchronously (see
ges_asset_request()). When the asset has been initialized or fetched
from the cache, the given callback function will be called. The
asset can then be retrieved in the callback using the
ges_asset_request_finish() method on the given #GAsyncResult.
Note that the source object passed to the callback will be the
#GESAsset corresponding to the request, but it may not have loaded
correctly and therefore can not be used as is. Instead,
ges_asset_request_finish() should be used to fetch a usable asset, or
indicate that an error occurred in the asset's creation.
Note that the callback will be called in the #GMainLoop running under
the same #GMainContext that ges_init() was called in. So, if you wish
the callback to be invoked outside the default #GMainContext, you can
call g_main_context_push_thread_default() in a new thread before
calling ges_init().
Example of an asynchronous asset request:
|[
// The request callback
static void
asset_loaded_cb (GESAsset * source, GAsyncResult * res, gpointer user_data)
{
GESAsset *asset;
GError *error = NULL;
asset = ges_asset_request_finish (res, &error);
if (asset) {
g_print ("The file: %s is usable as a FileSource",
ges_asset_get_id (asset));
} else {
g_print ("The file: %s is *not* usable as a FileSource because: %s",
ges_asset_get_id (source), error->message);
}
gst_object_unref (mfs);
}
// The request:
ges_asset_request_async (GES_TYPE_URI_CLIP, some_uri, NULL,
(GAsyncReadyCallback) asset_loaded_cb, user_data);
]|
The #GESAsset:extractable-type of the asset
The #GESAsset:id of the asset
An object to allow cancellation of the
asset request, or %NULL to ignore
A function to call when the initialization is finished
Data to be passed to @callback
Fetches an asset requested by ges_asset_request_async(), which
finalises the request.
The requested asset, or %NULL if an error
occurred.
The task result to fetch the asset from
Extracts a new #GESAsset:extractable-type object from the asset. The
#GESAsset:id of the asset may determine the properties and state of the
newly created object.
A newly created object, or %NULL if an
error occurred.
The #GESAsset to extract an object from
Extracts a new #GESAsset:extractable-type object from the asset. The
#GESAsset:id of the asset may determine the properties and state of the
newly created object.
A newly created object, or %NULL if an
error occurred.
The #GESAsset to extract an object from
Retrieve the error that was set on the asset when it was loaded.
The error set on @asset, or
%NULL if no error occurred when @asset was loaded.
A #GESAsset
Gets the #GESAsset:extractable-type of the asset.
The extractable type of @self.
The #GESAsset
Gets the #GESAsset:id of the asset.
The ID of @self.
A #GESAsset
Gets the default #GESAsset:proxy of the asset.
The default proxy of @asset.
A #GESAsset
Gets the #GESAsset:proxy-target of the asset.
Note that the proxy target may have loaded with an error, so you should
call ges_asset_get_error() on the returned target.
The asset that @proxy is a proxy
of.
A #GESAsset
Get all the proxies that the asset has. The first item of the list will
be the default #GESAsset:proxy. The second will be the proxy that is
'next in line' to be default, and so on.
The list of proxies
that @asset has.
A #GESAsset
Sets the #GESAsset:proxy for the asset.
If @proxy is among the existing proxies of the asset (see
ges_asset_list_proxies()) it will be moved to become the default
proxy. Otherwise, if @proxy is not %NULL, it will be added to the list
of proxies, as the new default. The previous default proxy will become
'next in line' for if the new one is removed, and so on. As such, this
will **not** actually remove the previous default proxy (use
ges_asset_unproxy() for that).
Note that an asset can only act as a proxy for one other asset.
As a special case, if @proxy is %NULL, then this method will actually
remove **all** proxies from the asset.
%TRUE if @proxy was successfully set as the default for
@asset.
The #GESAsset to proxy
A new default proxy for @asset
Removes the proxy from the available list of proxies for the asset. If
the given proxy is the default proxy of the list, then the next proxy
in the available list (see ges_asset_list_proxies()) will become the
default. If there are no other proxies, then the asset will no longer
have a default #GESAsset:proxy.
%TRUE if @proxy was successfully removed from @asset's proxy
list.
The #GESAsset to no longer proxy with @proxy
An existing proxy of @asset
The #GESExtractable object type that can be extracted from the asset.
The ID of the asset. This should be unique amongst all assets with
the same #GESAsset:extractable-type. Depending on the associated
#GESExtractable implementation, this id may convey some information
about the #GObject that should be extracted. Note that, as such, the
ID will have an expected format, and you can not choose this value
arbitrarily. By default, this will be set to the type name of the
#GESAsset:extractable-type, but you should check the documentation
of the extractable type to see whether they differ from the
default behaviour.
The default proxy for this asset, or %NULL if it has no proxy. A
proxy will act as a substitute for the original asset when the
original is requested (see ges_asset_request()).
Setting this property will not usually remove the existing proxy, but
will replace it as the default (see ges_asset_set_proxy()).
The asset that this asset is a proxy for, or %NULL if it is not a
proxy for another asset.
Note that even if this asset is acting as a proxy for another asset,
but this asset is not the default #GESAsset:proxy, then @proxy-target
will *still* point to this other asset. So you should check the
#GESAsset:proxy property of @target-proxy before assuming it is the
current default proxy for the target.
Note that the #GObject::notify for this property is emitted after
the #GESAsset:proxy #GObject::notify for the corresponding (if any)
asset it is now the proxy of/no longer the proxy of.
A newly created object, or %NULL if an
error occurred.
The #GESAsset to extract an object from
Indicates that an error occurred
Indicates that the loading is being performed
asynchronously
Indicates that the loading is complete, without
error
## Children Properties
You can use the following children properties through the
#ges_track_element_set_child_property and alike set of methods:
- #gdouble `volume`: volume factor, 1.0=100%.
- #gboolean `mute`: mute channel.
Outputs a test audio stream using audiotestsrc. The default property values
output silence. Useful for testing pipelines, or to fill gaps in an audio
track.
Get the current frequency of @self.
The current frequency of @self.
a #GESAudioTestSource
Get the current volume of @self.
The current volume of @self
a #GESAudioTestSource
Lets you set the frequency applied on the track element
a #GESAudioTestSource
The frequency you want to apply on @self
Sets the volume of the test audio signal.
a #GESAudioTestSource
The volume you want to apply on @self
A #GESAudioTrack is a default audio #GESTrack, with a
#GES_TRACK_TYPE_AUDIO #GESTrack:track-type and "audio/x-raw(ANY)"
#GESTrack:caps.
By default, an audio track will have its #GESTrack:restriction-caps
set to "audio/x-raw" with the following properties:
- format: "S32LE"
- channels: 2
- rate: 44100
- layout: "interleaved"
These fields are needed for negotiation purposes, but you can change
their values if you wish. It is advised that you do so using
ges_track_update_restriction_caps() with new values for the fields you
wish to change, and any additional fields you may want to add. Unlike
using ges_track_set_restriction_caps(), this will ensure that these
default fields will at least have some value set.
Creates a new audio track, with a #GES_TRACK_TYPE_AUDIO
#GESTrack:track-type, "audio/x-raw(ANY)" #GESTrack:caps, and
"audio/x-raw" #GESTrack:restriction-caps with the properties:
- format: "S32LE"
- channels: 2
- rate: 44100
- layout: "interleaved"
You should use ges_track_update_restriction_caps() if you wish to
modify these fields, or add additional ones.
The newly created audio track.
Creates a new #GESAudioTransition.
This should never be called by applications as this will
be created by clips.
The newly created #GESAudioTransition.
### Children Properties
{{ libs/GESVideoUriSource-children-props.md }}
The location of the file/resource to use.
parent class
#GESBaseEffectClip-s are clips whose core elements are
#GESBaseEffect-s.
## Effects
#GESBaseEffectClip-s can have **additional** #GESBaseEffect-s added as
non-core elements. These additional effects are applied to the output
of the core effects of the clip that they share a #GESTrack with. See
#GESClip for how to add and move these effects from the clip.
Whether the class allows for the user to add additional non-core
#GESBaseEffect-s to clips from this class.
A #GESClipClass
The #GList containing the children of @obj.
a #GESContainer
The #GESContainer:height of @obj.
a #GESContainer
To be used by subclasses only. This indicate how to handle a change in
a child.
#GESClip-s are the core objects of a #GESLayer. Each clip may exist in
a single layer but may control several #GESTrackElement-s that span
several #GESTrack-s. A clip will ensure that all its children share the
same #GESTimelineElement:start and #GESTimelineElement:duration in
their tracks, which will match the #GESTimelineElement:start and
#GESTimelineElement: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 #GESTimeline, it is often sufficient to only
interact with #GESClip-s directly, which will take care of creating and
organising the elements of the timeline's tracks.
Most subclassed clips will be associated with some *core*
#GESTrackElement-s. When such a clip is added to a layer in a timeline,
it will create these children and they will be added to the timeline's
tracks. You can connect to the #GESContainer::child-added signal to be
notified of their creation. If a clip will produce several core
elements of the same #GESTrackElement:track-type but they are destined
for separate tracks, you should connect to the timeline's
#GESTimeline::select-tracks-for-object signal to coordinate which
tracks each element should land in.
The #GESTimelineElement:in-point of the clip will control the
#GESTimelineElement:in-point of these core elements to be the same
value if their #GESTrackElement:has-internal-source is set to %TRUE.
The #GESTimelineElement:max-duration of the clip is the minimum
#GESTimelineElement:max-duration of its children. If you set its value
to anything other than its current value, this will also set the
#GESTimelineElement:max-duration of all its core children to the same
value if their #GESTrackElement:has-internal-source is set to %TRUE.
As a special case, whilst a clip does not yet have any core children,
its #GESTimelineElement:max-duration may be set to indicate what its
value will be once they are created.
## Effects
Some subclasses (#GESSourceClip and #GESBaseEffect) may also allow
their objects to have additional non-core #GESBaseEffect-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_container_add(), 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 using
ges_clip_set_top_effect_index().
The #GESTrackElement created
by @clip, or %NULL if @clip can not provide a track element for the
given @type or an error occurred.
A #GESClip
A #GESTrackType to create a #GESTrackElement for
A list of
the #GESTrackElement-s created by @clip for the given @type, or %NULL
if no track elements are created or an error occurred.
A #GESClip
A #GESTrackType to create #GESTrackElement-s for
Extracts a #GESTrackElement 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.
The newly created element, or
%NULL if an error occurred.
A #GESClip
An asset with #GES_TYPE_TRACK_ELEMENT as its
#GESAsset:extractable-type
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 #GESTimeline, and
for tracks that are in the same timeline.
This method is an alternative to using the
#GESTimeline::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 #GESTimeline,
such as causing three sources to overlap at a single time, or causing
a source to completely overlap another in the same track.
Note that @err will not always be set upon failure.
The element that was added to @track, either
@child or a copy of child, or %NULL if the element could not be added.
A #GESClip
A child of @clip
The track to add @child to
Finds 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
#GESTimelineElement: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.
A #GESClip
The track to search in, or %NULL to search in
all tracks
The type of track element to search for, or `G_TYPE_NONE` to
match any type
Finds the #GESTrackElement-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
#GESTrackElement: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 #GESTrackElement: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 #GESTrack: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 #GESTrackElement-s controlled by @clip, in @track or of the given
@track_type, and of the given @type.
A #GESClip
The track to search in, or %NULL to search in
all tracks
The track-type of the track element to search for, or
#GES_TRACK_TYPE_UNKNOWN to match any track type
The type of track element to search for, or %G_TYPE_NONE to
match any type
Gets the #GESClip:layer of the clip.
The layer @clip is in, or %NULL if
@clip is not in any layer.
A #GESClip
Gets the #GESClip:supported-formats of the clip.
The #GESTrackType-s supported by @clip.
A #GESClip
This method allows you to convert a frame number into a #GstClockTime, this
can be used to either seek to a particular frame in the timeline or to later
on edit @self with that timestamp.
This method should be use specifically in the case where you want to trim the
clip to a particular frame.
The returned timestamp is in the global #GESTimeline time coordinates of @self, not
in the internal time coordinates. In practice, this means that you can not use
that time to set the clip #GESTimelineElement:in-point but it can be used in
the timeline editing API, for example as the @position argument of the
#ges_timeline_element_edit method.
Note that you can get the frame timestamp of a particular clip asset with
#ges_clip_asset_get_frame_time.
The timestamp corresponding to @frame_number in the element source
in the timeline coordinates.
A #GESClip
The frame number to get the corresponding timestamp in the
timeline coordinates
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 #GESTrackElement: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 index of @effect in @clip, or -1 if something went wrong.
A #GESClip
The effect we want to get the index of
Gets the #GESBaseEffect-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
#GESBaseEffect-s that have been added to @clip.
A #GESClip
Moves a clip to a new layer. If the clip already exists in a layer, it
is first removed from its current layer before being added to the new
layer.
%TRUE if @clip was successfully moved to @layer.
A #GESClip
The new layer
Sets the #GESClip: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.
A #GESClip
The #GESTrackType-s supported by @clip
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.
%TRUE if @effect was successfully moved to @newindex.
A #GESClip
An effect within @clip to move
The index for @effect in @clip
Splits a clip at the given timeline position into two clips. The clip
must already have a #GESClip:layer.
The original clip's #GESTimelineElement:duration is reduced such that
its end point matches the split position. Then a new clip is created in
the same layer, whose #GESTimelineElement:start matches the split
position and #GESTimelineElement: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 #GESTimelineElement: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
#GESEffect-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 #GESProject, which only
contains this clip (and its effects), and in the original layer
create two neighbouring #GESUriClip-s that reference this sub-project,
but at a different #GESTimelineElement:in-point.
The newly created clip resulting
from the splitting @clip, or %NULL if @clip can't be split.
The #GESClip to split
The timeline position at which to perform the split
The layer this clip lies in.
If you want to connect to this property's #GObject::notify signal,
you should connect to it with g_signal_connect_after() since the
signal emission may be stopped internally.
The #GESTrackType-s that the clip supports, which it can create
#GESTrackElement-s for. Note that this can be a combination of
#GESTrackType flags to indicate support for several
#GESTrackElement:track-type elements.
The #GESUriClipAsset is a special #GESAsset specilized in #GESClip.
it is mostly used to get information about the #GESTrackType-s the objects extracted
from it can potentialy create #GESTrackElement for.
Result: %TRUE if @self has a natural framerate %FALSE otherwise
The object from which to retrieve the natural framerate
The framerate numerator
The framerate denominator
Converts the given frame number into a timestamp, using the "natural" frame
rate of the asset.
You can use this to reference a specific frame in a media file and use this
as, for example, the `in-point` or `max-duration` of a #GESClip.
The timestamp corresponding to @frame_number in the element source, given
in internal time coordinates, or #GST_CLOCK_TIME_NONE if the clip asset does not have a
natural frame rate.
The object for which to compute timestamp for specifed frame
The frame number we want the internal time coordinate timestamp of
Result: %TRUE if @self has a natural framerate %FALSE otherwise
The object from which to retrieve the natural framerate
The framerate numerator
The framerate denominator
Gets track types for which objects extracted from @self can create #GESTrackElement
The track types on which @self will create TrackElement when added to
a layer
a #GESClipAsset
Sets track types for which objects extracted from @self can create #GESTrackElement
a #GESClipAsset
The track types supported by the GESClipAsset
The formats supported by the asset.
The object from which to retrieve the natural framerate
The framerate numerator
The framerate denominator
Method to create the core #GESTrackElement 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
create_track_elements() should be used instead. Otherwise, you should
implement this class method and leave create_track_elements() as the
default implementation
Method to create the (multiple) core
#GESTrackElement-s of a clip of this class. If create_track_element()
is implemented, this should be kept as the default implementation
A #GESContainer is a timeline element that controls other
#GESTimelineElement-s, which are its children. In particular, it is
responsible for maintaining the relative #GESTimelineElement:start and
#GESTimelineElement:duration times of its children. Therefore, if a
container is temporally adjusted or moved to a new layer, it may
accordingly adjust and move its children. Similarly, a change in one of
its children may prompt the parent to correspondingly change its
siblings.
Groups the containers into a single container by merging them. The
containers must all belong to the same #GESTimelineElement:timeline.
If the elements are all #GESClip-s then this method will attempt to
combine them all into a single #GESClip. This should succeed if they:
share the same #GESTimelineElement:start, #GESTimelineElement:duration
and #GESTimelineElement:in-point; exist in the same layer; and all of
the sources share the same #GESAsset. If this fails, or one of the
elements is not a #GESClip, this method will try to create a #GESGroup
instead.
The container created by merging
@containers, or %NULL if they could not be merged into a single
container.
The #GESContainer-s to group
Edits the container within its timeline.
use #ges_timeline_element_edit instead.
%TRUE if the edit of @container completed, %FALSE on failure.
The #GESContainer to edit
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)
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 #GESGroup will simply split
into its children. A #GESClip will split into one #GESClip per
#GESTrackType it overlaps with (so an audio-video clip will split into
an audio clip and a video clip), where each clip contains all the
#GESTrackElement-s from the original clip with a matching
#GESTrackElement:track-type.
If @recursive is %TRUE, and the container contains other containers as
children, then they will also be ungrouped, and so on.
The list of
new #GESContainer-s created from the splitting of @container.
The container to ungroup
Whether to recursively ungroup @container
Adds a timeline element to the container. The element will now be a
child of the container (and the container will be the
#GESTimelineElement: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.
%TRUE if @child was successfully added to @container.
A #GESContainer
The element to add as a child
Edits the container within its timeline.
use #ges_timeline_element_edit instead.
%TRUE if the edit of @container completed, %FALSE on failure.
The #GESContainer to edit
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)
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.
The list of
#GESTimelineElement-s contained in @container.
A #GESContainer
Whether to recursively get children in @container
Removes a timeline element from the container. The element will no
longer be controlled by the container.
%TRUE if @child was successfully removed from @container.
A #GESContainer
The child to remove
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 #GESGroup will simply split
into its children. A #GESClip will split into one #GESClip per
#GESTrackType it overlaps with (so an audio-video clip will split into
an audio clip and a video clip), where each clip contains all the
#GESTrackElement-s from the original clip with a matching
#GESTrackElement:track-type.
If @recursive is %TRUE, and the container contains other containers as
children, then they will also be ungrouped, and so on.
The list of
new #GESContainer-s created from the splitting of @container.
The container to ungroup
Whether to recursively ungroup @container
The span of the container's children's #GESTimelineElement: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 list of
#GESTimelineElement-s controlled by this Container
The #GESContainer:height of @obj
Will be emitted after a child is added to the container. Usually,
you should connect with g_signal_connect_after() since the signal
may be stopped internally.
The child that was added
Will be emitted after a child is removed from the container.
The child that was removed
The list of
new #GESContainer-s created from the splitting of @container.
The container to ungroup
Whether to recursively ungroup @container
%TRUE if the edit of @container completed, %FALSE on failure.
The #GESContainer to edit
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)
A function that creates a #GstElement that can be used as a source to
fill the gaps of the track. A gap is a timeline region where the track
has no #GESTrackElement sources.
A source #GstElement to fill gaps in @track.
The #GESTrack
A method for creating the core #GESTrackElement of a clip, to be added
to a #GESTrack of the given track type.
If a clip may produce several track elements per track type,
#GESCreateTrackElementsFunc is more appropriate.
The #GESTrackElement created
by @clip, or %NULL if @clip can not provide a track element for the
given @type or an error occurred.
A #GESClip
A #GESTrackType to create a #GESTrackElement for
A method for creating the core #GESTrackElement-s of a clip, to be
added to #GESTrack-s of the given track type.
A list of
the #GESTrackElement-s created by @clip for the given @type, or %NULL
if no track elements are created or an error occurred.
A #GESClip
A #GESTrackType to create #GESTrackElement-s for
The edges of an object contain in a #GESTimeline or #GESTrack
Represents the start of an object.
Represents the end of an object.
Represent the fact we are not working with any edge of an
object.
When a single timeline element is edited within its timeline, using
ges_timeline_element_edit(), depending on the edit mode, its
#GESTimelineElement:start, #GESTimelineElement:duration or
#GESTimelineElement:in-point will be adjusted accordingly. In addition,
other elements in the timeline may also have their properties adjusted.
In fact, the edit is actually performed on the toplevel of the edited
element (usually a #GESClip), which is responsible for moving its
children along with it. For simplicity, in the descriptions we will
use "element" to exclusively refer to toplevel elements.
In the edit mode descriptions, the "start edge", "end edge" and the
"element as a whole" correspond to using #GES_EDGE_START, #GES_EDGE_END
and #GES_EDGE_NONE as part of the edit, respectively. The "start time",
"duration time" and "in-point time" correspond to the
#GESTimelineElement:start, #GESTimelineElement:duration and
#GESTimelineElement:in-point properties, respectively. Moreover, the
"end time" refers to the final time of the element:
#GESTimelineElement:start + #GESTimelineElement:duration. Finally,
the "edit position" is the timeline time used as part of the edit.
You can also find more explanation about the behaviour of those modes at:
[trim, ripple and roll](http://pitivi.org/manual/trimming.html)
and [clip management](http://pitivi.org/manual/usingclips.html).
The element is edited the normal way (default).
This only moves a single element. If acting on the start edge of the
element, the element's start time is set to the edit position.
If acting on end edge of the element, the element's duration time
is set such that its end time matches the edit position.
The element is edited in ripple mode. This
shifts the element and all later elements (those with equal or later
start times) in the timeline by the same amount. If acting on the
element as a whole, the element's start time is shifted to the edit
position, and later elements are also shifted by the same amount. If
acting on the end edge of the element, the element's **duration time**
is shifted so that the element's end time matches the edit position,
and later elements have their **start time** shifted by the same
amount.
The element is edited in roll mode. This trims
the edge of an element and neighbouring edges (opposite edges of other
elements in the timeline with the same corresponding time value), such
that the edges remain in contact. If acting on the start edge of the
element, the start edge is trimmed to the edit position (see
#GES_EDIT_MODE_TRIM), and any other elements in the timeline whose end
time matches the edited element's start time (evaluated before the
edit) will have their **end** edge trimmed to the same edit position.
Similarly, if acting on the end edge of the element, the end edge is
trimmed to the edit position, and any other elements in the timeline
whose start time matches the edited element's end time will have
their start edge trimmed to the same edit position.
The element is edited in trim mode. This shifts
the edge of a single element while maintaining the timing of
its internal content in the timeline, so the samples/frames/etc of a
source would still appear at the same timeline time when it is played.
If acting on the start edge of the element, the element's start time
will be shifted to the edit position and the element's in-point time
will be shifted by the same amount. Additionally, the element's
duration time will be shifted the other way such that the element's
end time remains the same. If acting on end edge of the element, the
element's duration time is set such that its end time matches the edit
position.
The element is edited in slide mode (not yet
implemented). This shifts the element and will trim the edges of
neighbouring edges on either side accordingly. If acting on the
element as a whole, the element's start time is shifted to the edit
position. Any other elements in the timeline whose end time matches
the edited element's start time (evaluated before the edit) will have
their end edge trimmed to the same edit position. Additionally, any
other elements in the timeline whose start time matches the edited
element's end time will have their start edge trimmed to match the
edited element's **new** end time.
Currently we only support effects with 1 sinkpad and 1 sourcepad
with the exception of `gesaudiomixer` and `gescompositor` which
can be used as effects.
Creates a new #GESEffect from the description of the bin. It should be
possible to determine the type of the effect through the element
'klass' metadata of the GstElements that will be created.
In that corner case, you should use:
#ges_asset_request (GES_TYPE_EFFECT, "audio your ! bin ! description", NULL);
and extract that asset to be in full control.
a newly created #GESEffect, or %NULL if something went
wrong.
The gst-launch like bin description of the effect
The description of the effect bin with a gst-launch-style
pipeline description.
Example: "videobalance saturation=1.5 hue=+0.5"
This asset has a GStreamer bin-description as ID and is able to determine
to what track type the effect should be used in.
parent class
Register an element that can change the rate at which media is playing. The
property type must be float or double, and must be a factor of the rate,
i.e. a value of 2.0 must mean that the media plays twice as fast. For
example, this is true for the properties 'rate' and 'tempo' of the element
'pitch', which is already registered by default. By registering the element,
timeline duration can be correctly converted into media duration, allowing
the right segment seeks to be sent to the sources.
A reference to the GESEffectClass can be obtained as follows:
GES_EFFECT_CLASS (g_type_class_ref (GES_TYPE_EFFECT));
whether the rate property was succesfully registered. When this
method returns false, a warning is emitted with more information.
Instance of the GESEffectClass
Name of the GstElement that changes the rate
Name of the property that changes the rate
The effect will be applied on the sources that have lower priorities
(higher number) between the inpoint and the end of it.
The asset ID of an effect clip is in the form:
```
"audio ! bin ! description || video ! bin ! description"
```
Creates a new #GESEffectClip from the description of the bin.
a newly created #GESEffectClip, or
%NULL if something went wrong.
The gst-launch like bin description of the effect
The gst-launch like bin description of the effect
The description of the audio track of the effect bin with a gst-launch-style
pipeline description. This should be used for test purposes.
Example: "audiopanorama panorama=1.0"
The description of the video track of the effect bin with a gst-launch-style
pipeline description. This should be used for test purposes.
Example: "videobalance saturation=1.5 hue=+0.5"
The ID passed is malformed
An error happened while loading the asset
The formatted files was malformed
A #GObject that implements the #GESExtractable interface can be
extracted from a #GESAsset using ges_asset_extract().
Each extractable type will have its own way of interpreting the
#GESAsset:id of an asset (or, if it is associated with a specific
subclass of #GESAsset, the asset subclass may handle the
interpretation of the #GESAsset:id). By default, the requested asset
#GESAsset:id will be ignored by a #GESExtractable and will be set to
the type name of the extractable instead. Also by default, when the
requested asset is extracted, the returned object will simply be a
newly created default object of that extractable type. You should check
the documentation for each extractable type to see if they differ from
the default.
After the object is extracted, it will have a reference to the asset it
came from, which you can retrieve using ges_extractable_get_asset().
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.
The #GESAsset:id of some associated #GESAsset
that is compatible with @self's current state.
A #GESExtractable
Get the asset that has been set on the extractable object.
The asset set on @self, or %NULL
if no asset has been set.
A #GESExtractable
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.
The #GESAsset:id of some associated #GESAsset
that is compatible with @self's current state.
A #GESExtractable
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.
%TRUE if @asset could be successfully set on @self.
A #GESExtractable
The asset to set
Method for checking that an ID is valid for the given #GESExtractable
type. If the given ID is considered valid, it can be adjusted into some
standard and returned to prevent the creation of separate #GESAsset-s,
with different #GESAsset:id, that would otherwise act the same.
Returns (transfer full) (nullable): The actual #GESAsset:id to set on
any corresponding assets, based on @id, or %NULL if @id is not valid.
The #GESExtractable type to check @id for
The ID to check
The subclass type of #GESAsset that should be created when
an asset with the corresponding #GESAsset:extractable-type is
requested.
The method to call to check whether a given ID is valid as
an asset #GESAsset:id for the given #GESAsset:extractable-type. The
returned ID is the actual #GESAsset:id that is set on the asset. The
default implementation will simply always return the type name of the
#GESAsset:extractable-type, even if the received ID is %NULL. As such,
any given ID is considered valid (or is ignored), but only one is
actually ever set on an asset, which means the given
#GESAsset:extractable-type can only have one associated asset.
Whether an object of this class can have its
#GESAsset change over its lifetime. This should be set to %TRUE if one
of the object's parameters that is associated with its ID can change
after construction, which would require an asset with a new ID. Note
that the subclass is required to handle the requesting and setting of
the new asset on the object.
The #GESAsset:id of some associated #GESAsset
that is compatible with @self's current state.
A #GESExtractable
Tests if a given GESFrameNumber represents a valid frame
Constant to define an undefined frame number
A function that will be called when the nleobject of a corresponding
track element needs to be filled.
The implementer of this function shall add the proper #GstElement to @nleobj
using gst_bin_add().
This method type is no longer used.
%TRUE if the implementer successfully filled the @nleobj.
The #GESClip controlling the track elements
The #GESTrackElement
The nleobject that needs to be filled
Base class for timeline data serialization and deserialization.
Checks if there is a #GESFormatter available which can load a #GESTimeline
from the given URI.
TRUE if there is a #GESFormatter that can support the given uri
or FALSE if not.
a #gchar * pointing to the URI
Returns TRUE if there is a #GESFormatter available which can save a
#GESTimeline to the given URI.
TRUE if the given @uri is supported, else FALSE.
a #gchar * pointing to a URI
Get the default #GESAsset to use as formatter. It will return
the asset for the #GESFormatter that has the highest @rank
The #GESAsset for the formatter with highest @rank
Load data from the given URI into timeline.
Use @ges_timeline_load_from_uri
TRUE if the timeline data was successfully loaded from the URI,
else FALSE.
a #GESFormatter
a #GESTimeline
a #gchar * pointing to a URI
Save data from timeline to the given URI.
Use @ges_timeline_save_to_uri
TRUE if the timeline data was successfully saved to the URI
else FALSE.
a #GESFormatter
a #GESTimeline
a #gchar * pointing to a URI
%TRUE to overwrite file if it exists
Load data from the given URI into timeline.
Use @ges_timeline_load_from_uri
TRUE if the timeline data was successfully loaded from the URI,
else FALSE.
a #GESFormatter
a #GESTimeline
a #gchar * pointing to a URI
Save data from timeline to the given URI.
Use @ges_timeline_save_to_uri
TRUE if the timeline data was successfully saved to the URI
else FALSE.
a #GESFormatter
a #GESTimeline
a #gchar * pointing to a URI
%TRUE to overwrite file if it exists
GES Formatter class. Override the vmethods to implement the formatter functionnality.
the parent class structure
Whether the URI can be loaded
class method to deserialize data from a URI
class method to serialize data to a URI
The class to register metas on
The name of the formatter
The formatter description
A list of coma separated file extensions handled
by the formatter. The order of the extensions should match the
list of the structures inside @caps
The caps the formatter handled, they should match what
gstreamer typefind mechanism will report for the files the formatter
handles.
The version of the formatter
The rank of the formatter
Virtual method for loading a timeline from a given URI.
Every #GESFormatter subclass needs to implement this method.
TRUE if the timeline data was successfully loaded from the URI,
else FALSE.
a #GESFormatter
a #GESTimeline
a #gchar * pointing to a URI
Virtual method for saving a timeline to a uri.
Every #GESFormatter subclass needs to implement this method.
TRUE if the timeline data was successfully saved to the URI
else FALSE.
a #GESFormatter
a #GESTimeline
a #gchar * pointing to a URI
%TRUE to overwrite file if it exists
A #GESGroup controls one or more #GESContainer-s (usually #GESClip-s,
but it can also control other #GESGroup-s). Its children must share
the same #GESTimeline, but can otherwise lie in separate #GESLayer-s
and have different timings.
To initialise a group, you may want to use ges_container_group(),
and similarly use ges_container_ungroup() to dispose of it.
A group will maintain the relative #GESTimelineElement:start times of
its children, as well as their relative layer #GESLayer:priority.
Therefore, if one of its children has its #GESTimelineElement:start
set, all other children will have their #GESTimelineElement:start
shifted by the same amount. Similarly, if one of its children moves to
a new layer, the other children will also change layers to maintain the
difference in their layer priorities. For example, if a child moves
from a layer with #GESLayer:priority 1 to a layer with priority 3, then
another child that was in a layer with priority 0 will move to the
layer with priority 2.
The #GESGroup:start of a group refers to the earliest start
time of its children. If the group's #GESGroup:start is set, all the
children will be shifted equally such that the earliest start time
will match the set value. The #GESGroup:duration of a group is the
difference between the earliest start time and latest end time of its
children. If the group's #GESGroup:duration is increased, the children
whose end time matches the end of the group will be extended
accordingly. If it is decreased, then any child whose end time exceeds
the new end time will also have their duration decreased accordingly.
A group may span several layers, but for methods such as
ges_timeline_element_get_layer_priority() and
ges_timeline_element_edit() a group is considered to have a layer
priority that is the highest #GESLayer:priority (numerically, the
smallest) of all the layers it spans.
Created a new empty group. You may wish to use
ges_container_group() instead, which can return a different
#GESContainer subclass if possible.
The new empty group.
An overwrite of the #GESTimelineElement:duration property. For a
#GESGroup, this is the difference between the earliest
#GESTimelineElement:start time and the latest end time (given by
#GESTimelineElement:start + #GESTimelineElement:duration) amongst
its children.
An overwrite of the #GESTimelineElement:in-point property. This has
no meaning for a group and should not be set.
An overwrite of the #GESTimelineElement:max-duration property. This
has no meaning for a group and should not be set.
An overwrite of the #GESTimelineElement:priority property.
Setting #GESTimelineElement priorities is deprecated as all priority
management is now done by GES itself.
An overwrite of the #GESTimelineElement:start property. For a
#GESGroup, this is the earliest #GESTimelineElement:start time
amongst its children.
Outputs the video stream from a given file as a still frame. The frame chosen
will be determined by the in-point property on the track element. For image
files, do not set the in-point property.
This won't be used anymore and has been replaced by
#GESUriSource instead which now plugs an `imagefreeze` element when
#ges_uri_source_asset_is_image returns %TRUE.
The location of the file/resource to use.
#GESLayer-s are responsible for collecting and ordering #GESClip-s.
A layer within a timeline will have an associated priority,
corresponding to their index within the timeline. A layer with the
index/priority 0 will have the highest priority and the layer with the
largest index will have the lowest priority (the order of priorities,
in this sense, is the _reverse_ of the numerical ordering of the
indices). ges_timeline_move_layer() should be used if you wish to
change how layers are prioritised in a timeline.
Layers with higher priorities will have their content priorities
over content from lower priority layers, similar to how layers are
used in image editing. For example, if two separate layers both
display video content, then the layer with the higher priority will
have its images shown first. The other layer will only have its image
shown if the higher priority layer has no content at the given
playtime, or is transparent in some way. Audio content in separate
layers will simply play in addition.
Creates a new layer.
A new layer.
Extracts a new clip from an asset and adds it to the layer with
the given properties.
The newly created clip.
The #GESLayer
The asset to extract the new clip from
The #GESTimelineElement:start value to set on the new clip
If `start == #GST_CLOCK_TIME_NONE`, it will be added to the end
of @layer, i.e. it will be set to @layer's duration
The #GESTimelineElement:in-point value to set on the new
clip
The #GESTimelineElement:duration value to set on the new
clip
The #GESClip:supported-formats to set on the the new
clip, or #GES_TRACK_TYPE_UNKNOWN to use the default
Adds the given clip to the layer. If the method succeeds, the layer
will take ownership of the clip.
This method will fail and return %FALSE if @clip already resides in
some layer. It can also fail if the additional clip breaks some
compositional rules (see #GESTimelineElement).
%TRUE if @clip was properly added to @layer, or %FALSE
if @layer refused to add @clip.
The #GESLayer
The clip to add
Gets whether the layer is active for the given track. See
ges_layer_set_active_for_tracks().
%TRUE if @layer is active for @track, or %FALSE otherwise.
The #GESLayer
The #GESTrack to check if @layer is currently active for
Gets the #GESLayer:auto-transition of the layer.
%TRUE if transitions are automatically added to @layer.
The #GESLayer
Get the #GESClip-s contained in this layer.
A list of clips in
@layer.
The #GESLayer
Gets the clips within the layer that appear between @start and @end.
A list of #GESClip-s
that intersect the interval `[start, end)` in @layer.
The #GESLayer
Start of the interval
End of the interval
Retrieves the duration of the layer, which is the difference
between the start of the layer (always time 0) and the end (which will
be the end time of the final clip).
The duration of @layer.
The layer to get the duration from
Get the priority of the layer. When inside a timeline, this is its
index in the timeline. See ges_timeline_move_layer().
The priority of @layer within its timeline.
The #GESLayer
Gets the timeline that the layer is a part of.
The timeline that @layer
is currently part of, or %NULL if it is not associated with any
timeline.
The #GESLayer
Convenience method to check if the layer is empty (doesn't contain
any #GESClip), or not.
%TRUE if @layer is empty, %FALSE if it contains at least
one clip.
The #GESLayer to check
Removes the given clip from the layer.
%TRUE if @clip was removed from @layer, or %FALSE if the
operation failed.
The #GESLayer
The clip to remove
Activate or deactivate track elements in @tracks (or in all tracks if @tracks
is %NULL).
When a layer is deactivated for a track, all the #GESTrackElement-s in
the track that belong to a #GESClip in the layer will no longer be
active in the track, regardless of their individual
#GESTrackElement:active value.
Note that by default a layer will be active for all of its
timeline's tracks.
%TRUE if the operation worked %FALSE otherwise.
The #GESLayer
Whether elements in @tracks should be active or not
The list of
tracks @layer should be (de-)active in, or %NULL to include all the tracks
in the @layer's timeline
Sets #GESLayer:auto-transition for the layer. Use
ges_timeline_set_auto_transition() if you want all layers within a
#GESTimeline to have #GESLayer:auto-transition set to %TRUE. Use this
method if you want different values for different layers (and make sure
to keep #GESTimeline:auto-transition as %FALSE for the corresponding
timeline).
The #GESLayer
Whether transitions should be automatically added to
the layer
Sets the layer to the given priority. See #GESLayer:priority.
use #ges_timeline_move_layer instead. This deprecation means
that you will not need to handle layer priorities at all yourself, GES
will make sure there is never 'gaps' between layer priorities.
The #GESLayer
The priority to set
Whether to automatically create a #GESTransitionClip whenever two
#GESClip-s overlap in the layer. Specifically, if this is set to
%TRUE, then wherever two #GESSource-s (that belong to some clip in
the layer) share the same #GESTrackElement:track and the end time of
one source exceeds the #GESTimelineElement:start time of the other,
there will exist a corresponding #GESTransitionClip in the same
layer. These automatic transitions will be created and removed
accordingly. Their temporal extent will cover the overlap of the
two sources (their #GESTimelineElement:start will be set to the
#GESTimelineElement:start of the later source, and their
#GESTimelineElement:duration will be the difference between the
#GESTimelineElement:start of the later source, and the end time of
the earlier source).
It may be difficult to use this feature if your timeline has multiple
tracks of the same #GESTrack:track-type and you use the
#GESTimeline::select-tracks-for-object signal. You will have to
ensure that any #GESTransition that belongs to a newly created
transition clip is able to arrive in the correct track.
When a layer is added to a #GESTimeline, if this property is left as
%FALSE, but the timeline's #GESTimeline:auto-transition is %TRUE, it
will be set to %TRUE as well.
The priority of the layer in the #GESTimeline. 0 is the highest
priority. Conceptually, a timeline is a stack of layers,
and the priority of the layer represents its position in the stack. Two
layers should not have the same priority within a given GESTimeline.
Note that the timeline needs to be committed (with #ges_timeline_commit)
for the change to be taken into account.
use #ges_timeline_move_layer instead. This deprecation means
that you will not need to handle layer priorities at all yourself, GES
will make sure there is never 'gaps' between layer priorities.
the #GESTimeline where this layer is being used.
Will be emitted whenever the layer is activated or deactivated
for some #GESTrack. See ges_layer_set_active_for_tracks().
Whether @layer has been made active or de-active in the @tracks
A list of #GESTrack
which have been activated or deactivated
Will be emitted after the clip is added to the layer.
The clip that was added
Will be emitted after the clip is removed from the layer.
The clip that was removed
Subclasses can override the @get_objects if they can provide a more
efficient way of providing the list of contained #GESClip-s.
The description of the object, to be used in various contexts (string).
The file extension of files produced by a #GESFormatter (string).
The mimetype used for the file produced by a #GESFormatter (string).
The name of a formatter, used as the #GESAsset:id for #GESFormatter
assets (string).
The rank of a #GESFormatter (a #GstRank).
The version of a #GESFormatter (double).
The version of the format in which a project is serialized (string).
The ARGB color of a #GESMarker (an AARRGGBB hex as a uint).
The volume for a #GESTrack or a #GESLayer (float).
The default volume for a #GESTrack or a #GESLayer as a float.
Current position (in nanoseconds) of the #GESMarker
A #GESMarker can be colored by setting the #GES_META_MARKER_COLOR meta.
Creates a new #GESMarkerList.
A new #GESMarkerList
The newly-added marker, the list keeps ownership
of the marker
The position of the new marker
a #GList
of the #GESMarker within the GESMarkerList. The user will have
to unref each #GESMarker and free the #GList.
Moves a @marker in a @list to a new @position
%TRUE if the marker could be moved, %FALSE otherwise
(if the marker was not present in the list for example)
Removes @marker from @list, this decreases the refcount of the
marker by 1.
%TRUE if the marker could be removed, %FALSE otherwise
(if the marker was not present in the list for example)
The number of markers in @list
Will be emitted after the marker was added to the marker-list.
the position of the added marker
the #GESMarker that was added.
Will be emitted after the marker was moved to.
the previous position of the marker
the new position of the marker
the #GESMarker that was moved.
Will be emitted after the marker was removed the marker-list.
the #GESMarker that was removed.
A #GObject that implements #GESMetaContainer can have metadata set on
it, that is data that is unimportant to its function within GES, but
may hold some useful information. In particular,
ges_meta_container_set_meta() can be used to store any #GValue under
any generic field (specified by a string key). The same method can also
be used to remove the field by passing %NULL. A number of convenience
methods are also provided to make it easier to set common value types.
The metadata can then be read with ges_meta_container_get_meta() and
similar convenience methods.
## Registered Fields
By default, any #GValue can be set for a metadata field. However, you
can register some fields as static, that is they only allow values of a
specific type to be set under them, using
ges_meta_container_register_meta() or
ges_meta_container_register_static_meta(). The set #GESMetaFlag will
determine whether the value can be changed, but even if it can be
changed, it must be changed to a value of the same type.
Internally, some GES objects will be initialized with static metadata
fields. These will correspond to some standard keys, such as
#GES_META_VOLUME.
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().
%TRUE if the fields in @str was successfully deserialized
and added to @container.
A #GESMetaContainer
A string to deserialize and add 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().
%TRUE if the @meta_item field has been registered on
@container.
A #GESMetaContainer
The key for the @container field to check
A destination to get the registered flags of
the field, or %NULL to ignore
A destination to get the registered type of
the field, or %NULL to ignore
Calls the given function on each of the meta container's set metadata
fields.
A #GESMetaContainer
A function to call on each of @container's set
metadata fields
User data to send to @func
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.
%TRUE if the boolean value under @meta_item was copied
to @dest.
A #GESMetaContainer
The key for the @container field to get
Destination into which the value under @meta_item
should be copied.
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.
%TRUE if the date value under @meta_item was copied
to @dest.
A #GESMetaContainer
The key for the @container field to get
Destination into which the value under @meta_item
should be copied.
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.
%TRUE if the date time value under @meta_item was copied
to @dest.
A #GESMetaContainer
The key for the @container field to get
Destination into which the value under @meta_item
should be copied.
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.
%TRUE if the double value under @meta_item was copied
to @dest.
A #GESMetaContainer
The key for the @container field to get
Destination into which the value under @meta_item
should be copied.
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.
%TRUE if the float value under @meta_item was copied
to @dest.
A #GESMetaContainer
The key for the @container field to get
Destination into which the value under @meta_item
should be copied.
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.
%TRUE if the int value under @meta_item was copied
to @dest.
A #GESMetaContainer
The key for the @container field to get
Destination into which the value under @meta_item
should be copied.
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.
%TRUE if the int64 value under @meta_item was copied
to @dest.
A #GESMetaContainer
The key for the @container field to get
Destination into which the value under @meta_item
should be copied.
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.
A copy of the marker list value under @key,
or %NULL if it could not be fetched.
A #GESMetaContainer
The key for the @container field to get
Gets the current value of the specified field of the meta container.
The value under @key, or %NULL if @container
does not have the field set.
A #GESMetaContainer
The key for the @container field to get
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 string value under @meta_item, or %NULL
if it could not be fetched.
A #GESMetaContainer
The key for the @container field to get
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.
%TRUE if the uint value under @meta_item was copied
to @dest.
A #GESMetaContainer
The key for the @container field to get
Destination into which the value under @meta_item
should be copied.
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.
%TRUE if the uint64 value under @meta_item was copied
to @dest.
A #GESMetaContainer
The key for the @container field to get
Destination into which the value under @meta_item
should be copied.
Serializes the set metadata fields of the meta container to a string.
A serialized @container, or %NULL if an error
occurred.
A #GESMetaContainer
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.
A #GESMetaContainer
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.
%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.
A #GESMetaContainer
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.
%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.
A #GESMetaContainer
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.
%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.
A #GESMetaContainer
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.
%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.
A #GESMetaContainer
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.
%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.
A #GESMetaContainer
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.
%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.
A #GESMetaContainer
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.
%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.
A #GESMetaContainer
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.
%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.
A #GESMetaContainer
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.
%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.
A #GESMetaContainer
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.
%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.
A #GESMetaContainer
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.
%TRUE if the @meta_item field was successfully registered on
@container to only hold @type values, with the given @flags.
A #GESMetaContainer
Flags to be used for the registered field
The key for the @container field to register
The required value type for the registered field
Sets the value of the specified field of the meta container to the
given boolean value.
%TRUE if @value was set under @meta_item for @container.
A #GESMetaContainer
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 date value.
%TRUE if @value was set under @meta_item for @container.
A #GESMetaContainer
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 date time value.
%TRUE if @value was set under @meta_item for @container.
A #GESMetaContainer
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 double value.
%TRUE if @value was set under @meta_item for @container.
A #GESMetaContainer
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.
%TRUE if @value was set under @meta_item for @container.
A #GESMetaContainer
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.
%TRUE if @value was set under @meta_item for @container.
A #GESMetaContainer
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.
%TRUE if @value was set under @meta_item for @container.
A #GESMetaContainer
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 marker list value.
%TRUE if @value was set under @meta_item for @container.
A #GESMetaContainer
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.
%TRUE if @value was set under @meta_item for @container.
A #GESMetaContainer
The key for the @container field to set
The value to set under @meta_item, or %NULL to
remove the corresponding field
Sets the value of the specified field of the meta container to the
given string value.
%TRUE if @value was set under @meta_item for @container.
A #GESMetaContainer
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 uint value.
%TRUE if @value was set under @meta_item for @container.
A #GESMetaContainer
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.
%TRUE if @value was set under @meta_item for @container.
A #GESMetaContainer
The key for the @container field to set
The value to set under @meta_item
This is emitted for a meta container whenever the metadata under one
of its fields changes, is set for the first time, or is removed. In
the latter case, @value will be %NULL.
The key for the @container field that changed
The new value under @key
The metadata is readable
The metadata is writable
The metadata is readable and writable
A method to be called on all of a meta container's fields.
A #GESMetaContainer
The key for one of @container's fields
The set value under @key
User data
Outputs the video stream from a given image sequence. The start frame chosen
will be determined by the in-point property on the track element.
This should not be used anymore, the `imagesequence://` protocol should be
used instead. Check the #imagesequencesrc GStreamer element for more
information.
Use #GESUriSource instead
The uri of the file/resource to use. You can set a start index,
a stop index and a sequence pattern.
The format is <multifile://start:stop\@location-pattern>.
The pattern uses printf string formating.
Example uris:
multifile:///home/you/image\%03d.jpg
multifile://20:50@/home/you/sequence/\%04d.png
Base class for overlays, transitions, and effects
Operations are any kind of object that both outputs AND consumes data.
Overlays are objects which modify the underlying layer(s).
Examples of overlays include text, image watermarks, or audio dubbing.
Transitions, which change from one source to another over time, are
not considered overlays.
parent class
A #GESPipeline can take an audio-video #GESTimeline and conveniently
link its #GESTrack-s to an internal #playsink element, for
preview/playback, and an internal #encodebin element, for rendering.
You can switch between these modes using ges_pipeline_set_mode().
You can choose the specific audio and video sinks used for previewing
the timeline by setting the #GESPipeline:audio-sink and
#GESPipeline:video-sink properties.
You can set the encoding and save location used in rendering by calling
ges_pipeline_set_render_settings().
Creates a new pipeline.
The newly created pipeline.
Gets the #GESPipeline:mode of the pipeline.
The current mode of @pipeline.
A #GESPipeline
Gets a sample from the pipeline of the currently displayed image in
preview, in the specified format.
Note that if you use "ANY" caps for @caps, then the current format of
the image is used. You can retrieve these caps from the returned sample
with gst_sample_get_caps().
A sample of @self's current image preview in
the format given by @caps, or %NULL if an error prevented fetching the
sample.
A #GESPipeline in #GST_STATE_PLAYING or #GST_STATE_PAUSED
Some caps to specifying the desired format, or
#GST_CAPS_ANY to use the native format
Gets a sample from the pipeline of the currently displayed image in
preview, in the 24-bit "RGB" format and of the desired width and
height.
See ges_pipeline_get_thumbnail().
A sample of @self's current image preview in
the "RGB" format, scaled to @width and @height, or %NULL if an error
prevented fetching the sample.
A #GESPipeline in %GST_STATE_PLAYING or %GST_STATE_PAUSED
The requested pixel width of the image, or -1 to use the native
size
The requested pixel height of the image, or -1 to use the
native size
Gets the #GESPipeline:audio-sink of the pipeline.
The audio sink used by @self for preview.
A #GESPipeline
Gets the #GESPipeline:video-sink of the pipeline.
The video sink used by @self for preview.
A #GESPipeline
Sets the #GESPipeline:audio-sink of the pipeline.
A #GESPipeline in #GST_STATE_NULL
A audio sink for @self to use for preview
Sets the #GESPipeline:video-sink of the pipeline.
A #GESPipeline in #GST_STATE_NULL
A video sink for @self to use for preview
Saves the currently displayed image of the pipeline in preview to the
given location, in the specified dimensions and format.
%TRUE if @self's current image preview was successfully saved
to @location using the given @format, @height and @width.
A #GESPipeline in %GST_STATE_PLAYING or %GST_STATE_PAUSED
The requested pixel width of the image, or -1 to use the native
size
The requested pixel height of the image, or -1 to use the
native size
The desired mime type (for example, "image/jpeg")
The path to save the thumbnail to
Sets the #GESPipeline:mode of the pipeline.
Note that the pipeline will be set to #GST_STATE_NULL during this call
to perform the necessary changes. You will need to set the state again
yourself after calling this.
%TRUE if the mode of @pipeline was successfully set to @mode.
A #GESPipeline
The mode to set for @pipeline
Specifies the encoding to be used by the pipeline to render its
#GESPipeline:timeline, and where the result should be written to.
This method **must** be called before setting the pipeline mode to
#GES_PIPELINE_MODE_RENDER.
%TRUE if the settings were successfully set on @pipeline.
A #GESPipeline
The URI to save the #GESPipeline:timeline rendering
result to
The encoding to use for rendering the #GESPipeline:timeline
Takes the given timeline and sets it as the #GESPipeline:timeline for
the pipeline.
Note that you should only call this method once on a given pipeline
because a pipeline can not have its #GESPipeline:timeline changed after
it has been set.
%TRUE if @timeline was successfully given to @pipeline.
A #GESPipeline
The timeline to set for @pipeline
The audio filter(s) to apply during playback in preview mode,
immediately before the #GESPipeline:audio-sink. This exposes the
#playsink:audio-filter property of the internal #playsink.
The audio sink used for preview. This exposes the
#playsink:audio-sink property of the internal #playsink.
The pipeline's mode. In preview mode (for audio or video, or both)
the pipeline can display the timeline's content to an end user. In
rendering mode the pipeline can encode the timeline's content and
save it to a file.
The timeline used by this pipeline, whose content it will play and
render, or %NULL if the pipeline does not yet have a timeline.
Note that after you set the timeline for the first time, subsequent
calls to change the timeline will fail.
The video filter(s) to apply during playback in preview mode,
immediately before the #GESPipeline:video-sink. This exposes the
#playsink:video-filter property of the internal #playsink.
The video sink used for preview. This exposes the
#playsink:video-sink property of the internal #playsink.
parent class
The various modes a #GESPipeline can be configured to.
Output the #GESPipeline:timeline's
audio to the soundcard
Output the #GESPipeline:timeline's
video to the screen
Output both the #GESPipeline:timeline's
audio and video to the soundcard and screen (default)
Render the #GESPipeline:timeline with
forced decoding (the underlying #encodebin has its
#encodebin:avoid-reencoding property set to %FALSE)
Render the #GESPipeline:timeline,
avoiding decoding/reencoding (the underlying #encodebin has its
#encodebin:avoid-reencoding property set to %TRUE)
This is a legacy format and you should avoid to use it. The formatter
is really not in good shape and is deprecated.
The #GESProject is used to control a set of #GESAsset and is a
#GESAsset with `GES_TYPE_TIMELINE` as @extractable_type itself. That
means that you can extract #GESTimeline from a project as followed:
|[
GESProject *project;
GESTimeline *timeline;
project = ges_project_new ("file:///path/to/a/valid/project/uri");
// Here you can connect to the various signal to get more infos about
// what is happening and recover from errors if possible
...
timeline = ges_asset_extract (GES_ASSET (project));
]|
The #GESProject class offers a higher level API to handle #GESAsset-s.
It lets you request new asset, and it informs you about new assets through
a set of signals. Also it handles problem such as missing files/missing
#GstElement and lets you try to recover from those.
## Subprojects
In order to add a subproject, the only thing to do is to add the subproject
to the main project:
``` c
ges_project_add_asset (project, GES_ASSET (subproject));
```
then the subproject will be serialized in the project files. To use
the subproject in a timeline, you should use a #GESUriClip with the
same subproject URI.
When loading a project with subproject, subprojects URIs will be temporary
writable local files. If you want to edit the subproject timeline,
you should retrieve the subproject from the parent project asset list and
extract the timeline with ges_asset_extract() and save it at
the same temporary location.
Creates a new #GESProject and sets its uri to @uri if provided. Note that
if @uri is not valid or %NULL, the uri of the project will then be set
the first time you save the project. If you then save the project to
other locations, it will never be updated again and the first valid URI is
the URI it will keep refering to.
A newly created #GESProject
The uri to be set after creating the project.
Adds a #GESAsset to @project, the project will keep a reference on
@asset.
%TRUE if the asset could be added %FALSE it was already
in the project
A #GESProject
A #GESAsset to add to @project
Adds @profile to the project. It lets you save in what format
the project has been renders and keep a reference to those formats.
Also, those formats will be saves to the project file when possible.
%TRUE if @profile could be added, %FALSE otherwize
A #GESProject
A #GstEncodingProfile to add to the project. If a profile with
the same name already exists, it will be replaced
Adds a formatter as used to load @project
The project to add a formatter to
A formatter used by @project
Create and add a #GESAsset to @project. You should connect to the
"asset-added" signal to get the asset when it finally gets added to
@project
%TRUE if the asset started to be added %FALSE it was already
in the project
A #GESProject
The id of the asset to create and add to @project
The #GType of the asset to create
Create and add a #GESAsset to @project. You should connect to the
"asset-added" signal to get the asset when it finally gets added to
@project
The newly created #GESAsset or %NULL.
A #GESProject
The id of the asset to create and add to @project
The #GType of the asset to create
The #GESAsset with
@id or %NULL if no asset with @id as an ID
A #GESProject
The id of the asset to retrieve
The extractable_type of the asset
to retrieve from @object
Get the assets that are being loaded
A set of loading asset
that will be added to @project. Note that those Asset are *not* loaded yet,
and thus can not be used
A #GESProject
Retrieve the uri that is currently set on @project
a newly allocated string representing uri.
A #GESProject
List all @asset contained in @project filtering per extractable_type
as defined by @filter. It copies the asset and thus will not be updated
in time.
The list of
#GESAsset the object contains
A #GESProject
Type of assets to list, `GES_TYPE_EXTRACTABLE` will list
all assets
Lists the encoding profile that have been set to @project. The first one
is the latest added.
The
list of #GstEncodingProfile used in @project
A #GESProject
Loads @project into @timeline
%TRUE if the project could be loaded %FALSE otherwize.
A #GESProject that has an @uri set already
A blank timeline to load @project into
remove a @asset to from @project.
%TRUE if the asset could be removed %FALSE otherwise
A #GESProject
A #GESAsset to remove from @project
Save the timeline of @project to @uri. You should make sure that @timeline
is one of the timelines that have been extracted from @project
(using ges_asset_extract (@project);)
%TRUE if the project could be save, %FALSE otherwize
A #GESProject to save
The #GESTimeline to save, it must have been extracted from @project
The uri where to save @project and @timeline
The formatter asset to use or %NULL. If %NULL,
will try to save in the same format as the one from which the timeline as been loaded
or default to the best formatter as defined in #ges_find_formatter_for_uri
%TRUE to overwrite file if it exists
The #GESAsset that has been added to @project
The #GESAsset that started loading
The #GESAsset that has been removed from @project
The timeline that failed loading
The #GError defining the error that occured
Informs you that a #GESAsset could not be created. In case of
missing GStreamer plugins, the error will be set to #GST_CORE_ERROR
#GST_CORE_ERROR_MISSING_PLUGIN
The #GError defining the error that occured, might be %NULL
The @id of the asset that failed loading
The @extractable_type of the asset that
failed loading
The #GESTimeline that completed loading
The #GESTimeline that started loading
|[
static gchar
source_moved_cb (GESProject *project, GError *error, GESAsset *asset_with_error)
{
return g_strdup ("file:///the/new/uri.ogg");
}
static int
main (int argc, gchar ** argv)
{
GESTimeline *timeline;
GESProject *project = ges_project_new ("file:///some/uri.xges");
g_signal_connect (project, "missing-uri", source_moved_cb, NULL);
timeline = ges_asset_extract (GES_ASSET (project));
}
]|
The new URI of @wrong_asset
The error that happened
The asset with the wrong ID, you should us it and its content
only to find out what the new location is.
Base class for single-media sources
#GESSourceClip-s are clips whose core elements are #GESSource-s.
## Effects
#GESSourceClip-s can also have #GESBaseEffect-s added as non-core
elements. These effects are applied to the core sources of the clip
that they share a #GESTrack with. See #GESClip for how to add and move
these effects from the clip.
The #GESTimelineElement:duration of @obj.
A #GESTimelineElement
The end position of @obj: #GESTimelineElement:start +
#GESTimelineElement:duration.
A #GESTimelineElement
The #GESTimelineElement:in-point of @obj.
A #GESTimelineElement
See #ges_timeline_element_get_layer_priority.
The object to retrieve the layer priority from
The #GESTimelineElement:max-duration of @obj.
A #GESTimelineElement
The #GESTimelineElement:name of @obj.
A #GESTimelineElement
Layer priority when a timeline element is not in any layer.
The #GESTimelineElement:parent of @obj.
A #GESTimelineElement
The #GESTimelineElement:priority of @obj.
A #GESTimelineElement
The #GESTimelineElement:start of @obj.
A #GESTimelineElement
The #GESTimelineElement:timeline of @obj.
A #GESTimelineElement
What the default #GESTrackElement:has-internal-source value should be
for new elements from this class.
A #GESTrackElementClass
Useful for testing purposes.
## Asset
The default asset ID is GESTestClip, but the framerate and video
size can be overriden using an ID of the form:
```
framerate=60/1, width=1920, height=1080, max-duration=5.0
```
Note: `max-duration` can be provided in seconds as float, or as GstClockTime
as guint64 or gint.
Creates a new #GESTestClip.
The newly created #GESTestClip,
or %NULL if there was an error.
Creates a new #GESTestClip for the provided @nick.
The newly created #GESTestClip,
or %NULL if there was an error.
the nickname for which to create the #GESTestClip
Get the frequency @self generates.
The frequency @self generates. See audiotestsrc element.
a #GESTestClip
Get the volume of the test audio signal applied on @self.
The volume of the test audio signal applied on @self.
a #GESTestClip
Get the #GESVideoTestPattern which is applied on @self.
The #GESVideoTestPattern which is applied on @self.
a #GESTestClip
Let you know if the audio track of @self is muted or not.
Whether the audio track of @self is muted or not.
a #GESTestClip
Sets the frequency to generate. See audiotestsrc element.
the #GESTestClip to set the frequency on
the frequency you want to use on @self
Sets whether the audio track of this clip is muted or not.
the #GESTestClip on which to mute or unmute the audio track
%TRUE to mute the audio track, %FALSE to unmute it
Sets the volume of the test audio signal.
the #GESTestClip to set the volume on
the volume of the audio signal you want to use on @self
Sets which video pattern to display on @self.
the #GESTestClip to set the pattern on
the #GESVideoTestPattern to use on @self
The frequency to generate for audio track elements.
Whether the sound will be played or not.
The volume for the audio track elements.
Video pattern to display in video track elements.
Horizontal alignment of the text.
align text left
align text center
align text right
align text on xpos position
Creates a new #GESTextOverlay.
This should never be called by applications as this will
be created by clips.
The newly created #GESTextOverlay or
%NULL if something went wrong.
Get the color used by @source.
The color used by @source.
a GESTextOverlay
Get the pango font description currently set on @source.
The pango font description currently set on @source.
a GESTextOverlay
Get the horizontal aligment used by @source.
The horizontal aligment used by @source.
a GESTextOverlay
Get the text currently set on @source.
The text currently set on @source.
a GESTextOverlay
Get the vertical aligment used by @source.
The vertical aligment used by @source.
a GESTextOverlay
Get the horizontal position used by @source.
The horizontal position used by @source.
a GESTextOverlay
Get the vertical position used by @source.
The vertical position used by @source.
a GESTextOverlay
Sets the color of the text.
the #GESTextOverlay* to set
The color @self is being set to
Sets the pango font description of the text this track element
will render.
the #GESTextOverlay
the pango font description
Sets the horizontal aligment of the text.
the #GESTextOverlay* to set text on
The #GESTextHAlign defining the horizontal alignment
of the text render by @self.
Sets the text this track element will render.
the #GESTextOverlay* to set text on
the text to render. an internal copy of this text will be
made.
Sets the vertical aligment of the text.
the #GESTextOverlay* to set text on
The #GESTextVAlign defining the vertical alignment
of the text render by @self.
Sets the horizontal position of the text.
the #GESTextOverlay* to set
The horizontal position @self is being set to
Sets the vertical position of the text.
the #GESTextOverlay* to set
The vertical position @self is being set to
Renders text onto the next lower priority stream using textrender.
Creates a new #GESTextOverlayClip
The newly created
#GESTextOverlayClip, or %NULL if there was an error.
Get the color used by @source.
The color used by @source.
a #GESTextOverlayClip
Get the pango font description used by @self.
The pango font description used by @self.
a #GESTextOverlayClip
Get the horizontal aligment used by @self.
The horizontal aligment used by @self.
a #GESTextOverlayClip
Get the text currently set on @self.
The text currently set on @self.
a #GESTextOverlayClip
Get the vertical aligment used by @self.
The vertical aligment used by @self.
a #GESTextOverlayClip
Get the horizontal position used by @source.
The horizontal position used by @source.
a #GESTextOverlayClip
Get the vertical position used by @source.
The vertical position used by @source.
a #GESTextOverlayClip
Sets the color of the text.
the #GESTextOverlayClip* to set
The color @self is being set to
Sets the pango font description of the text
the #GESTextOverlayClip*
the pango font description
Sets the horizontal aligment of the text.
the #GESTextOverlayClip* to set horizontal alignement of text on
#GESTextHAlign
Sets the text this clip will render.
the #GESTextOverlayClip* to set text on
the text to render. an internal copy of this text will be
made.
Sets the vertical aligment of the text.
the #GESTextOverlayClip* to set vertical alignement of text on
#GESTextVAlign
Sets the horizontal position of the text.
the #GESTextOverlayClip* to set
The horizontal position @self is being set to
Sets the vertical position of the text.
the #GESTextOverlayClip* to set
The vertical position @self is being set to
The color of the text
Pango font description string
Horizontal alignment of the text
The text to diplay
Vertical alignent of the text
The horizontal position of the text
The vertical position of the text
Vertical alignment of the text.
draw text on the baseline
draw text on the bottom
draw text on top
draw text on ypos position
draw text on the center
#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().
## 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.
## Editing
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 timeline 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.
## 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.
Creates a new empty timeline.
The new timeline.
Creates a new timeline containing a single #GESAudioTrack and a
single #GESVideoTrack.
The new timeline, or %NULL if the tracks
could not be created and added.
Creates a timeline from the given URI.
A new timeline if the uri was loaded
successfully, or %NULL if the uri could not be loaded.
The URI to load from
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.
This method requires you to ensure the layer's
#GESLayer:priority will be unique to the timeline. Use
ges_timeline_append_layer() and ges_timeline_move_layer() instead.
%TRUE if @layer was properly added.
The #GESTimeline
The layer to add
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.
%TRUE if @track was properly added.
The #GESTimeline
The track to add
Append a newly created layer to the timeline. The layer will
be added at the lowest #GESLayer:priority (numerically, the highest).
The newly created layer.
The #GESTimeline
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.
%TRUE if pending changes were committed, or %FALSE if nothing
needed to be committed.
A #GESTimeline
Commit all the pending changes of the clips contained in the
timeline and wait for the changes to complete.
See ges_timeline_commit().
%TRUE if pending changes were committed, or %FALSE if nothing
needed to be committed.
A #GESTimeline
Gets #GESTimeline:auto-transition for the timeline.
The auto-transition of @self.
The #GESTimeline
Get the current #GESTimeline:duration of the timeline
The current duration of @timeline.
The #GESTimeline
Gets the element contained in the timeline with the given name.
The timeline element in @timeline
with the given @name, or %NULL if it was not found.
The #GESTimeline
The name of the element to find
This method allows you to convert a timeline #GstClockTime into its
corresponding #GESFrameNumber in the timeline's output.
The frame number @timestamp corresponds to.
A #GESTimeline
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 timestamp corresponding to @frame_number in the output of @self.
The self on which to retrieve the timestamp for @frame_number
The frame number to get the corresponding timestamp of in the
timeline coordinates
Get the list of #GESGroup-s present in the timeline.
The list of
groups that contain clips present in @timeline's layers.
Must not be changed.
The #GESTimeline
Retrieve the layer whose index in the timeline matches the given
priority.
The layer with the given
@priority, or %NULL if none was found.
Since 1.6
The #GESTimeline to retrieve a layer from
The priority/index of the layer to find
Get the list of #GESLayer-s present in the timeline.
The list of
layers present in @timeline sorted by priority.
The #GESTimeline
Search for the #GstPad corresponding to the given timeline's track.
You can link to this pad to receive the output data of the given track.
The pad corresponding to @track,
or %NULL if there is an error.
The #GESTimeline
A track
Gets the #GESTimeline:snapping-distance for the timeline.
The snapping distance (in nanoseconds) of @timeline.
The #GESTimeline
Search for the #GESTrack corresponding to the given timeline's pad.
The track corresponding to @pad,
or %NULL if there is an error.
The #GESTimeline
A pad
Get the list of #GESTrack-s used by the timeline.
The list of tracks
used by @timeline.
The #GESTimeline
Check whether the timeline is empty or not.
%TRUE if @timeline is empty.
The #GESTimeline
Loads the contents of URI into the timeline.
%TRUE if the timeline was loaded successfully from @uri.
An empty #GESTimeline into which to load the formatter
The URI to load from
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 #GESTimeline
A layer within @timeline, whose priority should be changed
The new index for @layer
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 newly created element, or
%NULL if pasting fails.
The #GESTimeline onto which @element should be pasted
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
Removes a layer from the timeline.
%TRUE if @layer was properly removed.
The #GESTimeline
The layer to remove
Remove a track from the timeline.
%TRUE if @track was properly removed.
The #GESTimeline
The track to remove
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.
%TRUE if @timeline was successfully saved to @uri.
The #GESTimeline
The location to save to
The formatter asset to use, or %NULL
%TRUE to overwrite file if it exists
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.
The #GESTimeline
Whether transitions should be automatically added
to @timeline's layers
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 #GESTimeline
The snapping distance to use (in nanoseconds)
Whether to automatically create a transition whenever two clips
overlap in the timeline. See #GESLayer:auto-transition.
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.
The distance (in nanoseconds) at which a #GESTimelineElement being
moved within the timeline should snap to its neighbours. Note that
such a neighbour includes any element in the timeline, including
across separate layers. 0 means no snapping.
A list of #GESLayer-s sorted by
priority. NOTE: Do not modify.
Deprecated:1.10: (element-type GES.Track): This is not thread
safe, use #ges_timeline_get_tracks instead.
This signal will be emitted once the changes initiated by
ges_timeline_commit() have been executed in the backend. Use
ges_timeline_commit_sync() if you do not want to have to connect
to this signal.
Will be emitted after the group is added to to the timeline. This can
happen when grouping with `ges_container_group`, or by adding
containers to a newly created group.
Note that this should not be emitted whilst a timeline is being
loaded from its #GESProject asset. You should connect to the
project's #GESProject::loaded signal if you want to know which groups
were created for the timeline.
The group that was added to @timeline
Will be emitted after the group is removed from the timeline through
`ges_container_ungroup`. Note that @group will no longer contain its
former children, these are held in @children.
Note that if a group is emptied, then it will no longer belong to the
timeline, but this signal will **not** be emitted in such a case.
The group that was removed from @timeline
A list
of #GESContainer-s that _were_ the children of the removed @group
Will be emitted after the layer is added to the timeline.
Note that this should not be emitted whilst a timeline is being
loaded from its #GESProject asset. You should connect to the
project's #GESProject::loaded signal if you want to know which
layers were created for the timeline.
The layer that was added to @timeline
Will be emitted after the layer is removed from the timeline.
The layer that was removed from @timeline
This will be emitted whenever the timeline needs to determine which
tracks a clip's children should be added to. The track element will
be added to each of the tracks given in the return. If a track
element is selected to go into multiple tracks, it will be copied
into the additional tracks, under the same clip. Note that the copy
will *not* keep its properties or state in sync with the original.
Connect to this signal once if you wish to control which element
should be added to which track. Doing so will overwrite the default
behaviour, which adds @track_element to all tracks whose
#GESTrack:track-type includes the @track_element's
#GESTrackElement:track-type.
Note that under the default track selection, if a clip would produce
multiple core children of the same #GESTrackType, it will choose
one of the core children arbitrarily to place in the corresponding
tracks, with a warning for the other core children that are not
placed in the track. For example, this would happen for a #GESUriClip
that points to a file that contains multiple audio streams. If you
wish to choose the stream, you could connect to this signal, and use,
say, ges_uri_source_asset_get_stream_info() to choose which core
source to add.
When a clip is first added to a timeline, its core elements will
be created for the current tracks in the timeline if they have not
already been created. Then this will be emitted for each of these
core children to select which tracks, if any, they should be added
to. It will then be called for any non-core children in the clip.
In addition, if a new track element is ever added to a clip in a
timeline (and it is not already part of a track) this will be emitted
to select which tracks the element should be added to.
Finally, as a special case, if a track is added to the timeline
*after* it already contains clips, then it will request the creation
of the clips' core elements of the corresponding type, if they have
not already been created, and this signal will be emitted for each of
these newly created elements. In addition, this will also be released
for all other track elements in the timeline's clips that have not
yet been assigned a track. However, in this final case, the timeline
will only check whether the newly added track appears in the track
list. If it does appear, the track element will be added to the newly
added track. All other tracks in the returned track list are ignored.
In this latter case, track elements that are already part of a track
will not be asked if they want to be copied into the new track. If
you wish to do this, you can use ges_clip_add_child_to_track().
Note that the returned #GPtrArray should own a new reference to each
of its contained #GESTrack. The timeline will set the #GDestroyNotify
free function on the #GPtrArray to dereference the elements.
An array of
#GESTrack-s that @track_element should be added to, or %NULL to
not add the element to any track.
The clip that @track_element is being added to
The element being added
Will be emitted whenever a snapping event ends. After a snap event
has started (see #GESTimeline::snapping-started), it can end because
the element whose movement created the snap event has since moved
outside of the #GESTimeline:snapping-distance before its position was
committed. It can also end because the element's movement was ended
by a timeline being committed.
The first element that was snapping
The second element that was snapping
The position where the two objects were to be snapped to
Will be emitted whenever an element's movement invokes a snapping
event (usually by its controlling #GESClip being moved) because its
start or end point lies within the #GESTimeline:snapping-distance of
another element's start or end point.
The first element that is snapping
The second element that is snapping
The position where the two objects will snap to
Will be emitted after the track is added to the timeline.
Note that this should not be emitted whilst a timeline is being
loaded from its #GESProject asset. You should connect to the
project's #GESProject::loaded signal if you want to know which
tracks were created for the timeline.
The track that was added to @timeline
Will be emitted after the track is removed from the timeline.
The track that was removed from @timeline
parent class
A #GESTimelineElement will have some temporal extent in its
corresponding #GESTimelineElement:timeline, controlled by its
#GESTimelineElement:start and #GESTimelineElement:duration. This
determines when its content will be displayed, or its effect applied,
in the timeline. Several objects may overlap within a given
#GESTimeline, in which case their #GESTimelineElement:priority is used
to determine their ordering in the timeline. Priority is mostly handled
internally by #GESLayer-s and #GESClip-s.
A timeline element can have a #GESTimelineElement:parent,
such as a #GESClip, which is responsible for controlling its timing.
## Editing
Elements can be moved around in their #GESTimelineElement:timeline by
setting their #GESTimelineElement:start and
#GESTimelineElement:duration using ges_timeline_element_set_start()
and ges_timeline_element_set_duration(). Additionally, which parts of
the underlying content are played in the timeline can be adjusted by
setting the #GESTimelineElement:in-point using
ges_timeline_element_set_inpoint(). The library also provides
ges_timeline_element_edit(), with various #GESEditMode-s, which can
adjust these properties in a convenient way, as well as introduce
similar changes in neighbouring or later elements in the timeline.
However, a timeline may refuse a change in these properties if they
would place the timeline in an unsupported configuration. For example,
it is not possible for three #GESSourceClip-s in the same layer and
with the same track types to overlap at any given position in the
timeline (only two may overlap, which corresponds to a single
#GESTransition). Similarly, a #GESSourceClip may not entirely cover
another #GESSourceClip in the same layer and with the same track types.
Additionally, an edit may be refused if it would place one of the
timing properties out of bounds (such as a negative time value for
#GESTimelineElement:start, or having insufficient internal
content to last for the desired #GESTimelineElement:duration).
## Children Properties
If a timeline element owns another #GstObject and wishes to expose
some of its properties, it can do so by registering the property as one
of the timeline element's children properties using
ges_timeline_element_add_child_property(). The registered property of
the child can then be read and set using the
ges_timeline_element_get_child_property() and
ges_timeline_element_set_child_property() methods, respectively. Some
sub-classed objects will be created with pre-registered children
properties; for example, to expose part of an underlying #GstElement
that is used internally. The registered properties can be listed with
ges_timeline_element_list_children_properties().
Gets the priority of the layer the element is in. A #GESGroup 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.
A #GESTimelineElement
Get the "natural" framerate of @self. This is to say, for example
for a #GESVideoUriSource the framerate of the source.
Note that a #GESAudioSource may also have a natural framerate if it derives
from the same #GESSourceClip asset as a #GESVideoSource, and its value will
be that of the video source. For example, if the uri of a #GESUriClip points
to a file that contains both a video and audio stream, then the corresponding
#GESAudioUriSource will share the natural framerate of the corresponding
#GESVideoUriSource.
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.
The #GESTimelineElement to get "natural" framerate from
The framerate numerator
The framerate denominator
Gets the track types that the element can interact with, i.e. the type
of #GESTrack it can exist in, or will create #GESTrackElement-s for.
The track types that @self supports.
A #GESTimelineElement
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.
%TRUE if a child corresponding to the property was found, in
which case @child and @pspec are set.
A #GESTimelineElement
The name of a child property
The return location for the
found child
The return location for the
specification of the child property
Edits the start time of an element within its timeline in ripple mode.
The element is shifted to @start, and later elements are also shifted
by the same amount (see #GES_EDIT_MODE_RIPPLE). An edit may fail if it
would place the timeline in an unsupported configuration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the start time may be set
to the edge of some element in the neighbourhood of @start.
%TRUE if the ripple edit of @self completed, %FALSE on
failure.
The #GESTimelineElement to ripple
The new start time of @self in ripple mode
Edits the end time of an element within its timeline in ripple mode.
The element's duration time is shifted until its end time matches @end,
and later elements have their start time shifted by the same amount
(see #GES_EDIT_MODE_RIPPLE). An edit may fail if it would place the
duration time out of bounds, or if it would place the timeline in an
unsupported configuration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the end time may be set
to the edge of some element in the neighbourhood of @end.
%TRUE if the ripple edit of @self completed, %FALSE on
failure.
The #GESTimelineElement to ripple
The new end time of @self in ripple mode
Edits the end time of an element within its timeline in roll mode.
The end of the element is trimmed to @end, and any other element whose
start edge matched the end edge of the element is also trimmed to @end
(see #GES_EDIT_MODE_ROLL). An edit may fail if it would place an
in-point time or duration time out of bounds, or if it would place the
timeline in an unsupported configuration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the end time may be set
to the edge of some element in the neighbourhood of @end.
%TRUE if the roll edit of @self completed, %FALSE on failure.
The #GESTimelineElement to roll
The new end time of @self in roll mode
Edits the start time of an element within its timeline in roll mode.
The element is trimmed to @start, and any other element whose end edge
matched the start edge of the element is also trimmed to @start (see
#GES_EDIT_MODE_ROLL). An edit may fail if it would place an in-point
time or duration time out of bounds, or if it would place the timeline
in an unsupported configuration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the start time may be set
to the edge of some element in the neighbourhood of @start.
%TRUE if the roll edit of @self completed, %FALSE on failure.
The #GESTimelineElement to roll
The new start time of @self in roll mode
Sets #GESTimelineElement:duration for the element. This may fail if it
would place the timeline in an unsupported configuration, or if the
element does not have enough internal content to last for the desired
@duration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the element's
#GESTimelineElement:duration may instead be adjusted around @duration
such that the edge of @self matches the edge of some other element in
the neighbourhood. In such a case, the return value will still be %TRUE
on success.
%TRUE if @duration could be set for @self.
A #GESTimelineElement
The desired duration in its timeline
Sets #GESTimelineElement:in-point for the element. If the new in-point
is above the current #GESTimelineElement:max-duration of the element,
this method will fail.
%TRUE if @inpoint could be set for @self.
A #GESTimelineElement
The in-point, in internal time coordinates
Sets #GESTimelineElement:max-duration for the element. If the new
maximum duration is below the current #GESTimelineElement:in-point of
the element, this method will fail.
%TRUE if @maxduration could be set for @self.
A #GESTimelineElement
The maximum duration, in internal time coordinates
Sets the #GESTimelineElement:parent for the element.
This is used internally and you should normally not call this. A
#GESContainer will set the #GESTimelineElement: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.
A #GESTimelineElement
@parent (nullable): New parent of @self
Sets the priority of the element within the containing layer.
All priority management is done by GES itself now.
To set #GESEffect priorities #ges_clip_set_top_effect_index should
be used.
%TRUE if @priority could be set for @self.
A #GESTimelineElement
The priority
Sets #GESTimelineElement:start for the element. This may fail if it
would place the timeline in an unsupported configuration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the element's
#GESTimelineElement:start may instead be set to the edge of some other
element in the neighbourhood of @start. In such a case, the return
value will still be %TRUE on success.
%TRUE if @start could be set for @self.
A #GESTimelineElement
The desired start position of the element in its timeline
Edits the start time of an element within its timeline in trim mode.
The element is shifted to @start, and its in-point time is similarly
shifted to ensure that its internal content will appear at the same
timeline time when it is played (see #GES_EDIT_MODE_TRIM). An edit may
fail if it would place the in-point time out of bounds, or if it would
place the timeline in an unsupported configuration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the start time may be set
to the edge of some element in the neighbourhood of @start.
%TRUE if the trim edit of @self completed, %FALSE on failure.
The #GESTimelineElement to trim
The new start time of @self in trim mode
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 #GESTimelineElement::deep-notify signal.
@pspec should be unique from other children properties that have been
registered on @self.
%TRUE if the property was successfully registered.
A #GESTimelineElement
The specification for the property to add
The #GstObject who the property belongs to
Create a copy of @self. All the properties of @self are copied into
a new element, with the exception of #GESTimelineElement:parent,
#GESTimelineElement:timeline and #GESTimelineElement:name. Other data,
such the list of a #GESContainer'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 #GESContainer, 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.
The newly create element,
copied from @self.
The #GESTimelineElement to copy
Whether the copy is needed for pasting
Edits the element within its timeline by adjusting its
#GESTimelineElement:start, #GESTimelineElement:duration or
#GESTimelineElement:in-point, and potentially doing the same for
other elements in the timeline. See #GESEditMode 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 the element's timeline has a
#GESTimeline:snapping-distance set, then the edit position may be set
to the edge of some element in the neighbourhood of @position.
@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.
@layers can be used as a whitelist to limit changes to elements that
exist in the corresponding layers. If you intend to also switch
elements between layers, then you must ensure that all the involved
layers are included for the switch to succeed (with the exception of
layers may be newly created).
%TRUE if the edit of @self completed, %FALSE on failure.
The #GESTimelineElement to edit
A whitelist of layers
where the edit can be performed, %NULL allows all layers in 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)
Gets several of the children properties of the element. See
ges_timeline_element_get_child_property().
A #GESTimelineElement
The name of the first child property to get
The return location for the first property, followed
optionally by more name/return location pairs, followed by %NULL
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.
%TRUE if the property was found and copied to @value.
A #GESTimelineElement
The name of the child property to get
The return location for the value
Gets the property of a child of the element. Specifically, the property
corresponding to the @pspec used in
ges_timeline_element_add_child_property() is copied into @value.
A #GESTimelineElement
The specification of a registered child property to get
The return location for the value
Gets several of the children properties of the element. See
ges_timeline_element_get_child_property().
A #GESTimelineElement
The name of the first child property to get
The return location for the first property, followed
optionally by more name/return location pairs, followed by %NULL
Gets the #GESTimelineElement:duration for the element.
The duration of @self (in nanoseconds).
A #GESTimelineElement
Gets the #GESTimelineElement:in-point for the element.
The in-point of @self (in nanoseconds).
A #GESTimelineElement
Gets the priority of the layer the element is in. A #GESGroup 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.
A #GESTimelineElement
Gets the #GESTimelineElement:max-duration for the element.
The max-duration of @self (in nanoseconds).
A #GESTimelineElement
Gets the #GESTimelineElement:name for the element.
The name of @self.
A #GESTimelineElement
Get the "natural" framerate of @self. This is to say, for example
for a #GESVideoUriSource the framerate of the source.
Note that a #GESAudioSource may also have a natural framerate if it derives
from the same #GESSourceClip asset as a #GESVideoSource, and its value will
be that of the video source. For example, if the uri of a #GESUriClip points
to a file that contains both a video and audio stream, then the corresponding
#GESAudioUriSource will share the natural framerate of the corresponding
#GESVideoUriSource.
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.
The #GESTimelineElement to get "natural" framerate from
The framerate numerator
The framerate denominator
Gets the #GESTimelineElement:parent for the element.
The parent of @self, or %NULL if
@self has no parent.
A #GESTimelineElement
Gets the #GESTimelineElement:priority for the element.
The priority of @self.
A #GESTimelineElement
Gets the #GESTimelineElement:start for the element.
The start of @self (in nanoseconds).
A #GESTimelineElement
Gets the #GESTimelineElement:timeline for the element.
The timeline of @self, or %NULL
if @self has no timeline.
A #GESTimelineElement
Gets the toplevel #GESTimelineElement:parent of the element.
The toplevel parent of @self.
The #GESTimelineElement to get the toplevel parent from
Gets the track types that the element can interact with, i.e. the type
of #GESTrack it can exist in, or will create #GESTrackElement-s for.
The track types that @self supports.
A #GESTimelineElement
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
#GParamSpec corresponding to the child properties of @self, or %NULL if
something went wrong.
A #GESTimelineElement
The return location for the length of the
returned array
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.
%TRUE if a child corresponding to the property was found, in
which case @child and @pspec are set.
A #GESTimelineElement
The name of a child property
The return location for the
found child
The return location for the
specification of the child property
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 newly created element, or
%NULL if pasting fails.
The #GESTimelineElement to paste
The position in the timeline @element should be pasted
to, i.e. the #GESTimelineElement:start value for the pasted element.
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.
A #GESTimelineElement
The specification for the property to remove
Edits the start time of an element within its timeline in ripple mode.
The element is shifted to @start, and later elements are also shifted
by the same amount (see #GES_EDIT_MODE_RIPPLE). An edit may fail if it
would place the timeline in an unsupported configuration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the start time may be set
to the edge of some element in the neighbourhood of @start.
%TRUE if the ripple edit of @self completed, %FALSE on
failure.
The #GESTimelineElement to ripple
The new start time of @self in ripple mode
Edits the end time of an element within its timeline in ripple mode.
The element's duration time is shifted until its end time matches @end,
and later elements have their start time shifted by the same amount
(see #GES_EDIT_MODE_RIPPLE). An edit may fail if it would place the
duration time out of bounds, or if it would place the timeline in an
unsupported configuration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the end time may be set
to the edge of some element in the neighbourhood of @end.
%TRUE if the ripple edit of @self completed, %FALSE on
failure.
The #GESTimelineElement to ripple
The new end time of @self in ripple mode
Edits the end time of an element within its timeline in roll mode.
The end of the element is trimmed to @end, and any other element whose
start edge matched the end edge of the element is also trimmed to @end
(see #GES_EDIT_MODE_ROLL). An edit may fail if it would place an
in-point time or duration time out of bounds, or if it would place the
timeline in an unsupported configuration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the end time may be set
to the edge of some element in the neighbourhood of @end.
%TRUE if the roll edit of @self completed, %FALSE on failure.
The #GESTimelineElement to roll
The new end time of @self in roll mode
Edits the start time of an element within its timeline in roll mode.
The element is trimmed to @start, and any other element whose end edge
matched the start edge of the element is also trimmed to @start (see
#GES_EDIT_MODE_ROLL). An edit may fail if it would place an in-point
time or duration time out of bounds, or if it would place the timeline
in an unsupported configuration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the start time may be set
to the edge of some element in the neighbourhood of @start.
%TRUE if the roll edit of @self completed, %FALSE on failure.
The #GESTimelineElement to roll
The new start time of @self in roll mode
Sets several of the children properties of the element. See
ges_timeline_element_set_child_property().
A #GESTimelineElement
The name of the first child property to set
The value for the first property, followed optionally by more
name/value pairs, followed by %NULL
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!
Note that ges_timeline_element_set_child_properties() may be more
convenient for C programming.
%TRUE if the property was found and set.
A #GESTimelineElement
The name of the child property to set
The value to set the property to
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.
A #GESTimelineElement
The specification of a registered child property to set
The value to set the property to
Sets several of the children properties of the element. See
ges_timeline_element_set_child_property().
A #GESTimelineElement
The name of the first child property to set
The value for the first property, followed optionally by more
name/value pairs, followed by %NULL
Sets #GESTimelineElement:duration for the element. This may fail if it
would place the timeline in an unsupported configuration, or if the
element does not have enough internal content to last for the desired
@duration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the element's
#GESTimelineElement:duration may instead be adjusted around @duration
such that the edge of @self matches the edge of some other element in
the neighbourhood. In such a case, the return value will still be %TRUE
on success.
%TRUE if @duration could be set for @self.
A #GESTimelineElement
The desired duration in its timeline
Sets #GESTimelineElement:in-point for the element. If the new in-point
is above the current #GESTimelineElement:max-duration of the element,
this method will fail.
%TRUE if @inpoint could be set for @self.
A #GESTimelineElement
The in-point, in internal time coordinates
Sets #GESTimelineElement:max-duration for the element. If the new
maximum duration is below the current #GESTimelineElement:in-point of
the element, this method will fail.
%TRUE if @maxduration could be set for @self.
A #GESTimelineElement
The maximum duration, in internal time coordinates
Sets the #GESTimelineElement: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
#GESUriClip, and will set that name instead.
If @self already has a #GESTimelineElement:timeline, you should not
call this function with @name set to %NULL.
You should ensure that, within each #GESTimeline, 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.
%TRUE if @name or a generated name for @self could be set.
A #GESTimelineElement
The name @self should take
Sets the #GESTimelineElement:parent for the element.
This is used internally and you should normally not call this. A
#GESContainer will set the #GESTimelineElement: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.
A #GESTimelineElement
@parent (nullable): New parent of @self
Sets the priority of the element within the containing layer.
All priority management is done by GES itself now.
To set #GESEffect priorities #ges_clip_set_top_effect_index should
be used.
%TRUE if @priority could be set for @self.
A #GESTimelineElement
The priority
Sets #GESTimelineElement:start for the element. This may fail if it
would place the timeline in an unsupported configuration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the element's
#GESTimelineElement:start may instead be set to the edge of some other
element in the neighbourhood of @start. In such a case, the return
value will still be %TRUE on success.
%TRUE if @start could be set for @self.
A #GESTimelineElement
The desired start position of the element in its timeline
Sets the #GESTimelineElement:timeline of the element.
This is used internally and you should normally not call this. A
#GESClip will have its #GESTimelineElement:timeline set through its
#GESLayer. A #GESTrack will similarly take care of setting the
#GESTimelineElement:timeline of its #GESTrackElement-s. A #GESGroup
will adopt the same #GESTimelineElement:timeline as its children.
If @timeline is %NULL, this will stop its current
#GESTimelineElement: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.
A #GESTimelineElement
@timeline (nullable): The #GESTimeline @self should be in
Edits the start time of an element within its timeline in trim mode.
The element is shifted to @start, and its in-point time is similarly
shifted to ensure that its internal content will appear at the same
timeline time when it is played (see #GES_EDIT_MODE_TRIM). An edit may
fail if it would place the in-point time out of bounds, or if it would
place the timeline in an unsupported configuration.
Note that if the element's timeline has a
#GESTimeline:snapping-distance set, then the start time may be set
to the edge of some element in the neighbourhood of @start.
%TRUE if the trim edit of @self completed, %FALSE on failure.
The #GESTimelineElement to trim
The new start time of @self in trim mode
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 initial offset to use internally when outputting content (in
nanoseconds, but in the time coordinates of the internal content).
For example, for a #GESVideoUriSource 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 #GESTimelineElement:start, it will begin outputting the
data from the timestamp in-point **onwards**, until it reaches the
end of its #GESTimelineElement: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 #GESTimelineElement:in-point of the
element (which is in the same time coordinates), and will sometimes
be used to limit the #GESTimelineElement:duration of the element in
the timeline.
For example, for a #GESVideoUriSource 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.
The priority of the element.
Priority management is now done by GES itself.
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.
The timeline that the element lies within.
The #GESTimelineElement:parent of the element
The #GESAsset from which the object has been extracted
The #GESTimelineElement:start of the element
The #GESTimelineElement:in-point of the element
The #GESTimelineElement:duration of the element
The #GESTimelineElement:max-duration of the element
The #GESTimelineElement:priority of the element
The #GESTimelineElement:timeline of the element
The #GESTimelineElement:name of the element
Emitted when the element has a new child property registered. See
ges_timeline_element_add_child_property().
Note that some GES elements will be automatically created with
pre-registered children properties. You can use
ges_timeline_element_list_children_properties() to list these.
The child whose property has been registered
The specification for the property that has been registered
Emitted when the element has a child property unregistered. See
ges_timeline_element_remove_child_property().
The child whose property has been unregistered
The specification for the property that has been unregistered
Emitted when a child of the element has one of its registered
properties set. See ges_timeline_element_add_child_property().
Note that unlike #GObject::notify, a child property name can not be
used as a signal detail.
The child whose property has been set
The specification for the property that been set
The #GESTimelineElement base class. Subclasses should override at least
@set_start @set_inpoint @set_duration @ripple @ripple_end @roll_start
@roll_end and @trim.
Vmethods in subclasses should apply all the operation they need to but
the real method implementation is in charge of setting the proper field,
and emitting the notify signal.
%TRUE if @parent could be set for @self.
A #GESTimelineElement
@parent (nullable): New parent of @self
%TRUE if @start could be set for @self.
A #GESTimelineElement
The desired start position of the element in its timeline
%TRUE if @inpoint could be set for @self.
A #GESTimelineElement
The in-point, in internal time coordinates
%TRUE if @duration could be set for @self.
A #GESTimelineElement
The desired duration in its timeline
%TRUE if @maxduration could be set for @self.
A #GESTimelineElement
The maximum duration, in internal time coordinates
%TRUE if @priority could be set for @self.
A #GESTimelineElement
The priority
%TRUE if the ripple edit of @self completed, %FALSE on
failure.
The #GESTimelineElement to ripple
The new start time of @self in ripple mode
%TRUE if the ripple edit of @self completed, %FALSE on
failure.
The #GESTimelineElement to ripple
The new end time of @self in ripple mode
%TRUE if the roll edit of @self completed, %FALSE on failure.
The #GESTimelineElement to roll
The new start time of @self in roll mode
%TRUE if the roll edit of @self completed, %FALSE on failure.
The #GESTimelineElement to roll
The new end time of @self in roll mode
%TRUE if the trim edit of @self completed, %FALSE on failure.
The #GESTimelineElement to trim
The new start time of @self in trim mode
%TRUE if a child corresponding to the property was found, in
which case @child and @pspec are set.
A #GESTimelineElement
The name of a child property
The return location for the
found child
The return location for the
specification of the child property
The track types that @self supports.
A #GESTimelineElement
The priority of the layer @self is in, or
#GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY if @self does not exist in a
layer.
A #GESTimelineElement
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.
The #GESTimelineElement to get "natural" framerate from
The framerate numerator
The framerate denominator
Renders the given text in the specified font, at specified position, and
with the specified background pattern.
Creates a new #GESTitleClip
The newly created #GESTitleClip,
or %NULL if there was an error.
Get the background used by @self.
use #ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
The color used by @self.
a #GESTitleClip
Get the pango font description used by @self.
use #ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
The pango font description used by @self.
a #GESTitleClip
Get the horizontal aligment used by @self.
use #ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
The horizontal aligment used by @self.
a #GESTitleClip
Get the text currently set on @self.
use #ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
The text currently set on @self.
a #GESTitleClip
Get the color used by @self.
use #ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
The color used by @self.
a #GESTitleClip
Get the vertical aligment used by @self.
use #ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
The vertical aligment used by @self.
a #GESTitleClip
Get the horizontal position used by @self.
use #ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
The horizontal position used by @self.
a #GESTitleClip
Get the vertical position used by @self.
use #ges_timeline_element_get_children_property instead
The vertical position used by @self.
a #GESTitleClip
Sets the background of the text.
use #ges_timeline_element_set_children_properties instead.
See #GESTitleSource for more information about exposed properties
the #GESTitleClip* to set
The color @self is being set to
Sets the color of the text.
use #ges_timeline_element_set_children_properties instead.
See #GESTitleSource for more information about exposed properties
the #GESTitleClip* to set
The color @self is being set to
Sets the pango font description of the text.
use #ges_timeline_element_set_children_properties instead.
See #GESTitleSource for more information about exposed properties
the #GESTitleClip*
the pango font description
Sets the horizontal aligment of the text.
use #ges_timeline_element_set_children_properties instead.
See #GESTitleSource for more information about exposed properties
the #GESTitleClip* to set horizontal alignement of text on
#GESTextHAlign
Sets the text this clip will render.
use #ges_timeline_element_set_children_properties instead.
See #GESTitleSource for more information about exposed properties
the #GESTitleClip* to set text on
the text to render. an internal copy of this text will be
made.
Sets the vertical aligment of the text.
use #ges_timeline_element_set_children_properties instead.
See #GESTitleSource for more information about exposed properties
the #GESTitleClip* to set vertical alignement of text on
#GESTextVAlign
Sets the horizontal position of the text.
use #ges_timeline_element_set_children_properties instead.
See #GESTitleSource for more information about exposed properties
the #GESTitleClip* to set
The horizontal position @self is being set to
Sets the vertical position of the text.
use #ges_timeline_element_set_children_properties instead.
See #GESTitleSource for more information about exposed properties
the #GESTitleClip* to set
The vertical position @self is being set to
The background of the text
use #ges_timeline_element_set_children_properties or
#ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
The color of the text
use #ges_timeline_element_set_children_properties or
#ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
Pango font description string
use #ges_timeline_element_set_children_properties or
#ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
Horizontal alignment of the text
use #ges_timeline_element_set_children_properties or
#ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
The text to diplay
use #ges_timeline_element_set_children_properties or
#ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
Vertical alignent of the text
use #ges_timeline_element_set_children_properties or
#ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
The horizontal position of the text
use #ges_timeline_element_set_children_properties or
#ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
The vertical position of the text
use #ges_timeline_element_set_children_properties or
#ges_timeline_element_get_children_properties instead.
See #GESTitleSource for more information about exposed properties
#GESTitleSource is a GESTimelineElement that implements the notion
of titles in GES.
Get the background used by @source.
The background used by @source.
a #GESTitleSource
Get the pango font description used by @source.
Use ges_timeline_element_get_child_property instead
(this actually returns a newly allocated string)
The pango font description used by this
@source.
a #GESTitleSource
Get the horizontal aligment used by @source.
The horizontal aligment used by @source.
a #GESTitleSource
Get the text currently set on the @source.
Use ges_timeline_element_get_child_property instead
(this actually returns a newly allocated string)
The text currently set on the @source.
a #GESTitleSource
Get the color used by @source.
The color used by @source.
a #GESTitleSource
Get the vertical aligment used by @source.
The vertical aligment used by @source.
a #GESTitleSource
Get the horizontal position used by @source.
The horizontal position used by @source.
a #GESTitleSource
Get the vertical position used by @source.
The vertical position used by @source.
a #GESTitleSource
Sets the color of the background
the #GESTitleSource* to set
the color @self is being set to
Set the pango font description this source will use to render
the text.
the #GESTitleSource
the pango font description
Sets the vertical aligment of the text.
the #GESTitleSource* to set text on
#GESTextHAlign
Sets the text this track element will render.
use ges_track_element_get/set_children_properties on the
GESTrackElement instead
the #GESTitleSource* to set text on
the text to render. an internal copy of this text will be
made.
Sets the color of the text.
the #GESTitleSource* to set
the color @self is being set to
Sets the vertical aligment of the text.
the #GESTitleSource* to set text on
#GESTextVAlign
Sets the horizontal position of the text.
the #GESTitleSource* to set
the horizontal position @self is being set to
Sets the vertical position of the text.
the #GESTitleSource* to set
the color @self is being set to
parent class
A #GESTrack acts an output source for a #GESTimeline. Each one
essentially provides an additional #GstPad for the timeline, with
#GESTrack:restriction-caps capabilities. Internally, a track
wraps an #nlecomposition filtered by a #capsfilter.
A track will contain a number of #GESTrackElement-s, and its role is
to select and activate these elements according to their timings when
the timeline in played. For example, a track would activate a
#GESSource when its #GESTimelineElement:start is reached by outputting
its data for its #GESTimelineElement:duration. Similarly, a
#GESOperation would be activated by applying its effect to the source
data, starting from its #GESTimelineElement:start time and lasting for
its #GESTimelineElement:duration.
For most users, it will usually be sufficient to add newly created
tracks to a timeline, but never directly add an element to a track.
Whenever a #GESClip is added to a timeline, the clip adds its
elements to the timeline's tracks and assumes responsibility for
updating them.
Creates a new track with the given track-type and caps.
If @type is #GES_TRACK_TYPE_VIDEO, and @caps is a subset of
"video/x-raw(ANY)", then a #GESVideoTrack is created. This will
automatically choose a gap creation method suitable for video data. You
will likely want to set #GESTrack:restriction-caps separately. You may
prefer to use the ges_video_track_new() method instead.
If @type is #GES_TRACK_TYPE_AUDIO, and @caps is a subset of
"audio/x-raw(ANY)", then a #GESAudioTrack is created. This will
automatically choose a gap creation method suitable for audio data, and
will set the #GESTrack:restriction-caps to the default for
#GESAudioTrack. You may prefer to use the ges_audio_track_new() method
instead.
Otherwise, a plain #GESTrack is returned. You will likely want to set
the #GESTrack:restriction-caps and call
ges_track_set_create_element_for_gap_func() on the returned track.
A new track.
The #GESTrack:track-type for the track
The #GESTrack:caps for the track
Adds the given track element to the track, which takes ownership of the
element.
Note that this can fail if it would break a configuration rule of the
track's #GESTimeline.
Note that a #GESTrackElement can only be added to one track.
%TRUE if @object was successfully added to @track.
A #GESTrack
The element to add
Commits all the pending changes for the elements contained in the
track.
When changes are made to the timing or priority of elements within a
track, they are not directly executed for the underlying
#nlecomposition and its children. This method will finally execute
these changes so they are reflected in the data output of the track.
Any pending changes will be executed in the backend. The
#GESTimeline::commited signal will be emitted once this has completed.
Note that ges_timeline_commit() will call this method on all of its
tracks, so you are unlikely to need to use this directly.
%TRUE if pending changes were committed, or %FALSE if nothing
needed to be committed.
A #GESTrack
Get the #GESTrack:caps of the track.
The caps of @track.
A #GESTrack
Gets the track elements contained in the track. The returned list is
sorted by the element's #GESTimelineElement:priority and
#GESTimelineElement:start.
A list of
all the #GESTrackElement-s in @track.
A #GESTrack
Gets the #GESTrack:mixing of the track.
Whether @track is mixing.
A #GESTrack
Gets the #GESTrack:restriction-caps of the track.
The restriction-caps of @track.
A #GESTrack
Get the timeline this track belongs to.
The timeline that @track belongs to, or %NULL if
it does not belong to a timeline.
A #GESTrack
Removes the given track element from the track, which revokes
ownership of the element.
%TRUE if @object was successfully removed from @track.
A #GESTrack
The element to remove
Sets the function that will be used to create a #GstElement that can be
used as a source to fill the gaps of the track. A gap is a timeline
region where the track has no #GESTrackElement sources. Therefore, you
are likely to want the #GstElement returned by the function to always
produce 'empty' content, defined relative to the stream type, such as
transparent frames for a video, or mute samples for audio.
#GESAudioTrack and #GESVideoTrack objects are created with such a
function already set appropriately.
A #GESTrack
The function to be used to create a source
#GstElement that can fill gaps in @track
Sets the #GESTrack:mixing for the track.
A #GESTrack
Whether @track should be mixing
Sets the #GESTrack:restriction-caps for the track.
A #GESTrack
The new restriction-caps for @track
Informs the track that it belongs to the given timeline. Calling this
does not actually add the track to the timeline. For that, you should
use ges_timeline_add_track(), which will also take care of informing
the track that it belongs to the timeline. As such, there is no need
for you to call this method.
A #GESTrack
@timeline (nullable): A #GESTimeline
Updates the #GESTrack:restriction-caps of the track using the fields
found in the given caps. Each of the #GstStructure-s in @caps is
compared against the existing structure with the same index in the
current #GESTrack:restriction-caps. If there is no corresponding
existing structure at that index, then the new structure is simply
copied to that index. Otherwise, any fields in the new structure are
copied into the existing structure. This will replace existing values,
and may introduce new ones, but any fields 'missing' in the new
structure are left unchanged in the existing structure.
For example, if the existing #GESTrack:restriction-caps are
"video/x-raw, width=480, height=360", and the updating caps is
"video/x-raw, format=I420, width=500; video/x-bayer, width=400", then
the new #GESTrack:restriction-caps after calling this will be
"video/x-raw, width=500, height=360, format=I420; video/x-bayer,
width=400".
A #GESTrack
The caps to update the restriction-caps with
The capabilities used to choose the output of the #GESTrack's
elements. Internally, this is used to select output streams when
several may be available, by determining whether its #GstPad is
compatible (see #nlecomposition:caps for #nlecomposition). As such,
this is used as a weaker indication of the desired output type of the
track, **before** the #GESTrack:restriction-caps is applied.
Therefore, this should be set to a *generic* superset of the
#GESTrack:restriction-caps, such as "video/x-raw(ANY)". In addition,
it should match with the track's #GESTrack:track-type.
Note that when you set this property, the #GstCapsFeatures of all its
#GstStructure-s will be automatically set to #GST_CAPS_FEATURES_ANY.
Once a track has been added to a #GESTimeline, you should not change
this.
Default value: #GST_CAPS_ANY.
Current duration of the track
Default value: O
The #nlecomposition:id of the underlying #nlecomposition.
Whether the track should support the mixing of #GESLayer data, such
as composing the video data of each layer (when part of the video
data is transparent, the next layer will become visible) or adding
together the audio data. As such, for audio and video tracks, you'll
likely want to keep this set to %TRUE.
The capabilities that specifies the final output format of the
#GESTrack. For example, for a video track, it would specify the
height, width, framerate and other properties of the stream.
You may change this property after the track has been added to a
#GESTimeline, but it must remain compatible with the track's
#GESTrack:caps.
Default value: #GST_CAPS_ANY.
The track type of the track. This controls the type of
#GESTrackElement-s that can be added to the track. This should
match with the track's #GESTrack:caps.
Once a track has been added to a #GESTimeline, you should not change
this.
The #GESTrack:track-type of the track
This signal will be emitted once the changes initiated by
ges_track_commit() have been executed in the backend. In particular,
this will be emitted whenever the underlying #nlecomposition has been
committed (see #nlecomposition::commited).
Will be emitted after a track element is added to the track.
The element that was added
Will be emitted after a track element is removed from the track.
The element that was removed
A #GESTrackElement is a #GESTimelineElement that specifically belongs
to a single #GESTrack of its #GESTimelineElement:timeline. Its
#GESTimelineElement:start and #GESTimelineElement:duration specify its
temporal extent in the track. Specifically, a track element wraps some
nleobject, such as an #nlesource or #nleoperation, which can be
retrieved with ges_track_element_get_nleobject(), and its
#GESTimelineElement:start, #GESTimelineElement:duration,
#GESTimelineElement:in-point, #GESTimelineElement:priority and
#GESTrackElement:active properties expose the corresponding nleobject
properties. When a track element is added to a track, its nleobject is
added to the corresponding #nlecomposition that the track wraps.
Most users will not have to work directly with track elements since a
#GESClip will automatically create track elements for its timeline's
tracks and take responsibility for updating them. The only track
elements that are not automatically created by clips, but a user is
likely to want to create, are #GESEffect-s.
Looks up which @element and @pspec would be effected by the given @name. If various
contained elements have this property name you will get the first one, unless you
specify the class name in @name.
Use #ges_timeline_element_lookup_child
TRUE if @element and @pspec could be found. FALSE otherwise. In that
case the values for @pspec and @element are not modified. Unref @element after
usage.
Object to lookup the property in
Name of the property to look up. You can specify the name of the
class as such: "ClassName::property-name", to guarantee that you get the
proper GParamSpec in case various GstElement-s contain the same property
name. If you don't do so, you will get the first element found, having
this property and the and the corresponding GParamSpec.
pointer to a #GstElement that
takes the real object to set property on
pointer to take the specification
describing the property
Adds all the properties of a #GstElement that match the criteria as
children properties of the track element. If the name of @element's
#GstElementFactory is not in @blacklist, and the factory's
#GST_ELEMENT_METADATA_KLASS contains at least one member of
@wanted_categories (e.g. #GST_ELEMENT_FACTORY_KLASS_DECODER), then
all the properties of @element that are also in @whitelist are added as
child properties of @self using
ges_timeline_element_add_child_property().
This is intended to be used by subclasses when constructing.
A #GESTrackElement
The child object to retrieve properties from
An array of element factory "klass" categories to whitelist, or %NULL
to accept all categories
A
blacklist of element factory names, or %NULL to not blacklist any
element factory
A
whitelist of element property names, or %NULL to whitelist all
writeable properties
Edits the element within its track.
use #ges_timeline_element_edit instead.
%TRUE if the edit of @object completed, %FALSE on failure.
The #GESTrackElement to edit
A whitelist of layers
where the edit can be performed, %NULL allows all layers in the
timeline
The edit mode
The edge of @object where the edit should occur
The edit position: a new location for the edge of @object
(in nanoseconds)
Get all the control bindings that have been created for the children
properties of the track element using
ges_track_element_set_control_source(). The keys used in the returned
hash table are the child property names that were passed to
ges_track_element_set_control_source(), and their values are the
corresponding created #GstControlBinding.
A
hash table containing all child-property-name/control-binding pairs
for @trackelement.
A #GESTrackElement
Gets properties of a child of @object.
Use #ges_timeline_element_get_child_properties
The origin #GESTrackElement
The name of the first property to get
return location for the first property, followed optionally by more
name/return location pairs, followed by NULL
In general, a copy is made of the property contents and
the caller is responsible for freeing the memory by calling
g_value_unset().
Gets a property of a GstElement contained in @object.
Note that #ges_track_element_get_child_property is really
intended for language bindings, #ges_track_element_get_child_properties
is much more convenient for C programming.
Use #ges_timeline_element_get_child_property
%TRUE if the property was found, %FALSE otherwize.
The origin #GESTrackElement
The name of the property
return location for the property value, it will
be initialized if it is initialized with 0
Gets a property of a child of @object.
Use #ges_timeline_element_get_child_property_by_pspec
A #GESTrackElement
The #GParamSpec that specifies the property you want to get
return location for the value
Gets a property of a child of @object. If there are various child elements
that have the same property name, you can distinguish them using the following
syntax: 'ClasseName::property_name' as property name. If you don't, the
corresponding property of the first element found will be set.
Use #ges_timeline_element_get_child_property_valist
The #GESTrackElement parent object
The name of the first property to get
Value for the first property, followed optionally by more
name/return location pairs, followed by NULL
Gets the control binding that was created for the specified child
property of the track element using
ges_track_element_set_control_source(). The given @property_name must
be the same name of the child property that was passed to
ges_track_element_set_control_source().
The control binding that was
created for the specified child property of @object, or %NULL if
@property_name does not correspond to any control binding.
A #GESTrackElement
The name of the child property to return the control
binding of
Get the #GstElement that the track element's underlying nleobject
controls.
The #GstElement being controlled by the
nleobject that @object wraps.
A #GESTrackElement
Get the GNonLin object this object is controlling.
use #ges_track_element_get_nleobject instead.
The GNonLin object this object is controlling.
A #GESTrackElement
Get the nleobject that this element wraps.
The nleobject that @object wraps.
A #GESTrackElement
Get the #GESTrackElement:track for the element.
The track that @object belongs to,
or %NULL if it does not belong to a track.
A #GESTrackElement
Gets the #GESTrackElement:track-type for the element.
The track-type of @object.
A #GESTrackElement
Gets #GESTrackElement:has-internal-source for the element.
%TRUE if @object can have its 'internal time' properties set.
A #GESTrackElement
Gets #GESTrackElement:active for the element.
%TRUE if @object is active in its track.
A #GESTrackElement
Gets an array of #GParamSpec* for all configurable properties of the
children of @object.
Use #ges_timeline_element_list_children_properties
An array of #GParamSpec* which should be freed after use or
%NULL if something went wrong.
The #GESTrackElement to get the list of children properties from
return location for the length of the returned array
Looks up which @element and @pspec would be effected by the given @name. If various
contained elements have this property name you will get the first one, unless you
specify the class name in @name.
Use #ges_timeline_element_lookup_child
TRUE if @element and @pspec could be found. FALSE otherwise. In that
case the values for @pspec and @element are not modified. Unref @element after
usage.
Object to lookup the property in
Name of the property to look up. You can specify the name of the
class as such: "ClassName::property-name", to guarantee that you get the
proper GParamSpec in case various GstElement-s contain the same property
name. If you don't do so, you will get the first element found, having
this property and the and the corresponding GParamSpec.
pointer to a #GstElement that
takes the real object to set property on
pointer to take the specification
describing the property
Removes the #GstControlBinding that was created for the specified child
property of the track element using
ges_track_element_set_control_source(). The given @property_name must
be the same name of the child property that was passed to
ges_track_element_set_control_source().
%TRUE if the control binding was removed from the specified
child property of @object, or %FALSE if an error occurred.
A #GESTrackElement
The name of the child property to remove the control
binding from
Sets #GESTrackElement:active for the element.
%TRUE if the property was *toggled*.
A #GESTrackElement
Whether @object should be active in its track
Sets a property of a child of @object. If there are various child elements
that have the same property name, you can distinguish them using the following
syntax: 'ClasseName::property_name' as property name. If you don't, the
corresponding property of the first element found will be set.
Use #ges_timeline_element_set_child_properties
The #GESTrackElement parent object
The name of the first property to set
value for the first property, followed optionally by more
name/return location pairs, followed by NULL
Sets a property of a GstElement contained in @object.
Note that #ges_track_element_set_child_property is really
intended for language bindings, #ges_track_element_set_child_properties
is much more convenient for C programming.
use #ges_timeline_element_set_child_property instead
%TRUE if the property was set, %FALSE otherwize.
The origin #GESTrackElement
The name of the property
The value
Sets a property of a child of @object.
Use #ges_timeline_element_set_child_property_by_spec
A #GESTrackElement
The #GParamSpec that specifies the property you want to set
The value
Sets a property of a child of @object. If there are various child elements
that have the same property name, you can distinguish them using the following
syntax: 'ClasseName::property_name' as property name. If you don't, the
corresponding property of the first element found will be set.
Use #ges_timeline_element_set_child_property_valist
The #GESTrackElement parent object
The name of the first property to set
Value for the first property, followed optionally by more
name/return location pairs, followed by NULL
Creates a #GstControlBinding for the specified child property of the
track element using the given control source. The given @property_name
should refer to an existing child property of the track element, as
used in ges_timeline_element_lookup_child().
If @binding_type is "direct", then the control binding is created with
gst_direct_control_binding_new() using the given control source. If
@binding_type is "direct-absolute", it is created with
gst_direct_control_binding_new_absolute() instead.
%TRUE if the specified child property could be bound to
@source, or %FALSE if an error occurred.
A #GESTrackElement
The control source to bind the child property to
The name of the child property to control
The type of binding to create ("direct" or
"direct-absolute")
Sets #GESTrackElement:has-internal-source for the element. If this is
set to %FALSE, this method will also set the
#GESTimelineElement:in-point of the element to 0 and its
#GESTimelineElement:max-duration to #GST_CLOCK_TIME_NONE.
A #GESTrackElement
Whether the @object should be allowed to have its
'internal time' properties set.
Sets the #GESTrackElement:track-type for the element.
A #GESTrackElement
The new track-type for @object
Whether the effect of the element should be applied in its
#GESTrackElement:track. If set to %FALSE, it will not be used in
the output of the track.
This property is used to determine whether the 'internal time'
properties of the element have any meaning. In particular, unless
this is set to %TRUE, the #GESTimelineElement:in-point and
#GESTimelineElement:max-duration can not be set to any value other
than the default 0 and #GST_CLOCK_TIME_NONE, respectively.
If an element has some *internal* *timed* source #GstElement that it
reads stream data from as part of its function in a #GESTrack, then
you'll likely want to set this to %TRUE to allow the
#GESTimelineElement:in-point and #GESTimelineElement:max-duration to
be set.
The default value is determined by the #GESTrackElementClass
@default_has_internal_source class property. For most
#GESSourceClass-es, this will be %TRUE, with the exception of those
that have a potentially *static* source, such as #GESImageSourceClass
and #GESTitleSourceClass. Otherwise, this will usually be %FALSE.
For most #GESOperation-s you will likely want to leave this set to
%FALSE. The exception may be for an operation that reads some stream
data from some private internal source as part of manipulating the
input data from the usual linked upstream #GESTrackElement.
For example, you may want to set this to %TRUE for a
#GES_TRACK_TYPE_VIDEO operation that wraps a #textoverlay that reads
from a subtitle file and places its text on top of the received video
data. The #GESTimelineElement:in-point of the element would be used
to shift the initial seek time on the #textoverlay away from 0, and
the #GESTimelineElement:max-duration could be set to reflect the
time at which the subtitle file runs out of data.
Note that GES can not support track elements that have both internal
content and manipulate the timing of their data streams (time
effects).
The track that this element belongs to, or %NULL if it does not
belong to a track.
The track type of the element, which determines the type of track the
element can be added to (see #GESTrack:track-type). This should
correspond to the type of data that the element can produce or
process.
This is emitted when a control binding is added to a child property
of the track element.
The control binding that has been added
This is emitted when a control binding is removed from a child
property of the track element.
The control binding that has been removed
Result: %TRUE if @self has a natural framerate %FALSE otherwise
A #GESAsset
The framerate numerator
The framerate denominator
Result: %TRUE if @self has a natural framerate %FALSE otherwise
A #GESAsset
The framerate numerator
The framerate denominator
Get the GESAssetTrackType the #GESTrackElement extracted from @self
should get into
a #GESTrackType
A #GESAsset
Set the #GESTrackType the #GESTrackElement extracted from @self
should get into
A #GESAsset
A #GESTrackType
A #GESAsset
The framerate numerator
The framerate denominator
The name of the #GstElementFactory to use to
create the underlying nleobject of a track element
TRUE if @element and @pspec could be found. FALSE otherwise. In that
case the values for @pspec and @element are not modified. Unref @element after
usage.
Object to lookup the property in
Name of the property to look up. You can specify the name of the
class as such: "ClassName::property-name", to guarantee that you get the
proper GParamSpec in case various GstElement-s contain the same property
name. If you don't do so, you will get the first element found, having
this property and the and the corresponding GParamSpec.
pointer to a #GstElement that
takes the real object to set property on
pointer to take the specification
describing the property
Types of content handled by a track. If the content is not one of
@GES_TRACK_TYPE_AUDIO, @GES_TRACK_TYPE_VIDEO or @GES_TRACK_TYPE_TEXT,
the user of the #GESTrack must set the type to @GES_TRACK_TYPE_CUSTOM.
@GES_TRACK_TYPE_UNKNOWN is for internal purposes and should not be used
by users
A track of unknown type (i.e. invalid)
An audio track
A video track
A text (subtitle) track
A custom-content track
Base class for media transitions.
Creates an object that mixes together the two underlying objects, A and B.
The A object is assumed to have a higher prioirity (lower number) than the
B object. At the transition in point, only A will be visible, and by the
end only B will be visible.
The shape of the video transition depends on the value of the "vtype"
property. The default value is "crossfade". For audio, only "crossfade" is
supported.
The ID of the ExtractableType is the nickname of the vtype property value. Note
that this value can be changed after creation and the GESExtractable.asset value
will be updated when needed.
Creates a new #GESTransitionClip.
a newly created #GESTransitionClip,
or %NULL if something went wrong.
the type of transition to create
Creates a new #GESTransitionClip for the provided @nick.
The newly created #GESTransitionClip,
or %NULL if something went wrong
a string representing the type of transition to create
a #GESVideoStandardTransitionType representing the wipe to use
a #GESVideoStandardTransitionType indicating the type of video transition
to apply.
Represents all the output streams from a particular uri. It is assumed that
the URI points to a file of some type.
Creates a new #GESUriClip for the provided @uri.
The newly created #GESUriClip, or
%NULL if there was an error.
the URI the source should control
Get the location of the resource.
The location of the resource.
the #GESUriClip
Lets you know if @self is an image or not.
%TRUE if @self is a still image %FALSE otherwise.
the #GESUriClip
Lets you know if the audio track of @self is muted or not.
%TRUE if the audio track of @self is muted, %FALSE otherwise.
the #GESUriClip
Sets whether the clip is a still image or not.
the #GESUriClip
%TRUE if @self is a still image, %FALSE otherwise
Sets whether the audio track of this clip is muted or not.
the #GESUriClip on which to mute or unmute the audio track
%TRUE to mute @self audio track, %FALSE to unmute it
Whether this uri clip represents a still image or not. This must be set
before create_track_elements is called.
Whether the sound will be played or not.
The location of the file/resource to use.
Finalize the request of an async #GESUriClipAsset
The #GESUriClipAsset previously requested
The #GAsyncResult from which to get the newly created #GESUriClipAsset
Creates a #GESUriClipAsset for @uri
Example of request of a GESUriClipAsset:
|[
// The request callback
static void
filesource_asset_loaded_cb (GESAsset * source, GAsyncResult * res, gpointer user_data)
{
GError *error = NULL;
GESUriClipAsset *filesource_asset;
filesource_asset = ges_uri_clip_asset_finish (res, &error);
if (filesource_asset) {
g_print ("The file: %s is usable as a FileSource, it is%s an image and lasts %" GST_TIME_FORMAT,
ges_asset_get_id (GES_ASSET (filesource_asset))
ges_uri_clip_asset_is_image (filesource_asset) ? "" : " not",
GST_TIME_ARGS (ges_uri_clip_asset_get_duration (filesource_asset));
} else {
g_print ("The file: %s is *not* usable as a FileSource because: %s",
ges_asset_get_id (source), error->message);
}
gst_object_unref (mfs);
}
// The request:
ges_uri_clip_asset_new (uri, (GAsyncReadyCallback) filesource_asset_loaded_cb, user_data);
]|
The URI of the file for which to create a #GESUriClipAsset
optional %GCancellable object, %NULL to ignore.
a #GAsyncReadyCallback to call when the initialization is finished
The user data to pass when @callback is called
Creates a #GESUriClipAsset for @uri syncronously. You should avoid
to use it in application, and rather create #GESUriClipAsset asynchronously
A reference to the requested asset or %NULL if
an error happened
The URI of the file for which to create a #GESUriClipAsset.
You can also use multi file uris for #GESMultiFileSource.
Gets duration of the file represented by @self
The duration of @self
a #GESUriClipAsset
Gets #GstDiscovererInfo about the file
#GstDiscovererInfo of specified asset
Target asset
Gets maximum duration of the file represented by @self,
it is usually the same as GESUriClipAsset::duration,
but in the case of nested timelines, for example, they
are different as those can be extended 'infinitely'.
The maximum duration of @self
a #GESUriClipAsset
Get the GESUriSourceAsset @self containes
a
#GList of #GESUriSourceAsset
A #GESUriClipAsset
Gets Whether the file represented by @self is an image or not
Whether the file represented by @self is an image or not
a #GESUriClipAsset
The duration (in nanoseconds) of the media file
The duration (in nanoseconds) of the media file
Sets the timeout of #GESUriClipAsset loading
The #GESUriClipAssetClass on which to set the discoverer timeout
The timeout to set
Asset to create a stream specific #GESSource for a media file.
NOTE: You should never request such a #GESAsset as they will be created automatically
by #GESUriClipAsset-s.
Get the #GESUriClipAsset @self is contained in
a #GESUriClipAsset
A #GESUriClipAsset
Get the #GstDiscovererStreamInfo user by @asset
a #GESUriClipAsset
A #GESUriClipAsset
Check if @asset contains a single image
%TRUE if the video stream corresponds to an image (i.e. only
contains one frame)
A #GESUriClipAsset
Base class for video sources
Retrieves the natural size of the video stream. The natural size, is
the size at which it will be displayed if no scaling is being applied.
NOTE: The sources take into account the potential video rotation applied
by the #videoflip element that is inside the source, effects applied on
the clip which potentially also rotate the element are not taken into
account.
%TRUE if the object has a natural size, %FALSE otherwise.
A #GESVideoSource
The natural width of the underlying source
The natural height of the underlying source
Transition type has not been set,
A bar moves from left to right,
A bar moves from top to bottom,
A box expands from the upper-left corner to the lower-right corner,
A box expands from the upper-right corner to the lower-left corner,
A box expands from the lower-right corner to the upper-left corner,
A box expands from the lower-left corner to the upper-right corner,
A box shape expands from each of the four corners toward the center,
A box shape expands from the center of each quadrant toward the corners of each quadrant,
A central, vertical line splits and expands toward the left and right edges,
A central, horizontal line splits and expands toward the top and bottom edges,
A box expands from the top edge's midpoint to the bottom corners,
A box expands from the right edge's midpoint to the left corners,
A box expands from the bottom edge's midpoint to the top corners,
A box expands from the left edge's midpoint to the right corners,
A diagonal line moves from the upper-left corner to the lower-right corner,
A diagonal line moves from the upper right corner to the lower-left corner,
Two wedge shapes slide in from the top and bottom edges toward the center,
Two wedge shapes slide in from the left and right edges toward the center,
A diagonal line from the lower-left to upper-right corners splits and expands toward the opposite corners,
A diagonal line from upper-left to lower-right corners splits and expands toward the opposite corners,
Four wedge shapes split from the center and retract toward the four edges,
A diamond connecting the four edge midpoints simultaneously contracts toward the center and expands toward the edges,
A wedge shape moves from top to bottom,
A wedge shape moves from right to left,
A wedge shape moves from bottom to top,
A wedge shape moves from left to right,
A 'V' shape extending from the bottom edge's midpoint to the opposite corners contracts toward the center and expands toward the edges,
A 'V' shape extending from the left edge's midpoint to the opposite corners contracts toward the center and expands toward the edges,
A 'V' shape extending from the top edge's midpoint to the opposite corners contracts toward the center and expands toward the edges,
A 'V' shape extending from the right edge's midpoint to the opposite corners contracts toward the center and expands toward the edges,
A rectangle expands from the center.,
A radial hand sweeps clockwise from the twelve o'clock position,
A radial hand sweeps clockwise from the three o'clock position,
A radial hand sweeps clockwise from the six o'clock position,
A radial hand sweeps clockwise from the nine o'clock position,
Two radial hands sweep clockwise from the twelve and six o'clock positions,
Two radial hands sweep clockwise from the nine and three o'clock positions,
Four radial hands sweep clockwise,
A fan unfolds from the top edge, the fan axis at the center,
A fan unfolds from the right edge, the fan axis at the center,
Two fans, their axes at the center, unfold from the top and bottom,
Two fans, their axes at the center, unfold from the left and right,
A radial hand sweeps clockwise from the top edge's midpoint,
A radial hand sweeps clockwise from the right edge's midpoint,
A radial hand sweeps clockwise from the bottom edge's midpoint,
A radial hand sweeps clockwise from the left edge's midpoint,
Two radial hands sweep clockwise and counter-clockwise from the top and bottom edges' midpoints,
Two radial hands sweep clockwise and counter-clockwise from the left and right edges' midpoints,
Two radial hands attached at the top and bottom edges' midpoints sweep from right to left,
Two radial hands attached at the left and right edges' midpoints sweep from top to bottom,
A fan unfolds from the bottom, the fan axis at the top edge's midpoint,
A fan unfolds from the left, the fan axis at the right edge's midpoint,
A fan unfolds from the top, the fan axis at the bottom edge's midpoint,
A fan unfolds from the right, the fan axis at the left edge's midpoint,
Two fans, their axes at the top and bottom, unfold from the center,
Two fans, their axes at the left and right, unfold from the center,
A radial hand sweeps clockwise from the upper-left corner,
A radial hand sweeps counter-clockwise from the lower-left corner.,
A radial hand sweeps clockwise from the lower-right corner,
A radial hand sweeps counter-clockwise from the upper-right corner,
Two radial hands attached at the upper-left and lower-right corners sweep down and up,
Two radial hands attached at the lower-left and upper-right corners sweep down and up,
Two radial hands attached at the upper-left and upper-right corners sweep down,
Two radial hands attached at the upper-left and lower-left corners sweep to the right,
Two radial hands attached at the lower-left and lower-right corners sweep up,
Two radial hands attached at the upper-right and lower-right corners sweep to the left,
Two radial hands attached at the midpoints of the top and bottom halves sweep from right to left,
Two radial hands attached at the midpoints of the left and right halves sweep from top to bottom,
Two sets of radial hands attached at the midpoints of the top and bottom halves sweep from top to bottom and bottom to top,
Two sets of radial hands attached at the midpoints of the left and right halves sweep from left to right and right to left,
Crossfade
The test pattern to produce
A standard SMPTE test pattern
Random noise
A black image
A white image
A red image
A green image
A blue image
Checkers pattern (1px)
Checkers pattern (2px)
Checkers pattern (4px)
Checkers pattern (8px)
Circular pattern
Alternate between black and white
SMPTE test pattern (75% color bars)
Zone plate
Gamut checkers
Chroma zone plate
Solid color
### Children Properties
{{ libs/GESVideoTestSource-children-props.md }}
Get the video pattern used by the @source.
The video pattern used by the @source.
a #GESVideoTestPattern
Sets the source to use the given @pattern.
a #GESVideoTestSource
a #GESVideoTestPattern
A #GESVideoTrack is a default video #GESTrack, with a
#GES_TRACK_TYPE_VIDEO #GESTrack:track-type and "video/x-raw(ANY)"
#GESTrack:caps.
By default, a video track will have its #GESTrack:restriction-caps
set to "video/x-raw" with the following properties:
- width: 1280
- height: 720
- framerate: 30/1
These fields are needed for negotiation purposes, but you can change
their values if you wish. It is advised that you do so using
ges_track_update_restriction_caps() with new values for the fields you
wish to change, and any additional fields you may want to add. Unlike
using ges_track_set_restriction_caps(), this will ensure that these
default fields will at least have some value set.
Creates a new video track, with a #GES_TRACK_TYPE_VIDEO
#GESTrack:track-type and "video/x-raw(ANY)" #GESTrack:caps, and
"video/x-raw" #GESTrack:restriction-caps with the properties:
- width: 1280
- height: 720
- framerate: 30/1
You should use ges_track_update_restriction_caps() if you wish to
modify these fields, or add additional ones.
The newly created video track.
Get the border property of @self, this value represents
the border width of the transition.
The border values of @self or -1 if not meaningful
(this will happen when not using a smpte transition).
The #GESVideoTransition to get the border from
Get the transition type used by @trans.
The transition type used by @trans.
a #GESVideoTransition
Get the invert property of @self, this value represents
the direction of the transition.
The invert value of @self
The #GESVideoTransition to get the inversion from
Set the border property of @self, this value represents
the border width of the transition. In case this value does
not make sense for the current transition type, it is cached
for later use.
The #GESVideoTransition to set the border to
The value of the border to set on @object
Set the invert property of @self, this value represents
the direction of the transition. In case this value does
not make sense for the current transition type, it is cached
for later use.
The #GESVideoTransition to set invert on
%TRUE if the transition should be inverted %FALSE otherwise
Sets the transition being used to @type.
%TRUE if the transition type was properly changed, else %FALSE.
a #GESVideoTransition
a #GESVideoStandardTransitionType
This value represents the border width of the transition.
This value represents the direction of the transition.
parent class
### Children Properties
{{ libs/GESVideoUriSource-children-props.md }}
The location of the file/resource to use.
Clean up any resources created by GES in ges_init().
It is normally not needed to call this function in a normal application as the
resources will automatically be freed when the program terminates.
This function is therefore mostly used by testsuites and other memory profiling tools.
This function should be called from the thread where ges_init() was called.
After this call GES should not be used until another ges_init() call.
Get the best formatter for @uri. It tries to find a formatter
compatible with @uri extension, if none is found, it returns the default
formatter asset.
The #GESAsset for the best formatter to save to @uri
Initialize the GStreamer Editing Service. Call this before any usage of
GES. You should take care of initilizing GStreamer before calling this
function.
MT safety.
GStreamer Editing Services do not guarantee MT safety.
An application is required to use GES APIs (including ges_deinit())
in the thread where ges_init() was called.
Initializes the GStreamer Editing Services library, setting up internal path lists,
and loading evrything needed.
This function will return %FALSE if GES could not be initialized
for some reason.
%TRUE if GES could be initialized.
pointer to application's argc
pointer to application's argv
Returns a #GOptionGroup with GES's argument specifications. The
group is set up to use standard GOption callbacks, so when using this
group in combination with GOption parsing methods, all argument parsing
and initialization is automated.
This function is useful if you want to integrate GES with other
libraries that use GOption (see g_option_context_add_group() ).
If you use this function, you should make sure you initialise the GStreamer
as one of the very first things in your program. That means you need to
use gst_init_get_option_group() and add it to the option context before
using the ges_init_get_option_group() result.
a pointer to GES's option group.
Use this function to check if GES has been initialized with ges_init()
or ges_init_check().
%TRUE if initialization has been done, %FALSE otherwise.
List all the assets in the current cache whose
#GESAsset:extractable-type are of the given type (including
subclasses).
Note that, since only a #GESExtractable can be extracted from an asset,
using `GES_TYPE_EXTRACTABLE` as @filter will return all the assets in
the current cache.
A list of all
#GESAsset-s currently in the cache whose #GESAsset:extractable-type is
of the @filter type.
The type of object that can be extracted from the asset
Get the last buffer @playsink showed
Use the "convert-sample" action signal of
#playsink instead.
A #GstSample containing the last frame from
@playsink in the format defined by the @caps
The playsink to get last frame from
The caps defining the format the return value will have
Helper macro to retrieve the project from which @obj was extracted
The #GESTimeline from which to retrieve the project
Gets the version number of the GStreamer Editing Services library.
pointer to a guint to store the major version number
pointer to a guint to store the minor version number
pointer to a guint to store the micro version number
pointer to a guint to store the nano version number