Reverted to the old g_idle loop. too many problems with xvideosink and the GtkWindow when we don't have an idle loop..

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..
This commit is contained in:
Wim Taymans 2001-07-23 00:57:06 +00:00
parent 176552ee40
commit 3f1fe95677

View 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);
}