tests/check: Use fake{audio,video}sink
authorPhilippe Normand <philn@igalia.com>
Thu, 20 May 2021 15:47:41 +0000 (16:47 +0100)
committerPhilippe Normand <philn@igalia.com>
Fri, 21 May 2021 13:44:12 +0000 (14:44 +0100)
The tests already depend on -bad, so this should be OK.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/254>

tests/check/ges/test-utils.c
tests/check/meson.build
tests/check/nle/complex.c
tests/check/nle/nlecomposition.c
tests/check/nle/nleoperation.c
tests/check/nle/nlesource.c
tests/check/nle/seek.c
tests/check/nle/simple.c
tests/check/nle/tempochange.c
tests/check/scenarios/check_edit_in_frames_with_framerate_mismatch.scenario
tests/check/scenarios/check_layer_activness_gaps.scenario

index 01953e2..de38ae3 100644 (file)
@@ -67,9 +67,10 @@ ges_test_create_pipeline (GESTimeline * timeline)
   pipeline = ges_pipeline_new ();
   fail_unless (ges_pipeline_set_timeline (pipeline, timeline));
 
-  g_object_set (pipeline, "audio-sink", gst_element_factory_make ("fakesink",
-          "test-audiofakesink"), "video-sink",
-      gst_element_factory_make ("fakesink", "test-videofakesink"), NULL);
+  g_object_set (pipeline, "audio-sink",
+      gst_element_factory_make ("fakeaudiosink", "test-audiofakesink"),
+      "video-sink", gst_element_factory_make ("fakevideosink",
+          "test-videofakesink"), NULL);
 
   return pipeline;
 }
index 9a6ada7..1a00e39 100644 (file)
@@ -112,7 +112,7 @@ if gstvalidate_dep.found()
     endif
 
   endforeach
-  test('simple_playback_test', ges_launch, env: env, args: ['+test-clip', 'blue', 'd=0.1', '--disable-validate', '--videosink=fakevideosink', '--audiosink=fakesink'])
+  test('simple_playback_test', ges_launch, env: env, args: ['+test-clip', 'blue', 'd=0.1', '--disable-validate', '--videosink=fakevideosink', '--audiosink=fakeaudiosink'])
 endif
 
 if build_gir
