mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-04 16:39:39 +00:00
b60d8fe04c
Original commit message from CVS: mainloop test and some caps fixes that had to go in
33 lines
489 B
C
33 lines
489 B
C
#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)
|
|
{
|
|
if (mainloop)
|
|
{
|
|
mainloop = FALSE;
|
|
g_print ("-");
|
|
gst_main_quit ();
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
int
|
|
main (int argc, gchar *argv[])
|
|
{
|
|
int i;
|
|
|
|
g_timeout_add (10, quit_main, NULL);
|
|
for (i = 0; i < 1000; ++i)
|
|
{
|
|
mainloop = TRUE;
|
|
g_print ("+");
|
|
gst_main ();
|
|
}
|
|
return 0;
|
|
}
|