[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-98-g86caf45
Lennart Poettering
gitmailer-noreply at 0pointer.de
Mon May 11 16:35:02 PDT 2009
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from a7a7358fb32e0e2b7c21dfa76ff993253994d488 (commit)
- Log -----------------------------------------------------------------
86caf45 context: don't fail if session bus is not there
4c3aef3 suspend-on-idle: add per-device timeout property
-----------------------------------------------------------------------
Summary of changes:
src/modules/module-suspend-on-idle.c | 16 +++++++++++++---
src/pulse/context.c | 6 +++---
2 files changed, 16 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
commit 4c3aef367ba344eccdab5f7f25ec656816c78403
Author: Marc-André Lureau <marc-andre.lureau at nokia.com>
Date: Tue May 12 01:48:05 2009 +0300
suspend-on-idle: add per-device timeout property
diff --git a/src/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c
index 7e17f8f..cc69d74 100644
--- a/src/modules/module-suspend-on-idle.c
+++ b/src/modules/module-suspend-on-idle.c
@@ -27,6 +27,7 @@
#include <pulse/timeval.h>
#include <pulsecore/core.h>
+#include <pulsecore/core-util.h>
#include <pulsecore/sink-input.h>
#include <pulsecore/source-output.h>
#include <pulsecore/modargs.h>
@@ -98,17 +99,26 @@ static void timeout_cb(pa_mainloop_api*a, pa_time_event* e, const struct timeval
static void restart(struct device_info *d) {
struct timeval tv;
+ const char *s;
+ uint32_t timeout;
pa_assert(d);
+ pa_assert(d->sink || d->source);
pa_gettimeofday(&tv);
d->last_use = tv;
- pa_timeval_add(&tv, d->userdata->timeout*1000000);
+
+ s = pa_proplist_gets(d->sink ? d->sink->proplist : d->source->proplist, "module-suspend-on-idle.timeout");
+ if (!s || pa_atou(s, &timeout) < 0)
+ timeout = d->userdata->timeout;
+
+ pa_timeval_add(&tv, timeout * PA_USEC_PER_SEC);
+
d->userdata->core->mainloop->time_restart(d->time_event, &tv);
if (d->sink)
- pa_log_debug("Sink %s becomes idle.", d->sink->name);
+ pa_log_debug("Sink %s becomes idle, timeout in %u seconds.", d->sink->name, timeout);
if (d->source)
- pa_log_debug("Source %s becomes idle.", d->source->name);
+ pa_log_debug("Source %s becomes idle, timeout in %u seconds.", d->source->name, timeout);
}
static void resume(struct device_info *d) {
commit 86caf4520fe3ffb899110711ff0d8a8b8122368e
Author: Marc-André Lureau <marc-andre.lureau at nokia.com>
Date: Tue May 12 01:39:55 2009 +0300
context: don't fail if session bus is not there
Also invert the order of bus tracking since we expect session_bus to
be present when we check for it. Although that should not change
anything in practise.
diff --git a/src/pulse/context.c b/src/pulse/context.c
index bfff0e1..3b7bf08 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -811,10 +811,10 @@ static int try_next_connection(pa_context *c) {
#ifdef HAVE_DBUS
if (c->no_fail && !c->server_specified) {
- if (!c->system_bus)
- track_pulseaudio_on_dbus(c, DBUS_BUS_SYSTEM, &c->system_bus);
if (!c->session_bus)
track_pulseaudio_on_dbus(c, DBUS_BUS_SESSION, &c->session_bus);
+ if (!c->system_bus)
+ track_pulseaudio_on_dbus(c, DBUS_BUS_SYSTEM, &c->system_bus);
} else
#endif
pa_context_fail(c, PA_ERR_CONNECTIONREFUSED);
@@ -892,7 +892,7 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, vo
/* FIXME: We probably should check if this is actually the NameOwnerChanged we were looking for */
- is_session = bus == pa_dbus_wrap_connection_get(c->session_bus);
+ is_session = c->session_bus && bus == pa_dbus_wrap_connection_get(c->session_bus);
pa_log_debug("Rock!! PulseAudio is back on %s bus", is_session ? "session" : "system");
if (is_session)
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list