summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2015-07-23 11:39:04 +0200
committerThibault Saunier <tsaunier@gnome.org>2015-07-23 12:28:14 +0200
commit844ce696509cde0c4aae0d5947ee68f2c22943f8 (patch)
tree1a9ea99c31a34ca6614e6f9395c9a0bedb64f32c
parent84d3f8056c8c125ddb42285a601f537275883d88 (diff)
tests: Do not use gst-structured-interface in the tests
It breaks $ make distcheck
-rw-r--r--tests/check/Makefile.am2
-rw-r--r--tests/check/ges/clip.c30
2 files changed, 15 insertions, 17 deletions
diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
index 7e19d91f..4003fc1a 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 a547105c..7794565c 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);