mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
tests/check/ges/{simplelayer.c,transition.c}: update unit tests
This commit is contained in:
parent
67c33dc65b
commit
a5759af64b
2 changed files with 17 additions and 15 deletions
|
@ -216,23 +216,23 @@ GST_START_TEST (test_gsl_with_transitions)
|
|||
#define HALF_SECOND ((guint64) (0.5 * GST_SECOND))
|
||||
#define SECOND(a) ((guint64) (a * GST_SECOND))
|
||||
|
||||
tr1 = ges_timeline_transition_new (0);
|
||||
tr1 = ges_timeline_transition_new (VTYPE_CROSSFADE);
|
||||
g_object_set (tr1, "duration", HALF_SECOND, "start", (guint64) 42, NULL);
|
||||
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr1), HALF_SECOND);
|
||||
|
||||
tr2 = ges_timeline_transition_new (0);
|
||||
tr2 = ges_timeline_transition_new (VTYPE_CROSSFADE);
|
||||
g_object_set (tr2, "duration", HALF_SECOND, "start", (guint64) 42, NULL);
|
||||
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr2), HALF_SECOND);
|
||||
|
||||
tr3 = ges_timeline_transition_new (0);
|
||||
tr3 = ges_timeline_transition_new (VTYPE_CROSSFADE);
|
||||
g_object_set (tr3, "duration", HALF_SECOND, "start", (guint64) 42, NULL);
|
||||
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr3), HALF_SECOND);
|
||||
|
||||
tr4 = ges_timeline_transition_new (0);
|
||||
tr4 = ges_timeline_transition_new (VTYPE_CROSSFADE);
|
||||
g_object_set (tr4, "duration", HALF_SECOND, "start", (guint64) 42, NULL);
|
||||
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr4), HALF_SECOND);
|
||||
|
||||
tr5 = ges_timeline_transition_new (0);
|
||||
tr5 = ges_timeline_transition_new (VTYPE_CROSSFADE);
|
||||
g_object_set (tr5, "duration", HALF_SECOND, "start", (guint64) 42, NULL);
|
||||
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr5), HALF_SECOND);
|
||||
|
||||
|
|
|
@ -37,9 +37,9 @@ GST_START_TEST (test_transition_basic)
|
|||
track = ges_track_video_raw_new ();
|
||||
fail_unless (track != 0);
|
||||
|
||||
tr1 = ges_timeline_transition_new (0);
|
||||
tr1 = ges_timeline_transition_new (VTYPE_CROSSFADE);
|
||||
fail_unless (tr1 != 0);
|
||||
fail_unless (tr1->vtype == 0);
|
||||
fail_unless (tr1->vtype == VTYPE_CROSSFADE);
|
||||
|
||||
tr2 = ges_timeline_transition_new_for_nick ("bar-wipe-lr");
|
||||
fail_unless (tr2 != 0);
|
||||
|
@ -50,7 +50,7 @@ GST_START_TEST (test_transition_basic)
|
|||
ges_timeline_object_create_track_object (GES_TIMELINE_OBJECT (tr2),
|
||||
track);
|
||||
|
||||
fail_unless (trackobject != 0);
|
||||
fail_unless (trackobject != NULL);
|
||||
fail_unless (GES_TRACK_TRANSITION (trackobject)->vtype == 1);
|
||||
|
||||
g_object_unref (trackobject);
|
||||
|
@ -84,7 +84,7 @@ GST_START_TEST (test_transition_properties)
|
|||
|
||||
ges_init ();
|
||||
|
||||
object = GES_TIMELINE_OBJECT (ges_timeline_transition_new (0));
|
||||
object = GES_TIMELINE_OBJECT (ges_timeline_transition_new (VTYPE_CROSSFADE));
|
||||
|
||||
track = ges_track_video_raw_new ();
|
||||
fail_unless (track != NULL);
|
||||
|
@ -130,18 +130,20 @@ GST_START_TEST (test_transition_properties)
|
|||
|
||||
/* test changing vtype */
|
||||
|
||||
g_object_set (object, "vtype", 0, NULL);
|
||||
assert_equals_int (GES_TIMELINE_TRANSITION (object)->vtype, 0);
|
||||
assert_equals_int (GES_TRACK_TRANSITION (trackobject)->vtype, 0);
|
||||
g_object_set (object, "vtype", VTYPE_CROSSFADE, NULL);
|
||||
assert_equals_int (GES_TIMELINE_TRANSITION (object)->vtype, VTYPE_CROSSFADE);
|
||||
assert_equals_int (GES_TRACK_TRANSITION (trackobject)->vtype,
|
||||
VTYPE_CROSSFADE);
|
||||
g_object_set (object, "vtype", 1, NULL);
|
||||
assert_equals_int (GES_TIMELINE_TRANSITION (object)->vtype, 1);
|
||||
assert_equals_int (GES_TRACK_TRANSITION (trackobject)->vtype, 1);
|
||||
g_object_set (object, "vtype", 8, NULL);
|
||||
assert_equals_int (GES_TIMELINE_TRANSITION (object)->vtype, 8);
|
||||
assert_equals_int (GES_TRACK_TRANSITION (trackobject)->vtype, 8);
|
||||
g_object_set (object, "vtype", 0, NULL);
|
||||
assert_equals_int (GES_TIMELINE_TRANSITION (object)->vtype, 0);
|
||||
assert_equals_int (GES_TRACK_TRANSITION (trackobject)->vtype, 0);
|
||||
g_object_set (object, "vtype", VTYPE_CROSSFADE, NULL);
|
||||
assert_equals_int (GES_TIMELINE_TRANSITION (object)->vtype, VTYPE_CROSSFADE);
|
||||
assert_equals_int (GES_TRACK_TRANSITION (trackobject)->vtype,
|
||||
VTYPE_CROSSFADE);
|
||||
|
||||
ges_timeline_object_release_track_object (object, trackobject);
|
||||
|
||||
|
|
Loading…
Reference in a new issue