From 0d095ed5efc71f890a7e90828309b38fd0949f11 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 9 Jul 2004 14:33:15 +0000 Subject: [PATCH] examples/seeking/seek.c: Don't consume all CPU in the idle loop. Original commit message from CVS: * examples/seeking/seek.c: (iterate): Don't consume all CPU in the idle loop. --- ChangeLog | 5 +++++ examples/seeking/seek.c | 1 + tests/examples/seek/seek.c | 1 + 3 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5155b78f6a..242642f43d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-07-09 Wim Taymans + + * examples/seeking/seek.c: (iterate): + Don't consume all CPU in the idle loop. + 2004-07-09 Wim Taymans * gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_new_output_pad), diff --git a/examples/seeking/seek.c b/examples/seeking/seek.c index fed6b7f98e..3cd64cdfab 100644 --- a/examples/seeking/seek.c +++ b/examples/seeking/seek.c @@ -805,6 +805,7 @@ iterate (gpointer data) if (!GST_FLAG_IS_SET (GST_OBJECT (data), GST_BIN_SELF_SCHEDULABLE)) { res = gst_bin_iterate (GST_BIN (data)); } else { + g_usleep (500); res = gst_element_get_state (GST_ELEMENT (data)) == GST_STATE_PLAYING; } diff --git a/tests/examples/seek/seek.c b/tests/examples/seek/seek.c index fed6b7f98e..3cd64cdfab 100644 --- a/tests/examples/seek/seek.c +++ b/tests/examples/seek/seek.c @@ -805,6 +805,7 @@ iterate (gpointer data) if (!GST_FLAG_IS_SET (GST_OBJECT (data), GST_BIN_SELF_SCHEDULABLE)) { res = gst_bin_iterate (GST_BIN (data)); } else { + g_usleep (500); res = gst_element_get_state (GST_ELEMENT (data)) == GST_STATE_PLAYING; }