![]() |
![]() |
![]() |
GStreamer Editing Services 1.1.90 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
#include <ges/ges.h> GESSimpleLayer; GESSimpleLayer * ges_simple_layer_new (void
); gboolean ges_simple_layer_add_object (GESSimpleLayer *layer
,GESClip *object
,gint position
); gboolean ges_simple_layer_move_object (GESSimpleLayer *layer
,GESClip *clip
,gint newposition
); GESClip * ges_simple_layer_nth (GESSimpleLayer *layer
,gint position
); gint ges_simple_layer_index (GESSimpleLayer *layer
,GESClip *clip
); gboolean ges_simple_layer_is_valid (GESSimpleLayer *layer
);
GESSimpleLayer allows using GESClip(s) with a list-like API. Clients can add any type of GESClip to a GESSimpleLayer, and the layer will automatically compute the appropriate start times.
Users should be aware that GESBaseTransitionClip objects are considered to have a negative duration for the purposes of positioning GESSourceClip objects (i.e., adding a GESBaseTransitionClip creates an overlap between the two adjacent sources.
GESSimpleLayer * ges_simple_layer_new (void
);
Creates a new GESSimpleLayer.
Returns : |
The new GESSimpleLayer |
gboolean ges_simple_layer_add_object (GESSimpleLayer *layer
,GESClip *object
,gint position
);
Adds the object at the given position in the layer. The position is where the object will be inserted. To put the object before all objects, use position 0. To put after all objects, use position -1.
When adding transitions, it is important that the adjacent objects (objects at position, and position + 1) be (1) A derivative of GESSourceClip or other non-transition, and (2) have a duration at least as long as the duration of the transition.
The layer will steal a reference to the provided object.
|
a GESSimpleLayer |
|
the GESClip to add |
|
the position at which to add the object |
Returns : |
TRUE if the object was successfuly added, else FALSE. |
gboolean ges_simple_layer_move_object (GESSimpleLayer *layer
,GESClip *clip
,gint newposition
);
Moves the clip to the given position in the layer. To put the clip before all other objects, use position 0. To put the objects after all objects, use position -1.
|
a GESSimpleLayer |
|
the GESClip to move |
|
the new position at which to move the clip |
Returns : |
TRUE if the clip was successfuly moved, else FALSE. |
GESClip * ges_simple_layer_nth (GESSimpleLayer *layer
,gint position
);
Gets the clip at the given position.
|
a GESSimpleLayer |
|
The position in position to get, starting from 0. |
Returns : |
The GESClip at the given position or NULL if the position is off the end of the layer. [transfer none] |
gint ges_simple_layer_index (GESSimpleLayer *layer
,GESClip *clip
);
Gets the position of the given clip within the given layer.
|
a GESSimpleLayer |
|
a GESClip in the layer |
Returns : |
The position of the clip starting from 0, or -1 if the clip was not found. |
gboolean ges_simple_layer_is_valid (GESSimpleLayer *layer
);
Checks whether the arrangement of objects in the layer would cause errors or unexpected output during playback. Do not set the containing pipeline state to PLAYING when this property is FALSE.
|
a GESSimpleLayer |
Returns : |
TRUE if current arrangement of the layer is valid else FALSE. |
"object-moved"
signalvoid user_function (GESSimpleLayer *layer,
GESClip *object,
gint old,
gint new,
gpointer user_data) : Run First
Will be emitted when an object is moved with ges_simple_layer_move_object.
|
the GESSimpleLayer |
|
the GESClip that was added |
|
the previous position of the object |
|
the new position of the object |
|
user data set when the signal handler was connected. |