2002-10-29 17:45:02 +00:00
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
/* test to make sure that we can do gst_main and gst_main_quit in succession */
|
|
|
|
/* FIXME: use mutexes */
|
|
|
|
|
|
|
|
gboolean mainloop = FALSE;
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
quit_main (gpointer data)
|
|
|
|
{
|
2004-03-13 15:27:01 +00:00
|
|
|
if (mainloop) {
|
|
|
|
mainloop = FALSE;
|
|
|
|
g_print ("-");
|
|
|
|
gst_main_quit ();
|
|
|
|
}
|
|
|
|
return TRUE;
|
2002-10-29 17:45:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2004-03-13 15:27:01 +00:00
|
|
|
main (int argc, gchar * argv[])
|
2002-10-29 17:45:02 +00:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2003-11-04 05:47:28 +00:00
|
|
|
g_timeout_add (1, quit_main, NULL);
|
2004-03-13 15:27:01 +00:00
|
|
|
for (i = 0; i < 1000; ++i) {
|
2002-10-29 17:45:02 +00:00
|
|
|
mainloop = TRUE;
|
|
|
|
g_print ("+");
|
|
|
|
gst_main ();
|
|
|
|
}
|
2003-11-04 05:47:28 +00:00
|
|
|
g_print ("\n");
|
2002-10-29 17:45:02 +00:00
|
|
|
return 0;
|
|
|
|
}
|