GESTimelineObject: Change the get_effects method to get_top_effects.

This commit is contained in:
Thibault Saunier 2011-02-16 17:45:05 +01:00 committed by Edward Hervey
parent 0d02e26195
commit 7f3e64bd82
4 changed files with 15 additions and 12 deletions

View file

@ -287,7 +287,7 @@ ges_timeline_object_set_duration
ges_timeline_object_get_layer
ges_timeline_object_find_track_object
ges_timeline_object_add_track_object
ges_timeline_object_get_effects
ges_timeline_object_get_top_effects
ges_timeline_object_get_top_effect_position
ges_timeline_object_set_top_effect_priority
<SUBSECTION Standard>

View file

@ -849,7 +849,7 @@ sort_track_effects (gpointer a, gpointer b, GESTimelineObject * object)
}
/**
* ges_timeline_object_get_effects:
* ges_timeline_object_get_top_effects:
* @object: The origin #GESTimelineObject
*
* Get effects applied on @object
@ -860,17 +860,17 @@ sort_track_effects (gpointer a, gpointer b, GESTimelineObject * object)
* unref each #GESTrackEffect and free the #GList.
*/
GList *
ges_timeline_object_get_effects (GESTimelineObject * object)
ges_timeline_object_get_top_effects (GESTimelineObject * object)
{
GList *tmp, *ret;
guint i;
ret = NULL;
for (tmp = object->priv->trackobjects; tmp; tmp = tmp->next) {
if (GES_IS_TRACK_EFFECT (tmp->data)) {
ret = g_list_append (ret, tmp->data);
g_object_ref (tmp->data);
}
for (tmp = object->priv->trackobjects, i = 0; i < object->priv->nb_effects;
tmp = tmp->next, i++) {
ret = g_list_append (ret, tmp->data);
g_object_ref (tmp->data);
}
return ret;

View file

@ -242,7 +242,7 @@ ges_timeline_object_add_track_object (GESTimelineObject *object, GESTrackObject
*trobj);
GList *
ges_timeline_object_get_effects (GESTimelineObject *object);
ges_timeline_object_get_top_effects (GESTimelineObject *object);
gint
ges_timeline_object_get_top_effect_position (GESTimelineObject *object,

View file

@ -141,7 +141,8 @@ GST_START_TEST (test_get_effects_from_tl)
g_object_get (G_OBJECT (source), "height", &tl_object_height, NULL);
fail_unless (tl_object_height == 4);
effects = ges_timeline_object_get_effects (GES_TIMELINE_OBJECT (source));
effects = ges_timeline_object_get_top_effects (GES_TIMELINE_OBJECT (source));
fail_unless (g_list_length (effects) == 3);
for (tmp = effects; tmp; tmp = tmp->next) {
gint priority =
ges_timeline_object_get_top_effect_position (GES_TIMELINE_OBJECT
@ -215,7 +216,8 @@ GST_START_TEST (test_tl_effect)
g_object_get (tl_effect, "height", &tl_object_height, NULL);
fail_unless (tl_object_height == 4);
effects = ges_timeline_object_get_effects (GES_TIMELINE_OBJECT (tl_effect));
effects =
ges_timeline_object_get_top_effects (GES_TIMELINE_OBJECT (tl_effect));
for (tmp = effects, i = 0; tmp; tmp = tmp->next, i++) {
gint priority =
ges_timeline_object_get_top_effect_position (GES_TIMELINE_OBJECT
@ -297,7 +299,8 @@ GST_START_TEST (test_priorities_tl_object)
g_object_get (tl_effect, "height", &tl_object_height, NULL);
fail_unless (tl_object_height == 4);
effects = ges_timeline_object_get_effects (GES_TIMELINE_OBJECT (tl_effect));
effects =
ges_timeline_object_get_top_effects (GES_TIMELINE_OBJECT (tl_effect));
for (tmp = effects, i = 0; tmp; tmp = tmp->next, i++) {
gint priority =
ges_timeline_object_get_top_effect_position (GES_TIMELINE_OBJECT