Commit 00fdca0c authored by Stefan Kost's avatar Stefan Kost
Browse files

Fix example apps by drawing in the main-loop.

parent 3c1f1b19
......@@ -93,16 +93,21 @@ draw_spectrum (gfloat * data)
/* process delayed message */
static gboolean
delayed_spectrum_update (GstClock * sync_clock, GstClockTime time,
GstClockID id, gpointer user_data)
delayed_idle_spectrum_update (gpointer user_data)
{
if (!GST_CLOCK_TIME_IS_VALID (time))
goto done;
draw_spectrum ((gfloat *) user_data);
done:
g_free (user_data);
return (FALSE);
}
static gboolean
delayed_spectrum_update (GstClock * sync_clock, GstClockTime time,
GstClockID id, gpointer user_data)
{
if (GST_CLOCK_TIME_IS_VALID (time))
g_idle_add (delayed_idle_spectrum_update, user_data);
else
g_free (user_data);
return (TRUE);
}
......
......@@ -82,16 +82,21 @@ draw_spectrum (gfloat * data)
/* process delayed message */
static gboolean
delayed_spectrum_update (GstClock * sync_clock, GstClockTime time,
GstClockID id, gpointer user_data)
delayed_idle_spectrum_update (gpointer user_data)
{
if (!GST_CLOCK_TIME_IS_VALID (time))
goto done;
draw_spectrum ((gfloat *) user_data);
done:
g_free (user_data);
return (FALSE);
}
static gboolean
delayed_spectrum_update (GstClock * sync_clock, GstClockTime time,
GstClockID id, gpointer user_data)
{
if (GST_CLOCK_TIME_IS_VALID (time))
g_idle_add (delayed_idle_spectrum_update, user_data);
else
g_free (user_data);
return (TRUE);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment