tests: use playbin, not playbin2
authorJonathan Matthew <jonathan@d14n.org>
Thu, 26 Jan 2012 09:35:51 +0000 (10:35 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 30 Jan 2012 08:57:47 +0000 (09:57 +0100)
tests/icles/playback/test7.c
tests/icles/playbin-text.c
tests/icles/position-formats.c
tests/icles/stress-playbin.c

index 6dc984a..94218c3 100644 (file)
@@ -139,7 +139,7 @@ main (gint argc, gchar * argv[])
     exit (-1);
   }
 
-  player = gst_element_factory_make ("playbin2", "player");
+  player = gst_element_factory_make ("playbin", "player");
   g_assert (player);
 
   bus = gst_pipeline_get_bus (GST_PIPELINE (player));
index a0d4f82..edf0a96 100644 (file)
@@ -134,7 +134,7 @@ main (int argc, char *argv[])
   /* create a mainloop to get messages */
   app->loop = g_main_loop_new (NULL, TRUE);
 
-  app->playbin = gst_element_factory_make ("playbin2", NULL);
+  app->playbin = gst_element_factory_make ("playbin", NULL);
   g_assert (app->playbin);
 
   /* set appsink to get the subtitles */
index 774d288..3530f53 100644 (file)
@@ -115,9 +115,9 @@ main (gint argc, gchar ** argv)
   uri = argv[1];
 
   /* build pipeline */
-  bin = gst_element_factory_make ("playbin2", NULL);
+  bin = gst_element_factory_make ("playbin", NULL);
   if (!bin) {
-    GST_WARNING ("need playbin2 from gst-plugins-base");
+    GST_WARNING ("need playbin from gst-plugins-base");
     goto Error;
   }
 
index b4471af..24498f9 100644 (file)
@@ -5,14 +5,14 @@
 #define TEST_RUNTIME 120.0      /* how long to run the test, in seconds */
 
 static void
-play_file (const gchar * bin, const gint delay, const gchar * uri)
+play_file (const gint delay, const gchar * uri)
 {
   GstStateChangeReturn sret;
   GstMessage *msg;
   GstElement *play;
   guint wait_nanosecs;
 
-  play = gst_element_factory_make (bin, "playbin");
+  play = gst_element_factory_make ("playbin", "playbin");
 
   g_object_set (play, "uri", uri, NULL);
   g_printerr ("Playing %s\n", uri);
@@ -88,11 +88,9 @@ main (int argc, char **argv)
   gchar **args = NULL;
   guint num, i;
   GError *err = NULL;
-  gchar *bin = NULL;
   gint run = 100;
   GOptionContext *ctx;
   GOptionEntry options[] = {
-    {"bin", '\000', 0, G_OPTION_ARG_STRING, &bin, "playbin factory name", NULL},
     {"runtime", '\000', 0, G_OPTION_ARG_INT, &run, "maximum play time (ms)",
         NULL},
     {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &args, NULL},
@@ -109,13 +107,6 @@ main (int argc, char **argv)
   }
   g_option_context_free (ctx);
 
-  if (!bin)
-    bin = g_strdup ("playbin");
-
-  if (strcmp (bin, "playbin") && strcmp (bin, "playbin2")) {
-    g_print ("Please provide a valid playbin argument; playbin | playbin2");
-    return 1;
-  }
   if (args == NULL || *args == NULL) {
     g_print ("Please provide one or more directories with audio files\n\n");
     return 1;
@@ -143,11 +134,10 @@ main (int argc, char **argv)
     gint32 idx;
 
     idx = g_random_int_range (0, files->len);
-    play_file (bin, run, (const gchar *) g_ptr_array_index (files, idx));
+    play_file (run, (const gchar *) g_ptr_array_index (files, idx));
   }
 
   g_strfreev (args);
-  g_free (bin);
   g_timer_destroy (timer);
 
   return 0;