tests: Fix misc issues

Now GST_CAPS_ANY is a singleton, it is not returning a newly created caps
anymore
This commit is contained in:
Thibault Saunier 2012-12-24 09:29:48 -03:00
parent 9f63e6514a
commit e796a2aab2
9 changed files with 24 additions and 24 deletions

View file

@ -25,7 +25,7 @@
/**
* ges_play_sink_convert_frame:
* @playsink: The olaysink to get last frame from
* @playsink: The playsink to get last frame from
* @caps: The caps defining the format the return value will have
*
* Get the last buffer @playsink showed

View file

@ -43,7 +43,7 @@ GST_START_TEST (test_test_source_properties)
ges_init ();
track = ges_track_new (GES_TRACK_TYPE_AUDIO, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_AUDIO, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
object = (GESTimelineObject *)

View file

@ -83,7 +83,7 @@ GST_START_TEST (test_ges_scenario)
/* Give the Timeline a Track */
GST_DEBUG ("Create a Track");
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
GST_DEBUG ("Add the track to the timeline");
@ -203,7 +203,7 @@ GST_START_TEST (test_ges_timeline_add_layer)
fail_unless (layer != NULL);
/* Give the Timeline a Track */
GST_DEBUG ("Create a Track");
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
GST_DEBUG ("Add the track to the timeline");
@ -328,7 +328,7 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
fail_unless (layer != NULL);
/* Give the Timeline a Track */
GST_DEBUG ("Create a Track");
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
/* Create a source and add it to the Layer */
@ -442,7 +442,7 @@ GST_START_TEST (test_ges_timeline_remove_track)
fail_unless (layer != NULL);
/* Give the Timeline a Track */
GST_DEBUG ("Create a Track");
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
/* Create a source and add it to the Layer */

View file

@ -65,7 +65,7 @@ GST_START_TEST (test_layer_properties)
fail_unless (ges_timeline_add_layer (timeline, layer));
fail_if (g_object_is_floating (layer));
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
fail_unless (ges_timeline_add_track (timeline, track));
@ -471,7 +471,7 @@ GST_START_TEST (test_layer_meta_float)
fail_unless (ges_meta_container_get_float (GES_META_CONTAINER (layer),
"ges-test", &result));
assert_equals_int64 (result, 23.456);
assert_equals_float (result, 23.456f);
}
GST_END_TEST;

View file

@ -43,7 +43,7 @@ GST_START_TEST (test_overlay_properties)
ges_init ();
track = ges_track_new (GES_TRACK_TYPE_VIDEO, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_VIDEO, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
object = (GESTimelineObject *)
@ -166,18 +166,18 @@ GST_START_TEST (test_overlay_in_layer)
/* test xpos */
g_object_set (source, "xpos", (gdouble) 0.5, NULL);
g_object_get (source, "xpos", &xpos, NULL);
assert_equals_int (xpos, 0.5);
assert_equals_float (xpos, 0.5);
xpos = ges_track_text_overlay_get_xpos (GES_TRACK_TEXT_OVERLAY (trobj));
assert_equals_int (xpos, 0.5);
assert_equals_float (xpos, 0.5);
/* test ypos */
g_object_set (source, "ypos", (gdouble) 0.33, NULL);
g_object_get (source, "ypos", &ypos, NULL);
assert_equals_int (ypos, 0.33);
assert_equals_float (ypos, 0.33);
ypos = ges_track_text_overlay_get_ypos (GES_TRACK_TEXT_OVERLAY (trobj));
assert_equals_int (ypos, 0.33);
assert_equals_float (ypos, 0.33);
GST_DEBUG ("removing the source");

View file

@ -76,7 +76,7 @@ GST_START_TEST (test_gsl_add)
timeline = ges_timeline_new ();
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
fail_unless (ges_timeline_add_layer (timeline, layer));
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
fail_unless (ges_timeline_add_track (timeline, track));
source = ges_custom_timeline_source_new (my_fill_track_func, NULL);

View file

@ -62,7 +62,7 @@ GST_START_TEST (test_basic_timeline_edition)
ges_init ();
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
timeline = ges_timeline_new ();
@ -262,7 +262,7 @@ GST_START_TEST (test_snapping)
ges_init ();
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
timeline = ges_timeline_new ();
@ -502,7 +502,7 @@ GST_START_TEST (test_timeline_edition_mode)
ges_init ();
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
timeline = ges_timeline_new ();

View file

@ -47,7 +47,7 @@ GST_START_TEST (test_object_properties)
ges_init ();
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
object =
@ -115,7 +115,7 @@ GST_START_TEST (test_object_properties_unlocked)
ges_init ();
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
object =
@ -189,7 +189,7 @@ GST_START_TEST (test_split_object)
ges_init ();
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, GST_CAPS_ANY);
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
fail_unless (track != NULL);
object =

View file

@ -168,18 +168,18 @@ GST_START_TEST (test_title_source_in_layer)
/* test xpos */
g_object_set (source, "xpos", (gdouble) 0.25, NULL);
g_object_get (source, "xpos", &xpos, NULL);
assert_equals_int (xpos, 0.25);
assert_equals_float (xpos, 0.25);
xpos = ges_track_title_source_get_xpos (GES_TRACK_TITLE_SOURCE (trobj));
assert_equals_int (xpos, 0.25);
assert_equals_float (xpos, 0.25);
/* test ypos */
g_object_set (source, "ypos", (gdouble) 0.66, NULL);
g_object_get (source, "ypos", &ypos, NULL);
assert_equals_int (ypos, 0.66);
assert_equals_float (ypos, 0.66);
xpos = ges_track_title_source_get_xpos (GES_TRACK_TITLE_SOURCE (trobj));
assert_equals_int (ypos, 0.66);
assert_equals_float (ypos, 0.66);
GST_DEBUG ("removing the source");