88 KiB
The Assets in the GStreamer Editing Services represent the resources
that can be used. You can create assets for any type that implements the Extractable
interface, for example GESClips
, Formatter
, and TrackElement
do implement it.
This means that assets will represent for example a GESUriClips
, BaseEffect
etc,
and then you can extract objects of those types with the appropriate parameters from the asset
using the AssetExt::extract
method:
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));
In that example, the advantages of having a Asset
are that you can know what effects
you are working with and let your user know about the avalaible ones, you can add metadata
to the Asset
through the MetaContainer
interface and you have a model for your
custom effects. Note that Asset
management is making easier thanks to the Project
class.
Each asset is represented by a pair of extractable_type
and id
(string). Actually the extractable_type
is the type that implements the Extractable
interface, that means that for example for a UriClip
,
the type that implements the Extractable
interface is Clip
.
The identifier represents different things depending on the extractable_type
and you should check
the documentation of each type to know what the ID of Asset
actually represents for that type. By default,
we only have one Asset
per type, and the id
is the name of the type, but this behaviour is overriden
to be more useful. For example, for GESTransitionClips, the ID is the vtype of the transition
you will extract from it (ie crossfade, box-wipe-rc etc..) For Effect
the ID is the
bin
-description property of the extracted objects (ie the gst-launch style description of the bin that
will be used).
Each and every Asset
is cached into GES, and you can query those with the ges_list_assets
function.
Also the system will automatically register GESAssets
for GESFormatters
and GESTransitionClips
and standard effects (actually not implemented yet) and you can simply query those calling:
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);
You can request the creation of GESAssets
using either Asset::request
or
Asset::request_async
. All the GESAssets
are cached and thus any asset that has already
been created can be requested again without overhead.
Implements
AssetExt
, glib::object::ObjectExt
Trait containing all Asset
methods.
Implementors
Sets an asset from the internal cache as needing reload. An asset needs reload in the case where, for example, we were missing a GstPlugin to use it and that plugin has been installed, or, that particular asset content as changed meanwhile (in the case of the usage of proxies).
Once an asset has been set as "needs reload", requesting that asset again will lead to it being re discovered, and reloaded as if it was not in the cache before.
extractable_type
The glib::Type
of the object that can be extracted from the
asset to be reloaded.
id
The identifier of the asset to mark as needing reload
Returns
true
if the asset was in the cache and could be set as needing reload,
false
otherwise.
Create a Asset
in the most simple cases, you should look at the extractable_type
documentation to see if that constructor can be called for this particular type
As it is recommanded not to instanciate assets for GESUriClip synchronously,
it will not work with this method, but you can instead use the specific
UriClipAsset::request_sync
method if you really want to.
extractable_type
The glib::Type
of the object that can be extracted from the new asset.
id
The Identifier or None
Returns
A reference to the wanted Asset
or None
Request a new Asset
asyncronously, callback
will be called when the materail is
ready to be used or if an error occured.
Example of request of a GESAsset async:
// 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);
extractable_type
The glib::Type
of the object that can be extracted from the
new asset. The class must implement the Extractable
interface.
id
The Identifier of the asset we want to create. This identifier depends of the extractable,
type you want. By default it is the name of the class itself (or None
), but for example for a
GESEffect, it will be the pipeline description, for a GESUriClip it
will be the name of the file, etc... You should refer to the documentation of the Extractable
type you want to create a Asset
for.
cancellable
optional gio::Cancellable
object, None
to ignore.
callback
a GAsyncReadyCallback
to call when the initialization is finished,
Note that the source
of the callback will be the Asset
, but you need to
make sure that the asset is properly loaded using the Asset::request_finish
method. This asset can not be used as is.
user_data
The user data to pass when callback
is called
Finalize the request of an async Asset
res
The gio::AsyncResult
from which to get the newly created Asset
Returns
The Asset
previously requested
Extracts a new gobject::Object
from asset
. The type of the object is
defined by the extractable-type of asset
, you can check what
type will be extracted from asset
using
AssetExt::get_extractable_type
Returns
A newly created Extractable
Returns
The glib::Error
of the asset or None
if
the asset was loaded without issue
Gets the type of object that can be extracted from self
Returns
the type of object that can be extracted from self
Gets the ID of a Asset
Returns
The ID of self
Returns
The proxy in use for self
Returns
The Asset
that is proxied by self
Returns
The list of proxies self
has. Note that the default asset to be
used is always the first in that list.
A proxying asset is an asset that can substitue the real self
. For example if you
have a full HD UriClipAsset
you might want to set a lower resolution (HD version
of the same file) as proxy. Note that when an asset is proxied, calling
Asset::request
will actually return the proxy asset.
proxy
The Asset
that should be used as default proxy for self
or
None
if you want to use the currently set proxy. Note that an asset can proxy one and only
one other asset.
Returns
true
if proxy
has been set on self
, false
otherwise.
Removes proxy
from the list of known proxies for self
.
If proxy
was the current proxy for self
, stop using it.
proxy
The Asset
to stop considering as a proxy for self
Returns
true
if proxy
was a known proxy for self
, false
otherwise.
Implements
TrackElementExt
, TimelineElementExt
, glib::object::ObjectExt
, ExtractableExt
A Clip
is a 'natural' object which controls one or more
TrackElement
(s) in one or more Track
(s).
Keeps a reference to the TrackElement
(s) it created and
sets/updates their properties.
Implements
ClipExt
, GESContainerExt
, TimelineElementExt
, glib::object::ObjectExt
, ExtractableExt
Trait containing all Clip
methods.
Implementors
Extracts a TrackElement
from asset
and adds it to the self
.
Should only be called in order to add operations to a Clip
,
ni other cases TrackElement are added automatically when adding the
Clip
/Asset
to a layer.
Takes a reference on track_element
.
asset
a Asset
with GES_TYPE_TRACK_ELEMENT
as extractable_type
Returns
Created TrackElement
or NULL
if an error happened
Finds the TrackElement
controlled by self
that is used in track
. You
may optionally specify a GType to further narrow search criteria.
Note: If many objects match, then the one with the highest priority will be returned.
track
a Track
or NULL
type_
a glib::Type
indicating the type of track element you are looking
for or G_TYPE_NONE
if you do not care about the track type.
Returns
The TrackElement
used by track
,
else None
. Unref after usage
Finds all the TrackElement
controlled by self
that is used in track
. You
may optionally specify a GType to further narrow search criteria.
track
a Track
or NULL
track_type
a TrackType
indicating the type of tracks in which elements
should be searched.
type_
a glib::Type
indicating the type of track element you are looking
for or G_TYPE_NONE
if you do not care about the track type.
Returns
a glib::List
of the
TrackElement
contained in self
.
The refcount of the objects will be increased. The user will have to
unref each TrackElement
and free the glib::List
.
Get the Layer
to which this clip belongs.
Returns
The Layer
where this self
is being
used, or None
if it is not used on any layer. The caller should unref it
usage.
Get the formats supported by self
.
Returns
The formats supported by self
.
Gets the index position of an effect.
effect
The BaseEffect
we want to get the top index from
Returns
The top index of the effect, -1 if something went wrong.
Get effects applied on self
Returns
a glib::List
of the
BaseEffect
that are applied on self
order by ascendant priorities.
The refcount of the objects will be increased. The user will have to
unref each BaseEffect
and free the glib::List
.
Moves self
to layer
. If self
is not in any layer, it adds it to
layer
, else, it removes it from its current layer, and adds it to layer
.
layer
the new Layer
Returns
true
if self
could be moved false
otherwize
Sets the formats supported by the file.
supportedformats
the TrackType
defining formats supported by self
This is a convenience method that lets you set the index of a top effect.
effect
The BaseEffect
to move
newindex
the new index at which to move the effect
inside this
Clip
Returns
true
if effect
was successfuly moved, false
otherwise.
The function modifies self
, and creates another Clip
so we have two
clips at the end, splitted at the time specified by position
, as a position
in the timeline (not in the clip to be split). For example, if
ges_clip_split is called on a 4-second clip playing from 0:01.00 until
0:05.00, with a split position of 0:02.00, this will result in one clip of 1
second and one clip of 3 seconds, not in two clips of 2 seconds.
The newly created clip will be added to the same layer as self
is in. This
implies that self
must be in a Layer
for the operation to be possible.
This method supports clips playing at a different tempo than one second per
second. For example, splitting a clip with a Effect
'pitch tempo=1.5'
four seconds after it starts, will set the inpoint of the new clip to six
seconds after that of the clip to split. For this, the rate-changing
property must be registered using EffectClass::register_rate_property
;
for the 'pitch' plugin, this is already done.
position
a gst::ClockTime
representing the timeline position at which to split
Returns
The newly created Clip
resulting
from the splitting or None
if the clip can't be split.
The GESLayer where this clip is being used. If you want to connect to its notify signal you should connect to it with g_signal_connect_after as the signal emission can be stop in the first fase.
The formats supported by the clip.
The formats supported by the clip.
The Container
base class.
Implements
GESContainerExt
, TimelineElementExt
, glib::object::ObjectExt
, ExtractableExt
Trait containing all Container
methods.
Implementors
Groups the Container
-s provided in containers
. It creates a subclass
of Container
, depending on the containers provided in containers
.
Basically, if all the containers in containers
should be contained in a same
clip (all the TrackElement
they contain have the exact same
start/inpoint/duration and are in the same layer), it will create a Clip
otherwise a Group
will be created
containers
The
Container
to group, they must all be in a same Timeline
Returns
The Container
(subclass) resulting of the
grouping
Add the TimelineElement
to the container.
child
the TimelineElement
Returns
true
on success, false
on failure.
Edit self
in the different exisiting EditMode
modes. In the case of
slide, and roll, you need to specify a Edge
layers
The layers you want the edit to
happen in, None
means that the edition is done in all the
GESLayers
contained in the current timeline.
new_layer_priority
The priority of the layer self
should land in.
If the layer you're trying to move the container to doesn't exist, it will
be created automatically. -1 means no move.
mode
The EditMode
in which the editition will happen.
edge
The Edge
the edit should happen on.
position
The position at which to edit self
(in nanosecond)
Returns
true
if the container as been edited properly, false
if an error
occured
Get the list of TimelineElement
contained in self
The user is responsible for unreffing the contained objects
and freeing the list.
recursive
Whether to recursively get children in self
Returns
The list of
timeline element contained in self
.
Release the child
from the control of self
.
child
the TimelineElement
to release
Returns
true
if the child
was properly released, else false
.
Ungroups the TimelineElement
contained in this GESContainer,
creating new Container
containing those TimelineElement
apropriately.
recursive
Wether to recursively ungroup self
Returns
The list of
Container
resulting from the ungrouping operation
The user is responsible for unreffing the contained objects
and freeing the list.
Will be emitted after a child was added to container
.
Usually you should connect with g_signal_connect_after
as in the first emission stage, the signal emission might
get stopped internally.
element
the TimelineElement
that was added.
Will be emitted after a child was removed from container
.
element
the TimelineElement
that was removed.
The span of priorities which this container occupies.
The edges of an object contain in a Timeline
or Track
Represents the start of an object.
Represents the end of an object.
Represent the fact we are not workin with any edge of an object.
You can also find more explanation about the behaviour of those modes at:
trim, ripple and roll</ulink>
and clip management</ulink>
.
The object is edited the normal way (default).
The objects are edited in ripple mode. The Ripple mode allows you to modify the beginning/end of a clip and move the neighbours accordingly. This will change the overall timeline duration. In the case of ripple end, the duration of the clip being rippled can't be superior to its max_duration - inpoint otherwise the action won't be executed.
The object is edited in roll mode. The Roll mode allows you to modify the position of an editing point between two clips without modifying the inpoint of the first clip nor the out-point of the second clip. This will not change the overall timeline duration.
The object is edited in trim mode. The Trim mode allows you to modify the in-point/duration of a clip without modifying its position in the timeline.
The object is edited in slide mode. The Slide mode allows you to modify the position of a clip in a timeline without modifying its duration or its in-point, but will modify the duration of the previous clip and in-point of the following clip so does not modify the overall timeline duration. (not implemented yet)
Implements
EffectExt
, BaseEffectExt
, TrackElementExt
, TimelineElementExt
, glib::object::ObjectExt
, ExtractableExt
Trait containing all Effect
methods.
Implementors
Creates a new Effect
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:
Asset::request
(GES_TYPE_EFFECT, "audio your ! bin ! description", NULL);
and extract that asset to be in full control.
bin_description
The gst-launch like bin description of the effect
Returns
a newly created Effect
, or None
if something went
wrong.
The description of the effect bin with a gst-launch-style pipeline description.
Example: "videobalance saturation=1.5 hue=+0.5"
The description of the effect bin with a gst-launch-style pipeline description.
Example: "videobalance saturation=1.5 hue=+0.5"
FIXME: Long description needed
Implements
ExtractableExt
, glib::object::ObjectExt
Trait containing all Extractable
methods.
Implementors
BaseEffect
, Clip
, Container
, Effect
, Extractable
, Group
, Layer
, TimelineElement
, Timeline
, TrackElement
, UriClip
Method for getting an asset from a Extractable
Returns
The Asset
or None
if none has
been set
Returns
The id
of the associated Asset
, free with g_free
Method to set the asset which instantiated the specified object
asset
The Asset
to set
Returns
true
if asset
could be set false
otherwize
A Group
is an object which controls one or more
GESClips
in one or more Layer
(s).
To instanciate a group, you should use the ges_container_group method,
this will be responsible for deciding what subclass of Container
should be instaciated to group the various TimelineElement
passed
in parametter.
Implements
GroupExt
, GESContainerExt
, TimelineElementExt
, glib::object::ObjectExt
, ExtractableExt
Trait containing all Group
methods.
Implementors
Created a new empty Group
, if you want to group several container
together, it is recommanded to use the Container::group
method so the
proper subclass is selected.
Returns
The new empty group.
The duration (in nanoseconds) which will be used in the container
The duration (in nanoseconds) which will be used in the container
The in-point at which this Group
will start outputting data
from its contents (in nanoseconds).
Ex : an in-point of 5 seconds means that the first outputted buffer will be the one located 5 seconds in the controlled resource.
The in-point at which this Group
will start outputting data
from its contents (in nanoseconds).
Ex : an in-point of 5 seconds means that the first outputted buffer will be the one located 5 seconds in the controlled resource.
The maximum duration (in nanoseconds) of the Group
.
The maximum duration (in nanoseconds) of the Group
.
The position of the object in its container (in nanoseconds).
The position of the object in its container (in nanoseconds).
Responsible for the ordering of the various contained Clip(s). A timeline layer has a "priority" property, which is used to manage the priorities of individual Clips. Two layers should not have the same priority within a given timeline.
Implements
LayerExt
, glib::object::ObjectExt
, ExtractableExt
Trait containing all Layer
methods.
Implementors
Creates a new Layer
.
Returns
A new Layer
Creates Clip from asset, adds it to layer and returns a reference to it.
asset
The asset to add to
start
The start value to set on the new Clip
,
if start
== GST_CLOCK_TIME_NONE, it will be set to
the current duration of self
inpoint
The inpoint value to set on the new Clip
duration
The duration value to set on the new Clip
track_types
The TrackType
to set on the the new Clip
Returns
Created Clip
Adds the given clip to the layer. Sets the clip's parent, and thus takes ownership of the clip.
An clip can only be added to one layer.
Calling this method will construct and properly set all the media related
elements on clip
. If you need to know when those objects (actually TrackElement
)
are constructed, you should connect to the container::child-added signal which
is emited right after those elements are ready to be used.
clip
the Clip
to add.
Returns
true
if the clip was properly added to the layer, or false
if the self
refuses to add the clip.
Gets whether transitions are automatically added when objects overlap or not.
Returns
true
if transitions are automatically added, else false
.
Get the clips this layer contains.
Returns
a glib::List
of
clips. The user is responsible for
unreffing the contained objects and freeing the list.
Gets the clips which appear between start
and end
on self
.
start
start of the interval
end
end of the interval
Returns
a glib::List
of clips intersecting [start
, end
) interval on self
.
Lets you retrieve the duration of the layer, which means the end time of the last clip inside it
Returns
The duration of a layer
Get the priority of self
within the timeline.
Returns
The priority of the self
within the timeline.
Get the Timeline
in which Layer
currently is.
Returns
the Timeline
in which Layer
currently is or None
if not in any timeline yet.
Convenience method to check if self
is empty (doesn't contain any clip),
or not.
Returns
true
if self
is empty, false
if it already contains at least
one Clip
Removes the given clip
from the self
and unparents it.
Unparenting it means the reference owned by self
on the clip
will be
removed. If you wish to use the clip
after this function, make sure you
call gst::ObjectExt::ref
before removing it from the self
.
clip
the Clip
to remove
Returns
true
if the clip could be removed, false
if the layer does
not want to remove the clip.
Sets the layer to the given auto_transition
. See the documentation of the
property auto_transition for more information.
auto_transition
whether the auto_transition is active
Sets the layer to the given priority
. See the documentation of the
priority property for more information.
Deprecated since 1.16
use TimelineExt::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.
priority
the priority to set
Will be emitted after the clip was added to the layer.
clip
the Clip
that was added.
Will be emitted after the clip was removed from the layer.
clip
the Clip
that was removed
Sets whether transitions are added automagically when clips overlap.
Sets whether transitions are added automagically when clips overlap.
The priority of the layer in the Timeline
. 0 is the highest
priority. Conceptually, a Timeline
is a stack of GESLayers,
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 commited (with TimelineExt::commit
)
for the change to be taken into account.
Deprecated since 1.16
use TimelineExt::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 priority of the layer in the Timeline
. 0 is the highest
priority. Conceptually, a Timeline
is a stack of GESLayers,
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 commited (with TimelineExt::commit
)
for the change to be taken into account.
Deprecated since 1.16
use TimelineExt::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.
Pipeline
allows developers to view and render Timeline
in a simple fashion.
Its usage is inspired by the 'playbin' element from gst-plugins-base.
Implements
GESPipelineExt
, gst::PipelineExt
, gst::ElementExt
, gst::ObjectExt
, glib::object::ObjectExt
Trait containing all Pipeline
methods.
Implementors
Creates a new conveninence Pipeline
.
Returns
the new Pipeline
.
Returns
the PipelineFlags
currently in use.
Returns a gst::Sample
with the currently playing image in the format specified by
caps. The caller should free the sample with gst_sample_unref
when finished. If ANY
caps are specified, the information will be returned in the whatever format
is currently used by the sink. This information can be retrieve from caps
associated with the buffer.
caps
caps specifying current format. Use GST_CAPS_ANY
for native size.
Returns
a gst::Sample
or None
A convenience method for GESPipelineExt::get_thumbnail
which
returns a buffer in 24-bit RGB, optionally scaled to the specified width
and height. If -1 is specified for either dimension, it will be left at
native size. You can retreive this information from the caps associated
with the buffer.
The caller is responsible for unreffing the returned sample with
gst_sample_unref
.
width
the requested width or -1 for native size
height
the requested height or -1 for native size
Returns
a gst::Sample
or None
Obtains a pointer to playsink's audio sink element that is used for
displaying audio when the Pipeline
is in PipelineFlags::FullPreview
The caller is responsible for unreffing the returned element with
gst::ObjectExt::unref
.
Returns
a pointer to the playsink audio sink gst::Element
Obtains a pointer to playsink's video sink element that is used for
displaying video when the Pipeline
is in PipelineFlags::FullPreview
The caller is responsible for unreffing the returned element with
gst::ObjectExt::unref
.
Returns
a pointer to the playsink video sink gst::Element
Sets playsink's audio sink element that is used for displaying audio when
the Pipeline
is in PipelineFlags::FullPreview
sink
a audio sink gst::Element
Sets playsink's video sink element that is used for displaying video when
the Pipeline
is in PipelineFlags::FullPreview
sink
a video sink gst::Element
Saves the current frame to the specified location
.
width
the requested width or -1 for native size
height
the requested height or -1 for native size
format
a string specifying the desired mime type (for example, image/jpeg)
location
the path to save the thumbnail
Returns
true
if the thumbnail was properly save, else false
.
switches the self
to the specified mode
. The default mode when
creating a Pipeline
is PipelineFlags::FullPreview
.
Note: The self
will be set to gst::State::Null
during this call due to
the internal changes that happen. The caller will therefore have to
set the self
to the requested state after calling this method.
mode
the PipelineFlags
to use
Returns
true
if the mode was properly set, else false
.
Specify where the pipeline shall be rendered and with what settings.
A copy of profile
and output_uri
will be done internally, the caller can
safely free those values afterwards.
This method must be called before setting the pipeline mode to
PipelineFlags::Render
output_uri
the URI to which the timeline will be rendered
profile
the gst_pbutils::EncodingProfile
to use to render the timeline.
Returns
true
if the settings were aknowledged properly, else false
Sets the timeline to use in this pipeline.
The reference to the timeline
will be stolen by the self
.
timeline
the Timeline
to set on the self
.
Returns
true
if the timeline
could be successfully set on the self
,
else false
.
Audio sink for the preview.
Audio sink for the preview.
Pipeline mode. See GESPipelineExt::set_mode
for more
info.
Pipeline mode. See GESPipelineExt::set_mode
for more
info.
Timeline to use in this pipeline. See also
GESPipelineExt::set_timeline
for more info.
Timeline to use in this pipeline. See also
GESPipelineExt::set_timeline
for more info.
Video sink for the preview.
Video sink for the preview.
The Project
is used to control a set of Asset
and is a
Asset
with GES_TYPE_TIMELINE
as extractable_type
itself. That
means that you can extract Timeline
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 Project
class offers a higher level API to handle Asset
-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
gst::Element
and lets you try to recover from those.
Implements
ProjectExt
, AssetExt
, glib::object::ObjectExt
Trait containing all Project
methods.
Implementors
Creates a new Project
and sets its uri to uri
if provided. Note that
if uri
is not valid or None
, 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.
uri
The uri to be set after creating the project.
Returns
A newly created Project
Adds a Asset
to self
, the project will keep a reference on
asset
.
asset
A Asset
to add to self
Returns
true
if the asset could be added false
it was already
in the 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.
profile
A gst_pbutils::EncodingProfile
to add to the project. If a profile with
the same name already exists, it will be replaced
Returns
true
if profile
could be added, false
otherwize
Create and add a Asset
to self
. You should connect to the
"asset-added" signal to get the asset when it finally gets added to
self
id
The id of the asset to create and add to self
extractable_type
The glib::Type
of the asset to create
Returns
true
if the asset started to be added false
it was already
in the project
Create and add a Asset
to self
. You should connect to the
"asset-added" signal to get the asset when it finally gets added to
self
id
The id of the asset to create and add to self
extractable_type
The glib::Type
of the asset to create
Returns
The newly created Asset
or None
.
id
The id of the asset to retrieve
extractable_type
The extractable_type of the asset
to retrieve from object
Returns
The Asset
with
id
or None
if no asset with id
as an ID
Get the assets that are being loaded
Returns
A set of loading asset
that will be added to self
. Note that those Asset are not loaded yet,
and thus can not be used
Retrieve the uri that is currently set on self
Returns
a newly allocated string representing uri.
List all asset
contained in self
filtering per extractable_type
as defined by filter
. It copies the asset and thus will not be updated
in time.
filter
Type of assets to list, GES_TYPE_EXTRACTABLE
will list
all assets
Returns
The list of
Asset
the object contains
Lists the encoding profile that have been set to self
. The first one
is the latest added.
Returns
The
list of gst_pbutils::EncodingProfile
used in self
Loads self
into timeline
timeline
A blank timeline to load self
into
Returns
true
if the project could be loaded false
otherwize.
remove a asset
to from self
.
asset
A Asset
to remove from self
Returns
true
if the asset could be removed false
otherwise
Save the timeline of self
to uri
. You should make sure that timeline
is one of the timelines that have been extracted from self
(using ges_asset_extract (self
);)
timeline
The Timeline
to save, it must have been extracted from self
uri
The uri where to save self
and timeline
formatter_asset
The formatter asset to use or None
. If None
,
will try to save in the same format as the one from which the timeline as been loaded
or default to the formatter with highest rank
overwrite
true
to overwrite file if it exists
Returns
true
if the project could be save, false
otherwize
asset
The Asset
that has been added to project
asset
The Asset
that started loading
asset
The Asset
that has been removed from project
Informs you that a Asset
could not be created. In case of
missing GStreamer plugins, the error will be set to GST_CORE_ERROR
gst::CoreError::MissingPlugin
error
The glib::Error
defining the error that accured, might be None
id
The id
of the asset that failed loading
extractable_type
The extractable_type
of the asset that
failed loading
timeline
The Timeline
that complete 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));
}
error
The error that happened
wrong_asset
The asset with the wrong ID, you should us it and its content only to find out what the new location is.
Returns
The new URI of wrong_asset
Timeline
is the central object for any multimedia timeline.
Contains a list of Layer
which users should use to arrange the
various clips through time.
The output type is determined by the Track
that are set on
the Timeline
.
To save/load a timeline, you can use the TimelineExt::load_from_uri
and
TimelineExt::save_to_uri
methods to use the default format. If you wish
Note that any change you make in the timeline will not actually be taken
into account until you call the TimelineExt::commit
method.
Implements
TimelineExt
, gst::ElementExt
, gst::ObjectExt
, glib::object::ObjectExt
, ExtractableExt
Trait containing all Timeline
methods.
Implementors
Creates a new empty Timeline
.
Returns
The new timeline.
Creates a new Timeline
containing a raw audio and a
raw video track.
Returns
The newly created Timeline
.
Creates a timeline from the given URI.
uri
the URI to load from
Returns
A new timeline if the uri was loaded
successfully, or None
if the uri could not be loaded.
Add the layer to the timeline. The reference to the layer
will be stolen
by the self
.
layer
the Layer
to add
Returns
true
if the layer was properly added, else false
.
Add a track to the timeline. The reference to the track will be stolen by the pipeline.
track
the Track
to add
Returns
true
if the track was properly added, else false
.
Append a newly created Layer
to self
Note that you do not own any reference to the returned layer.
Returns
The newly created Layer
, or the last (empty)
Layer
of self
.
Commit all the pending changes of the clips contained in the
self
.
When changes happen in a timeline, they are not directly executed in the non-linear engine. Call this method once you are done with a set of changes and want it to be executed.
The Timeline::commited
signal will be emitted when the (possibly updated)
gst::Pipeline
is ready to output data again, except if the state of the
timeline was gst::State::Ready
or gst::State::Null
.
Note that all the pending changes will automatically be executed when the
timeline goes from gst::State::Ready
to gst::State::Paused
, which usually is
triggered by corresponding state changes in a containing Pipeline
.
You should not try to change the state of the timeline, seek it or add
tracks to it during a commit operation, that is between a call to this
function and after receiving the Timeline::commited
signal.
See TimelineExt::commit_sync
if you don't want to bother with waiting
for the signal.
Returns
true
if pending changes were commited or false
if nothing needed
to be commited
Commit all the pending changes of the GESClips
contained in the
self
.
Will return once the update is complete, that is when the
(possibly updated) gst::Pipeline
is ready to output data again, or if the
state of the timeline was gst::State::Ready
or gst::State::Null
.
This function will wait for any pending state change of the timeline by
calling gst::ElementExt::get_state
with a GST_CLOCK_TIME_NONE
timeout, you
should not try to change the state from another thread before this function
has returned.
See TimelineExt::commit
for more information.
Returns
true
if pending changes were commited or false
if nothing needed
to be commited
Gets whether transitions are automatically added when objects overlap or not.
Returns
true
if transitions are automatically added, else false
.
Get the current duration of self
Returns
The current duration of self
Gets a TimelineElement
contained in the timeline
Returns
The TimelineElement
or None
if
not found.
Get the list of Group
present in the Timeline.
Returns
the list of
Group
that contain clips present in the timeline's layers.
Must not be changed.
Retrieve the layer with priority
as a priority
priority
The priority of the layer to find
Returns
A Layer
or None
if no layer with
priority
was found
Since 1.6
Get the list of Layer
present in the Timeline.
Returns
the list of
Layer
present in the Timeline sorted by priority.
The caller should unref each Layer once he is done with them.
Search the gst::Pad
corresponding to the given self
's track
.
track
The Track
Returns
The corresponding gst::Pad
if it is
found, or None
if there is an error.
Gets the configured snapping distance of the timeline. See the documentation of the property snapping_distance for more information.
Returns
The snapping_distance
property of the timeline
Search the Track
corresponding to the given self
's pad
.
pad
The gst::Pad
Returns
The corresponding Track
if it is
found, or None
if there is an error.
Returns the list of Track
used by the Timeline.
Returns
A list of Track
.
The caller should unref each track once he is done with them.
Check whether a Timeline
is empty or not
Returns
true
if the timeline is empty false
otherwize
Loads the contents of URI into the given timeline.
uri
The URI to load from
Returns
true
if the timeline was loaded successfully, or false
if the uri
could not be loaded.
Moves layer
at new_layer_priority
meaning that layer
we land at that position in the stack of layers inside
the timeline. If new_layer_priority
is superior than the number
of layers present in the time, it will move to the end of the
stack of layers.
layer
The layer to move at new_layer_priority
new_layer_priority
The index at which layer
should land
Paste element
inside the timeline. element
must have been
created using ges_timeline_element_copy with deep=TRUE set,
i.e. it must be a deep copy, otherwise it will fail.
element
The TimelineElement
to paste
position
The position in the timeline the element should
be pasted to, meaning it will become the start of element
layer_priority
The Layer
to which the element should be pasted to.
-1 means paste to the same layer from which the element
has been copied from.
Returns
Shallow copy of the element
pasted
Removes the layer from the timeline. The reference that the self
holds on
the layer will be dropped. If you wish to use the layer
after calling this
method, you need to take a reference before calling.
layer
the Layer
to remove
Returns
true
if the layer was properly removed, else false
.
Remove the track
from the self
. The reference stolen when adding the
track
will be removed. If you wish to use the track
after calling this
function you must ensure that you have a reference to it.
track
the Track
to remove
Returns
true
if the track
was properly removed, else false
.
Saves the timeline to the given location
uri
The location to save to
formatter_asset
The formatter asset to use or None
. If None
,
will try to save in the same format as the one from which the timeline as been loaded
or default to the formatter with highest rank
overwrite
true
to overwrite file if it exists
Returns
true
if the timeline was successfully saved to the given location,
else false
.
Sets the layer to the given auto_transition
. See the documentation of the
property auto_transition for more information.
auto_transition
whether the auto_transition is active
Sets the snapping_distance
of the timeline. See the documentation of the
property snapping_distance for more information.
snapping_distance
whether the snapping_distance is active
This signal will be emitted once the changes initiated by TimelineExt::commit
have been executed in the backend. Use TimelineExt::commit_sync
if you
don't need to do anything in the meantime.
Will be emitted after a new group is added to to the timeline.
group
the Group
Will be emitted after a group has been removed from the timeline.
group
the Group
children
a list of Container
Will be emitted after a new layer is added to the timeline.
layer
the Layer
that was added to the timeline
Will be emitted after the layer was removed from the timeline.
layer
the Layer
that was removed from the timeline
clip
The Clip
on which track_element
will land
track_element
The TrackElement
for which to choose the tracks it should land into
Returns
a glib::PtrArray
of Track
-s where that object should be added
Will be emitted after the track was added to the timeline.
track
the Track
that was added to the timeline
Will be emitted after the track was removed from the timeline.
track
the Track
that was removed from the timeline
Sets whether transitions are added automagically when clips overlap.
Sets whether transitions are added automagically when clips overlap.
Current duration (in nanoseconds) of the Timeline
Distance (in nanoseconds) from which a moving object will snap with it neighboors. 0 means no snapping.
Distance (in nanoseconds) from which a moving object will snap with it neighboors. 0 means no snapping.
The GESTimelineElement base class implements the notion of timing as well as priority. A GESTimelineElement can have a parent object which will be responsible for controlling its timing properties.
Implements
TimelineElementExt
, glib::object::ObjectExt
, ExtractableExt
Trait containing all TimelineElement
methods.
Implementors
Container
, TimelineElement
, TrackElement
Copies self
deep
whether we want to create the elements self
contains or not
Returns
The newly create TimelineElement
, copied from self
Gets properties of a child of self
.
first_property_name
The name of the first property to get
In general, a copy is made of the property contents and
the caller is responsible for freeing the memory by calling
gobject::Value::unset
.
Gets a property of a GstElement contained in object
.
Note that TimelineElementExt::get_child_property
is really
intended for language bindings, TimelineElementExt::get_child_properties
is much more convenient for C programming.
property_name
The name of the property
value
return location for the property value, it will be initialized if it is initialized with 0
Returns
true
if the property was found, false
otherwize
Gets a property of a child of self
.
pspec
The gobject::ParamSpec
that specifies the property you want to get
value
return location for the value
Gets a property of a child of self
. 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.
first_property_name
The name of the first property to get
var_args
value for the first property, followed optionally by more name/return location pairs, followed by NULL
Returns
The duration
of self
Returns
The inpoint
of self
Returns
The maxduration
of self
Returns a copy of the name of self
.
Caller should g_free
the return value after usage.
Returns
The name of self
Returns the parent of self
. This function increases the refcount
of the parent object so you should gst::ObjectExt::unref
it after usage.
Returns
parent of self
, this can be None
if
self
has no parent. unref after usage.
Returns
The priority
of self
Returns
The start
of self
Returns the timeline of self
. This function increases the refcount
of the timeline so you should gst::ObjectExt::unref
it after usage.
Returns
timeline of self
, this can be None
if
self
has no timeline. unref after usage.
Gets the toplevel TimelineElement
controlling self
Returns
The toplevel controlling parent of self
Gets all the TrackTypes self
will interact with
Gets an array of gobject::ParamSpec
* for all configurable properties of the
children of self
.
n_properties
return location for the length of the returned array
Returns
an array of gobject::ParamSpec
* which should be freed after use or
None
if something went wrong
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
.
prop_name
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.
child
pointer to a gst::Element
that
takes the real object to set property on
pspec
pointer to take the gobject::ParamSpec
describing the property
Returns
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.
Paste self
inside the timeline. self
must have been created
using ges_timeline_element_copy with recurse=TRUE set,
otherwise it will fail.
paste_position
The position in the timeline the element should
be copied to, meaning it will become the start of self
Returns
Paste self
copying the element
Edits self
in ripple mode. It allows you to modify the
start of self
and move the following neighbours accordingly.
This will change the overall timeline duration.
start
The new start of self
in ripple mode.
Returns
true
if the self as been rippled properly, false
if an error
occured
Edits self
in ripple mode. It allows you to modify the
duration of a self
and move the following neighbours accordingly.
This will change the overall timeline duration.
end
The new end (start + duration) of self
in ripple mode. It will
basically only change the duration of self
.
Returns
true
if the self as been rippled properly, false
if an error
occured
Edits self
in roll mode. It allows you to modify the
duration of a self
and trim (basicly change the start + inpoint
in this case) the following neighbours accordingly.
This will not change the overall timeline duration.
end
The new end (start + duration) of self
in roll mode
Returns
true
if the self as been rolled properly, false
if an error
occured
Edits self
in roll mode. It allows you to modify the
start and inpoint of a self
and "resize" (basicly change the duration
in this case) of the previous neighbours accordingly.
This will not change the overall timeline duration.
start
The new start of self
in roll mode, it will also adapat
the in-point of self
according
Returns
true
if the self as been roll properly, false
if an error
occured
Sets a property of a child of self
. 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.
first_property_name
The name of the first property to set
Sets a property of a child of self
Note that TimelineElementExt::set_child_property
is really
intended for language bindings, TimelineElementExt::set_child_properties
is much more convenient for C programming.
property_name
The name of the property
value
the value
Returns
true
if the property was set, false
otherwize
Sets a property of a child of self
.
pspec
The gobject::ParamSpec
that specifies the property you want to set
value
the value
Sets a property of a child of self
. 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.
first_property_name
The name of the first property to set
var_args
value for the first property, followed optionally by more name/return location pairs, followed by NULL
Set the duration of the object
Note that if the timeline snap-distance property of the timeline containing
self
is set, self
will properly snap to its neighboors.
duration
the duration in gst::ClockTime
Set the in-point, that is the moment at which the self
will start
outputting data from its contents.
inpoint
the in-point in gst::ClockTime
Set the maximun duration of the object
maxduration
the maximum duration in gst::ClockTime
Sets the name of object, or gives self
a guaranteed unique name (if name is NULL).
This function makes a copy of the provided name, so the caller retains ownership
of the name it sent.
name
The name self
should take (if avalaible<)
Sets the parent of self
to parent
. The parents needs to already
own a hard reference on self
.
parent
new parent of self
Returns
true
if parent
could be set or false
when self
already had a parent or self
and parent
are the same.
Sets the priority of the object within the containing layer
Deprecated
All priority management is done by GES itself now.
To set Effect
priorities ClipExt::set_top_effect_index
should
be used.
priority
the priority
Set the position of the object in its containing layer.
Note that if the snapping-distance property of the timeline containing
self
is set, self
will properly snap to the edges around start
.
start
the position in gst::ClockTime
Sets the timeline of self
to timeline
.
timeline
The Timeline
self
is in
Returns
true
if timeline
could be set or false
when timeline
already had a timeline.
Edits self
in trim mode. It allows you to modify the
inpoint and start of self
.
This will not change the overall timeline duration.
Note that to trim the end of an self you can just set its duration. The same way
as this method, it will take into account the snapping-distance property of the
timeline in which self
is.
start
The new start of self
in trim mode, will adapt the inpoint
of self
accordingly
Returns
true
if the self as been trimmed properly, false
if an error
occured
The deep notify signal is used to be notified of property changes of all
the childs of timeline_element
prop_object
the object that originated the signal
prop
the property that changed
The duration (in nanoseconds) which will be used in the container
The duration (in nanoseconds) which will be used in the container
The in-point at which this TimelineElement
will start outputting data
from its contents (in nanoseconds).
Ex : an in-point of 5 seconds means that the first outputted buffer will be the one located 5 seconds in the controlled resource.
The in-point at which this TimelineElement
will start outputting data
from its contents (in nanoseconds).
Ex : an in-point of 5 seconds means that the first outputted buffer will be the one located 5 seconds in the controlled resource.
The maximum duration (in nanoseconds) of the TimelineElement
.
The maximum duration (in nanoseconds) of the TimelineElement
.
The name of the object
The name of the object
The parent container of the object
The parent container of the object
The priority of the object.
Setting GESTimelineElement priorities is deprecated as all priority management is done by GES itself now.
The priority of the object.
Setting GESTimelineElement priorities is deprecated as all priority management is done by GES itself now.
Whether the element should be serialized.
Whether the element should be serialized.
The position of the object in its container (in nanoseconds).
The position of the object in its container (in nanoseconds).
The timeline in which element
is
The timeline in which element
is
Corresponds to one output format (i.e. audio OR video).
Contains the compatible TrackElement(s).
Implements
GESTrackExt
, gst::ElementExt
, gst::ObjectExt
, glib::object::ObjectExt
Trait containing all Track
methods.
Implementors
Creates a new Track
with the given type_
and caps
.
The newly created track will steal a reference to the caps. If you wish to use those caps elsewhere, you will have to take an extra reference.
type_
The type of track
caps
The caps to restrict the output of the track to.
Returns
A new Track
.
Adds the given object to the track. Sets the object's controlling track,
and thus takes ownership of the object
.
An object can only be added to one track.
object
the TrackElement
to add
Returns
true
if the object was properly added. false
if the track does not
want to accept the object.
Commits all the pending changes of the TrackElement contained in the track.
When timing changes happen in a timeline, the changes are not directly done inside NLE. This method needs to be called so any changes on a clip contained in the timeline actually happen at the media processing level.
Returns
true
if something as been commited false
if nothing needed
to be commited
Get the gst::Caps
this track is configured to output.
Returns
The gst::Caps
this track is configured to output.
Gets the TrackElement
contained in self
Returns
the list of
TrackElement
present in the Track sorted by priority and start.
Gets if the underlying NleComposition
contains an expandable mixer.
Returns
True
if there is a mixer, False
otherwise.
Get the Timeline
this track belongs to. Can be None
.
Returns
The Timeline
this track belongs to. Can be None
.
Removes the object from the track and unparents it.
Unparenting it means the reference owned by self
on the object
will be
removed. If you wish to use the object
after this function, make sure you
call gst::ObjectExt::ref
before removing it from the self
.
object
the TrackElement
to remove
Returns
true
if the object was removed, else false
if the track
could not remove the object (like if it didn't belong to the track).
Sets the function that should be used to create the GstElement used to fill gaps.
To avoid to provide such a function we advice you to use the
AudioTrack::new
and VideoTrack::new
constructor when possible.
func
The GESCreateElementForGapFunc
that will be used
to create gst::Element
to fill gaps
Sets if the Track
should be mixing.
mixing
TRUE if the track should be mixing, FALSE otherwise.
Sets the given caps
as the caps the track has to output.
caps
the gst::Caps
to set
Sets timeline
as the timeline controlling self
.
timeline
a Timeline
Updates the restriction caps by modifying all the fields present in caps
in the original restriction caps. If for example the current restriction caps
are video/x-raw, format=I420, width=360 and caps
is video/x-raw, format=RGB,
the restriction caps will be updated to video/x-raw, format=RGB, width=360.
Modification happens for each structure in the new caps, and one can add new fields or structures through that function.
caps
the gst::Caps
to update with
Will be emitted after a track element was added to the track.
effect
the TrackElement
that was added.
Will be emitted after a track element was removed from the track.
effect
the TrackElement
that was removed.
Caps used to filter/choose the output stream. This is generally set to a generic set of caps like 'video/x-raw' for raw video.
Default value: GST_CAPS_ANY
.
Caps used to filter/choose the output stream. This is generally set to a generic set of caps like 'video/x-raw' for raw video.
Default value: GST_CAPS_ANY
.
Current duration of the track
Default value: O
Whether layer mixing is activated or not on the track.
Whether layer mixing is activated or not on the track.
Caps used to filter/choose the output stream.
Default value: GST_CAPS_ANY
.
Caps used to filter/choose the output stream.
Default value: GST_CAPS_ANY
.
Type of stream the track outputs. This is used when creating the Track
to specify in generic terms what type of content will be outputted.
It also serves as a 'fast' way to check what type of data will be outputted
from the Track
without having to actually check the Track
's caps
property.
Type of stream the track outputs. This is used when creating the Track
to specify in generic terms what type of content will be outputted.
It also serves as a 'fast' way to check what type of data will be outputted
from the Track
without having to actually check the Track
's caps
property.
TrackElement
is the Base Class for any object that can be contained in a
Track
.
It contains the basic information as to the location of the object within its container, like the start position, the inpoint, the duration and the priority.
Implements
TrackElementExt
, TimelineElementExt
, glib::object::ObjectExt
, ExtractableExt
Trait containing all TrackElement
methods.
Implementors
Looks for the properties defines with the various parametters and add them to the hashtable of children properties.
To be used by subclasses only
element
The GstElement to retrieve properties from
wanted_categories
An array of categories of GstElement to take into account (as defined in the factory meta "klass" field)
blacklist
A blacklist of elements factory names to not take into account
whitelist
A list of propery names to add as children properties
Edit self
in the different exisiting EditMode
modes. In the case of
slide, and roll, you need to specify a Edge
layers
The layers you want the edit to
happen in, None
means that the edition is done in all the
GESLayers
contained in the current timeline.
FIXME: This is not implemented yet.
mode
The EditMode
in which the edition will happen.
edge
The Edge
the edit should happen on.
position
The position at which to edit self
(in nanosecond)
Returns
true
if the object as been edited properly, false
if an error
occured
Returns
A
glib::HashTable
containing all property_name: GstControlBinding
Gets properties of a child of self
.
Deprecated
Use TimelineElementExt::get_child_properties
first_property_name
The name of the first property to get
In general, a copy is made of the property contents and
the caller is responsible for freeing the memory by calling
gobject::Value::unset
.
Gets a property of a GstElement contained in self
.
Note that TrackElement::get_child_property
is really
intended for language bindings, TrackElement::get_child_properties
is much more convenient for C programming.
Deprecated
Use TimelineElementExt::get_child_property
property_name
The name of the property
value
return location for the property value, it will be initialized if it is initialized with 0
Returns
true
if the property was found, false
otherwize
Gets a property of a child of self
.
Deprecated
Use TimelineElementExt::get_child_property_by_pspec
pspec
The gobject::ParamSpec
that specifies the property you want to get
value
return location for the value
Gets a property of a child of self
. 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.
Deprecated
Use TimelineElementExt::get_child_property_valist
first_property_name
The name of the first property to get
var_args
value for the first property, followed optionally by more name/return location pairs, followed by NULL
Looks up the various controlled properties for that TrackElement
,
and returns the gst::ControlBinding
which controls property_name
.
property_name
The property_name to which the binding is associated.
Returns
the gst::ControlBinding
associated with
property_name
, or None
if that property is not controlled.
Get the gst::Element
this track element is controlling within GNonLin.
Returns
the gst::Element
this track element is controlling
within GNonLin.
Get the NleObject object this object is controlling.
Deprecated
use TrackElementExt::get_nleobject
instead.
Returns
the NleObject object this object is controlling.
Get the GNonLin object this object is controlling.
Returns
the GNonLin object this object is controlling.
Get the Track
to which this object belongs.
Returns
The Track
to which this object
belongs. Can be None
if it is not in any track
Lets you know if self
will be used for playback and rendering,
or not.
Returns
true
if self
is active, false
otherwize
Gets an array of gobject::ParamSpec
* for all configurable properties of the
children of self
.
Deprecated
Use TimelineElementExt::list_children_properties
n_properties
return location for the length of the returned array
Returns
an array of gobject::ParamSpec
* which should be freed after use or
None
if something went wrong
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
.
Deprecated
Use TimelineElementExt::lookup_child
prop_name
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.
element
pointer to a gst::Element
that
takes the real object to set property on
pspec
pointer to take the gobject::ParamSpec
describing the property
Returns
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.
Removes a gst::ControlBinding
from self
.
property_name
The name of the property to control.
Returns
true
if the binding could be removed, false
if an error
occured
Sets the usage of the self
. If active
is true
, the object will be used for
playback and rendering, else it will be ignored.
active
visibility
Returns
true
if the property was toggled, else false
Sets a property of a child of self
. 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.
Deprecated
Use TimelineElementExt::set_child_properties
first_property_name
The name of the first property to set
Sets a property of a GstElement contained in self
.
Note that TrackElement::set_child_property
is really
intended for language bindings, TrackElement::set_child_properties
is much more convenient for C programming.
Deprecated
use TimelineElementExt::set_child_property
instead
property_name
The name of the property
value
the value
Returns
true
if the property was set, false
otherwize
Sets a property of a child of self
.
Deprecated
Use ges_timeline_element_set_child_property_by_spec
pspec
The gobject::ParamSpec
that specifies the property you want to set
value
the value
Sets a property of a child of self
. 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.
Deprecated
Use TimelineElementExt::set_child_property_valist
first_property_name
The name of the first property to set
var_args
value for the first property, followed optionally by more name/return location pairs, followed by NULL
Creates a gst::ControlBinding
and adds it to the gst::Element
concerned by the
property. Use the same syntax as TrackElementExt::lookup_child
for
the property name.
source
the gst::ControlSource
to set on the binding.
property_name
The name of the property to control.
binding_type
The type of binding to create. Only "direct" is available for now.
Returns
true
if the binding could be created and added, false
if an error
occured
The control-binding-added signal is emitted each time a control binding
is added for a child property of track_element
control_binding
the gst::ControlBinding
that has been added
The control-binding-removed signal is emitted each time a control binding
is removed for a child property of track_element
control_binding
the gst::ControlBinding
that has been removed
Whether the object should be taken into account in the Track
output.
If false
, then its contents will not be used in the resulting track.
Whether the object should be taken into account in the Track
output.
If false
, then its contents will not be used in the resulting track.
Represents all the output streams from a particular uri. It is assumed that the URI points to a file of some type.
Implements
UriClipExt
, ClipExt
, GESContainerExt
, TimelineElementExt
, glib::object::ObjectExt
, ExtractableExt
Trait containing all UriClip
methods.
Implementors
Creates a new UriClip
for the provided uri
.
uri
the URI the source should control
Returns
The newly created UriClip
, or
None
if there was an error.
Get the location of the resource.
Returns
The location of the resource.
Lets you know if self
is an image or not.
Returns
true
if self
is a still image false
otherwise.
Lets you know if the audio track of self
is muted or not.
Returns
true
if the audio track of self
is muted, false
otherwise.
Sets whether the clip is a still image or not.
is_image
true
if self
is a still image, false
otherwise
Sets whether the audio track of this clip is muted or not.
mute
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 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.
Whether the sound will be played or not.
The location of the file/resource to use.
The location of the file/resource to use.
The UriClipAsset
is a special Asset
that lets you handle
the media file to use inside the GStreamer Editing Services. It has APIs that
let you get information about the medias. Also, the tags found in the media file are
set as Metadatas of the Asser.
Implements
UriClipAssetExt
, AssetExt
, glib::object::ObjectExt
Trait containing all UriClipAsset
methods.
Implementors
Creates a UriClipAsset
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 (ges_asset_request_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);
uri
The URI of the file for which to create a UriClipAsset
cancellable
optional gio::Cancellable
object, None
to ignore.
callback
a GAsyncReadyCallback
to call when the initialization is finished
user_data
The user data to pass when callback
is called
Creates a UriClipAsset
for uri
syncronously. You should avoid
to use it in application, and rather create UriClipAsset
asynchronously
uri
The URI of the file for which to create a UriClipAsset
.
You can also use multi file uris for MultiFileSource
.
Returns
A reference to the requested asset or
None
if an error happened
Gets duration of the file represented by self
Returns
The duration of self
Gets gst_pbutils::DiscovererInfo
about the file
Returns
gst_pbutils::DiscovererInfo
of specified asset
Get the GESUriSourceAsset self
containes
Returns
a
glib::List
of UriSourceAsset
Gets Whether the file represented by self
is an image or not
Returns
Whether the file represented by self
is an image or not
The duration (in nanoseconds) of the media file
The duration (in nanoseconds) of the media file
NOTE: You should never request such a Asset
as they will be created automatically
by UriClipAsset
-s.
Implements
UriSourceAssetExt
, AssetExt
, glib::object::ObjectExt
Trait containing all UriSourceAsset
methods.
Implementors
Get the UriClipAsset
self_
is contained in
Returns
a UriClipAsset
Get the gst_pbutils::DiscovererStreamInfo
user by self
Returns
a UriClipAsset