mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
tests: Check ges_clip_set_position behaviour
+ Minor fix to handle properly the feature when clip is not in any layer https://bugzilla.gnome.org/show_bug.cgi?id=731248
This commit is contained in:
parent
6c717b27c6
commit
2db5368b9d
3 changed files with 12 additions and 11 deletions
|
@ -95,7 +95,7 @@ _get_priority_range (GESContainer * container, guint32 * min_priority,
|
|||
*min_priority = layer->min_gnl_priority;
|
||||
*max_priority = layer->max_gnl_priority;
|
||||
} else {
|
||||
*min_priority = 0;
|
||||
*min_priority = MIN_GNL_PRIO;
|
||||
*max_priority = G_MAXUINT32;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2206,6 +2206,7 @@ trackelement_priority_changed_cb (GESTrackElement * child,
|
|||
GST_ERROR_OBJECT (timeline,
|
||||
"Changing a TrackElement prio, which would not "
|
||||
"land in no layer we are controlling");
|
||||
if (iters->iter_by_layer)
|
||||
g_sequence_remove (iters->iter_by_layer);
|
||||
iters->iter_by_layer = NULL;
|
||||
iters->layer = NULL;
|
||||
|
|
|
@ -460,21 +460,21 @@ GST_START_TEST (test_effects_priorities)
|
|||
fail_unless (ges_container_add (GES_CONTAINER (clip),
|
||||
GES_TIMELINE_ELEMENT (effect2)));
|
||||
|
||||
fail_unless_equals_int (0, _PRIORITY (effect));
|
||||
fail_unless_equals_int (1, _PRIORITY (effect1));
|
||||
fail_unless_equals_int (2, _PRIORITY (effect2));
|
||||
fail_unless_equals_int (MIN_GNL_PRIO + 0, _PRIORITY (effect));
|
||||
fail_unless_equals_int (MIN_GNL_PRIO + 1, _PRIORITY (effect1));
|
||||
fail_unless_equals_int (MIN_GNL_PRIO + 2, _PRIORITY (effect2));
|
||||
|
||||
fail_unless (ges_clip_set_top_effect_priority (clip, GES_BASE_EFFECT (effect),
|
||||
2));
|
||||
fail_unless_equals_int (0, _PRIORITY (effect1));
|
||||
fail_unless_equals_int (1, _PRIORITY (effect2));
|
||||
fail_unless_equals_int (2, _PRIORITY (effect));
|
||||
fail_unless_equals_int (MIN_GNL_PRIO + 0, _PRIORITY (effect1));
|
||||
fail_unless_equals_int (MIN_GNL_PRIO + 1, _PRIORITY (effect2));
|
||||
fail_unless_equals_int (MIN_GNL_PRIO + 2, _PRIORITY (effect));
|
||||
|
||||
fail_unless (ges_clip_set_top_effect_priority (clip, GES_BASE_EFFECT (effect),
|
||||
0));
|
||||
fail_unless_equals_int (0, _PRIORITY (effect));
|
||||
fail_unless_equals_int (1, _PRIORITY (effect1));
|
||||
fail_unless_equals_int (2, _PRIORITY (effect2));
|
||||
fail_unless_equals_int (MIN_GNL_PRIO + 0, _PRIORITY (effect));
|
||||
fail_unless_equals_int (MIN_GNL_PRIO + 1, _PRIORITY (effect1));
|
||||
fail_unless_equals_int (MIN_GNL_PRIO + 2, _PRIORITY (effect2));
|
||||
|
||||
gst_object_unref (timeline);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue