tests/examples/playlist.c: add transitions to playlist example
authorBrandon Lewis <brandon.lewis@collabora.co.uk>
Thu, 27 May 2010 10:06:00 +0000 (12:06 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Wed, 9 Jun 2010 09:28:08 +0000 (11:28 +0200)
tests/examples/playlist.c

index d07ff70..586b4de 100644 (file)
@@ -166,6 +166,19 @@ create_timeline (int nbargs, gchar ** argv)
           arg0, GST_TIME_ARGS (duration));
     }
 
+    else if (!g_strcmp0 ("+transition", source)) {
+      src = GES_TIMELINE_SOURCE (ges_timeline_transition_new_for_nick (arg0));
+
+      if (!src)
+        g_error ("invalid transition type\n");
+
+      g_object_set (G_OBJECT (src), "duration", duration, NULL);
+
+      g_print ("Adding <transition:%s> duration %" GST_TIME_FORMAT "\n",
+          arg0, GST_TIME_ARGS (duration));
+
+    }
+
     else {
       gchar *uri = g_strdup_printf ("file://%s", source);
       guint64 inpoint = atoi (argv[i * 3 + 1]) * GST_SECOND;