From 844ce696509cde0c4aae0d5947ee68f2c22943f8 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 23 Jul 2015 11:39:04 +0200 Subject: [PATCH] tests: Do not use gst-structured-interface in the tests It breaks $ make distcheck --- tests/check/Makefile.am | 2 +- tests/check/ges/clip.c | 30 ++++++++++++++---------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index 7e19d91fae..4003fc1a7d 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -20,7 +20,7 @@ testutils_noisnt_libraries=libtestutils.la testutils_noinst_headers=ges/test-utils.h nle/common.h libtestutils_la_LIBADD=$(common_ldadd) libtestutils_la_CFLAGS=$(common_cflags) -libtestutils_la_SOURCES=ges/test-utils.c nle/common.c ../../ges/ges-structured-interface.c +libtestutils_la_SOURCES=ges/test-utils.c nle/common.c SUPPRESSIONS = $(top_srcdir)/common/gst.supp # $(srcdir)/gst-plugins-bad.supp diff --git a/tests/check/ges/clip.c b/tests/check/ges/clip.c index a547105c7d..7794565cd5 100644 --- a/tests/check/ges/clip.c +++ b/tests/check/ges/clip.c @@ -109,25 +109,24 @@ GST_START_TEST (test_split_direct_bindings) GstControlSource *source; GESTimeline *timeline; GESClip *clip, *splitclip; - GError *error = NULL; GstControlBinding *binding = NULL, *splitbinding; GstTimedValueControlSource *splitsource; + GESLayer *layer; + GESAsset *asset; GESTrackElement *element; ges_init (); fail_unless ((timeline = ges_timeline_new ())); + fail_unless ((layer = ges_layer_new ())); fail_unless (ges_timeline_add_track (timeline, GES_TRACK (ges_video_track_new ()))); + fail_unless (ges_timeline_add_layer (timeline, layer)); - _ges_add_clip_from_struct (timeline, - gst_structure_from_string - ("clip, asset-id=GESTestClip, name=ref_clip, layer=0, type=GESTestClip, inpoint=10.0, start=0.0, duration=10.0", - NULL), &error); - g_assert_no_error (error); - - clip = GES_CLIP (ges_timeline_get_element (timeline, "ref_clip")); + asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL); + clip = ges_layer_add_asset (layer, asset, 0, 10 * GST_SECOND, 10 * GST_SECOND, + GES_TRACK_TYPE_UNKNOWN); CHECK_OBJECT_PROPS (clip, 0 * GST_SECOND, 10 * GST_SECOND, 10 * GST_SECOND); assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip)), 1); @@ -196,25 +195,24 @@ GST_START_TEST (test_split_direct_absolute_bindings) GstControlSource *source; GESTimeline *timeline; GESClip *clip, *splitclip; - GError *error = NULL; GstControlBinding *binding = NULL, *splitbinding; GstTimedValueControlSource *splitsource; + GESLayer *layer; + GESAsset *asset; GESTrackElement *element; ges_init (); fail_unless ((timeline = ges_timeline_new ())); + fail_unless ((layer = ges_layer_new ())); fail_unless (ges_timeline_add_track (timeline, GES_TRACK (ges_video_track_new ()))); + fail_unless (ges_timeline_add_layer (timeline, layer)); - _ges_add_clip_from_struct (timeline, - gst_structure_from_string - ("clip, asset-id=GESTestClip, name=ref_clip, layer=0, type=GESTestClip, inpoint=10.0, start=0.0, duration=10.0", - NULL), &error); - g_assert_no_error (error); - - clip = GES_CLIP (ges_timeline_get_element (timeline, "ref_clip")); + asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL); + clip = ges_layer_add_asset (layer, asset, 0, 10 * GST_SECOND, 10 * GST_SECOND, + GES_TRACK_TYPE_UNKNOWN); CHECK_OBJECT_PROPS (clip, 0 * GST_SECOND, 10 * GST_SECOND, 10 * GST_SECOND); assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip)), 1);