mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
GESSimpleTimelineLayer: add _nth() method
This commit is contained in:
parent
0486623e30
commit
7bb28f0a6a
3 changed files with 30 additions and 0 deletions
|
@ -445,6 +445,7 @@ GESSimpleTimelineLayer
|
|||
ges_simple_timeline_layer_new
|
||||
ges_simple_timeline_layer_add_object
|
||||
ges_simple_timeline_layer_move_object
|
||||
ges_simple_timeline_layer_nth
|
||||
ges_simple_timeline_layer_is_valid
|
||||
<SUBSECTION Standard>
|
||||
GESSimpleTimelineLayerClass
|
||||
|
|
|
@ -347,6 +347,31 @@ ges_simple_timeline_layer_add_object (GESSimpleTimelineLayer * layer,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_simple_timeline_layer_nth:
|
||||
* @layer: a #GESSimpleTimelineLayer
|
||||
* @position: The position in position to get, starting from 0.
|
||||
*
|
||||
* Gets the timeline object at the given position.
|
||||
*
|
||||
* Returns: The #GESTimelineObject at the given position or NULL if
|
||||
* the position is off the end of the layer.
|
||||
*/
|
||||
|
||||
GESTimelineObject *
|
||||
ges_simple_timeline_layer_nth (GESSimpleTimelineLayer * layer, gint position)
|
||||
{
|
||||
GList *list;
|
||||
GESSimpleTimelineLayerPrivate *priv = layer->priv;
|
||||
|
||||
list = g_list_nth (priv->objects, position);
|
||||
|
||||
if (list)
|
||||
return GES_TIMELINE_OBJECT (list->data);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_simple_timeline_layer_move_object:
|
||||
* @layer: a #GESSimpleTimelineLayer
|
||||
|
|
|
@ -87,6 +87,10 @@ ges_simple_timeline_layer_move_object (GESSimpleTimelineLayer *layer,
|
|||
gboolean
|
||||
ges_simple_timeline_layer_is_valid (GESSimpleTimelineLayer *layer);
|
||||
|
||||
GESTimelineObject *
|
||||
ges_simple_timeline_layer_nth (GESSimpleTimelineLayer *layer,
|
||||
gint position);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _GES_SIMPLE_TIMELINE_LAYER */
|
||||
|
|
Loading…
Reference in a new issue