[gst-cvs] gstreamer: gst-launch: wake up less often to check if we' ve been interrupted

Tim Mueller tpm at kemper.freedesktop.org
Sat Nov 7 12:30:09 PST 2009


Module: gstreamer
Branch: master
Commit: ed86995cd80e390e6e4e0f78350b386b1d7797d5
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=ed86995cd80e390e6e4e0f78350b386b1d7797d5

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Sat Nov  7 20:22:49 2009 +0000

gst-launch: wake up less often to check if we've been interrupted

Check if we've been interrupted only four times per second instead
of twenty times per second, to wake up the cpu less often and
save power (see bug #600922).

---

 tools/gst-launch.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/gst-launch.c b/tools/gst-launch.c
index 6cc2a4e..4d833c4 100644
--- a/tools/gst-launch.c
+++ b/tools/gst-launch.c
@@ -310,7 +310,7 @@ sigint_handler_sighandler (int signum)
   caught_intr = TRUE;
 }
 
-/* is called every 50 milliseconds (20 times a second), the interrupt handler
+/* is called every 250 milliseconds (4 times a second), the interrupt handler
  * will set a flag for us. We react to this by posting a message. */
 static gboolean
 check_intr (GstElement * pipeline)
@@ -395,7 +395,7 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state)
   bus = gst_element_get_bus (GST_ELEMENT (pipeline));
 
 #ifndef DISABLE_FAULT_HANDLER
-  g_timeout_add (50, (GSourceFunc) check_intr, pipeline);
+  g_timeout_add (250, (GSourceFunc) check_intr, pipeline);
 #endif
 
   while (TRUE) {





More information about the Gstreamer-commits mailing list