Reverted to the old g_idle loop. too many problems with xvideosink and the GtkWindow...
authorWim Taymans <wim.taymans@gmail.com>
Mon, 23 Jul 2001 00:57:06 +0000 (00:57 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Mon, 23 Jul 2001 00:57:06 +0000 (00:57 +0000)
Original commit message from CVS:
Reverted to the old g_idle loop. too many problems with xvideosink and
the GtkWindow when we don't have an idle loop..

tools/gstreamer-launch.c

index c576d24..af7a494 100644 (file)
@@ -58,6 +58,12 @@ arg_search (GstBin *bin, gchar *argname, found_handler handler, void *priv)
   g_free(ccargname);
 }
 
+gboolean
+idle_func (gpointer data)
+{
+  return gst_bin_iterate (GST_BIN (data));
+}
+
 void 
 handle_have_size (GstElement *element,int width,int height) 
 {
@@ -151,7 +157,12 @@ main(int argc, char *argv[])
     fprintf(stderr,"RUNNING pipeline\n");
     gst_element_set_state (pipeline, GST_STATE_PLAYING);
 
-    while (gst_bin_iterate (GST_BIN (pipeline)));
+    g_idle_add(idle_func,pipeline);
+#ifdef USE_GLIB2
+    g_main_loop_run (g_main_loop_new (NULL, FALSE));
+#else
+    gtk_main();
+#endif
 
     gst_element_set_state (pipeline, GST_STATE_NULL);
   }