index f109f51..b7358fb 100644 (file)
@@ -13,7 +13,7 @@ fill_pipeline_and_check (GstElement * comp, GList * segments,
   GList *listcopy = copy_segment_list (segments);
 
   pipeline = gst_pipeline_new ("test_pipeline");
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   fail_if (sink == NULL);
 
   gst_bin_add_many (GST_BIN (pipeline), comp, sink, NULL);
@@ -562,7 +562,7 @@ GST_START_TEST (test_renegotiation)
   ASSERT_OBJECT_REFCOUNT (source3, "source3", 1);
 
 
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakeaudiosink", "sink");
   audioconvert = gst_element_factory_make_or_warn ("audioconvert", "aconv");
 
   gst_bin_add_many (GST_BIN (pipeline), comp, audioconvert, sink, NULL);
index aa840b8..3607ddb 100644 (file)
@@ -53,7 +53,7 @@ GST_START_TEST (test_change_object_start_stop_in_current_stack)
 
   gst_element_set_state (comp, GST_STATE_READY);
 
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   gst_bin_add_many (GST_BIN (pipeline), comp, sink, NULL);
 
   gst_element_link (comp, sink);
@@ -217,7 +217,7 @@ GST_START_TEST (test_remove_last_object)
 
   gst_element_set_state (GST_ELEMENT (composition), GST_STATE_READY);
 
-  fakesink = gst_element_factory_make ("fakesink", NULL);
+  fakesink = gst_element_factory_make ("fakeaudiosink", NULL);
   gst_bin_add_many (GST_BIN (pipeline), GST_ELEMENT (composition), fakesink,
       NULL);
   gst_element_link (GST_ELEMENT (composition), fakesink);
@@ -308,7 +308,7 @@ GST_START_TEST (test_dispose_on_commit)
 
   composition = gst_element_factory_make ("nlecomposition", "composition");
   pipeline = GST_ELEMENT (gst_pipeline_new (NULL));
-  fakesink = gst_element_factory_make ("fakesink", NULL);
+  fakesink = gst_element_factory_make ("fakevideosink", NULL);
 
   nlesource = gst_element_factory_make ("nlesource", "nlesource1");
   audiotestsrc = gst_element_factory_make ("audiotestsrc", "audiotestsrc1");
@@ -352,7 +352,7 @@ GST_START_TEST (test_simple_audiomixer)
 
   composition = gst_element_factory_make ("nlecomposition", "composition");
   gst_element_set_state (composition, GST_STATE_READY);
-  fakesink = gst_element_factory_make ("fakesink", NULL);
+  fakesink = gst_element_factory_make ("fakeaudiosink", NULL);
 
   /* nle_audiomixer */
   nle_audiomixer = gst_element_factory_make ("nleoperation", "nle_audiomixer");
@@ -482,7 +482,7 @@ GST_START_TEST (test_seek_on_nested)
   comp = gst_element_factory_make_or_warn ("nlecomposition", NULL);
 
   gst_element_set_state (comp, GST_STATE_READY);
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   gst_bin_add_many (GST_BIN (pipeline), comp, sink, NULL);
 
   gst_element_link (comp, sink);
@@ -577,7 +577,7 @@ GST_START_TEST (test_error_in_nested_timeline)
   comp = gst_element_factory_make_or_warn ("nlecomposition", NULL);
 
   gst_element_set_state (comp, GST_STATE_READY);
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   gst_bin_add_many (GST_BIN (pipeline), comp, sink, NULL);
 
   gst_element_link (comp, sink);
@@ -663,7 +663,7 @@ GST_START_TEST (test_nest_deep)
   comp = gst_element_factory_make_or_warn ("nlecomposition", NULL);
 
   gst_element_set_state (comp, GST_STATE_READY);
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   gst_bin_add_many (GST_BIN (pipeline), comp, sink, NULL);
 
   gst_element_link (comp, sink);
index 8a425e6..2e8be8b 100644 (file)
@@ -12,7 +12,7 @@ fill_pipeline_and_check (GstElement * comp, GList * segments)
   GList *listcopy = copy_segment_list (segments);
 
   pipeline = gst_pipeline_new ("test_pipeline");
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   fail_if (sink == NULL);
 
   gst_bin_add_many (GST_BIN (pipeline), comp, sink, NULL);
index 102fed8..72aee07 100644 (file)
@@ -24,7 +24,7 @@ GST_START_TEST (test_simple_videotestsrc)
   check_start_stop_duration (nlesource, 1 * GST_SECOND, 2 * GST_SECOND,
       1 * GST_SECOND);
 
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   fail_if (sink == NULL);
 
   gst_bin_add_many (GST_BIN (pipeline), nlesource, sink, NULL);
@@ -124,7 +124,7 @@ GST_START_TEST (test_videotestsrc_in_bin)
   if (nlesource == NULL)
     return;
 
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   fail_if (sink == NULL);
 
   gst_bin_add_many (GST_BIN (pipeline), nlesource, sink, NULL);
index 53d3e17..8bd530c 100644 (file)
@@ -35,7 +35,7 @@ fill_pipeline_and_check (GstElement * comp, GList * segments, GList * seeks)
   GList *ltofree = seeks;
 
   pipeline = gst_pipeline_new ("test_pipeline");
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   fail_if (sink == NULL);
 
   gst_bin_add_many (GST_BIN (pipeline), comp, sink, NULL);
index 040d929..e6cbfe7 100644 (file)
@@ -39,7 +39,7 @@ test_simplest_full (void)
   check_start_stop_duration (comp, 0, 1 * GST_SECOND, 1 * GST_SECOND);
   ASSERT_OBJECT_REFCOUNT (source1, "source1", 1);
 
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   fail_if (sink == NULL);
 
   gst_bin_add_many (GST_BIN (pipeline), comp, sink, NULL);
@@ -256,7 +256,7 @@ test_one_after_other_full (void)
 
   ASSERT_OBJECT_REFCOUNT (source2, "source2", 1);
 
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   fail_if (sink == NULL);
 
   gst_bin_add_many (GST_BIN (pipeline), comp, sink, NULL);
@@ -459,7 +459,7 @@ test_one_under_another_full (void)
   check_start_stop_duration (comp, 0, 3 * GST_SECOND, 3 * GST_SECOND);
   gst_object_unref (source1);
 
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   fail_if (sink == NULL);
 
   gst_bin_add_many (GST_BIN (pipeline), comp, sink, NULL);
@@ -613,7 +613,7 @@ test_one_bin_after_other_full (void)
 
   ASSERT_OBJECT_REFCOUNT (source1, "source1", 1);
 
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakevideosink", "sink");
   fail_if (sink == NULL);
 
   gst_bin_add_many (GST_BIN (pipeline), comp, sink, NULL);
index 7938cb9..e3d8208 100644 (file)
@@ -283,7 +283,7 @@ _setup_test (GstElement * pipeline, gdouble rate)
   gst_element_set_state (comp, GST_STATE_READY);
 
   /* sink */
-  sink = gst_element_factory_make_or_warn ("fakesink", "sink");
+  sink = gst_element_factory_make_or_warn ("fakeaudiosink", "sink");
   gst_bin_add_many (GST_BIN (pipeline), comp, sink, NULL);
 
   gst_element_link (comp, sink);
index a5bc6cc..e5e37ed 100644 (file)
@@ -2,7 +2,7 @@ description, handles-states=true,
     ges-options={\
         --track-types, video,
         --disable-mixing,
-        "--videosink=fakesink"\
+        "--videosink=fakevideosink"\
     }
 
 add-clip, name=clip, asset-id="time-overlay,framerate=120/1", layer-priority=0, type=GESSourceClip, pattern=blue, duration=f240, inpoint=f100
index 05019de..382f516 100644 (file)
@@ -2,7 +2,7 @@ description, handles-states=true,
     ges-options={\
         "--disable-mixing",
         "--videosink=fakevideosink",
-        "--audiosink=fakesink"\
+        "--audiosink=fakeaudiosink"\
     }
 
 add-clip, name=clip, asset-id="framerate=30/1", layer-priority=0, type=GESTestClip, pattern=blue, duration=5000.0