mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
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).
This commit is contained in:
parent
8abd61339d
commit
ed86995cd8
1 changed files with 2 additions and 2 deletions
|
@ -310,7 +310,7 @@ sigint_handler_sighandler (int signum)
|
||||||
caught_intr = TRUE;
|
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. */
|
* will set a flag for us. We react to this by posting a message. */
|
||||||
static gboolean
|
static gboolean
|
||||||
check_intr (GstElement * pipeline)
|
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));
|
bus = gst_element_get_bus (GST_ELEMENT (pipeline));
|
||||||
|
|
||||||
#ifndef DISABLE_FAULT_HANDLER
|
#ifndef DISABLE_FAULT_HANDLER
|
||||||
g_timeout_add (50, (GSourceFunc) check_intr, pipeline);
|
g_timeout_add (250, (GSourceFunc) check_intr, pipeline);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
|
|
Loading…
Reference in a new issue