[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.16-test6-16-g5df842d
Lennart Poettering
gitmailer-noreply at 0pointer.de
Wed Aug 26 16:47:45 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 44b798237a62707ec5f8b1fd70bb7e6f7efc509c (commit)
- Log -----------------------------------------------------------------
5df842d sink-input: extend comments on rewinding logic a bit
c372b52 protocol-native: print more volume change debug messages to easy tracking down of feedback loops
cab48d4 protocol-native: compare uint64_t variable with (uint64_t) -1 instead of (size_t) -1 for compat with 32bit archs
-----------------------------------------------------------------------
Summary of changes:
src/modules/module-stream-restore.c | 4 ++++
src/pulsecore/protocol-native.c | 29 ++++++++++++++++++++++-------
src/pulsecore/protocol-native.h | 2 +-
src/pulsecore/sink-input.c | 22 +++++++++++++++-------
src/pulsecore/sink-input.h | 2 +-
5 files changed, 43 insertions(+), 16 deletions(-)
-----------------------------------------------------------------------
commit cab48d48d12b26ef5651a5dc829fc7296395ef0a
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Aug 27 00:04:33 2009 +0200
protocol-native: compare uint64_t variable with (uint64_t) -1 instead of (size_t) -1 for compat with 32bit archs
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 6678d84..98ff407 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -1289,7 +1289,8 @@ static void handle_seek(playback_stream *s, int64_t indexw) {
pa_log_debug("Requesting rewind due to end of underrun.");
pa_sink_input_request_rewind(s->sink_input,
- (size_t) (s->sink_input->thread_info.underrun_for == (size_t) -1 ? 0 : s->sink_input->thread_info.underrun_for),
+ (size_t) (s->sink_input->thread_info.underrun_for == (uint64_t) -1 ? 0 :
+ s->sink_input->thread_info.underrun_for),
FALSE, TRUE, FALSE);
}
commit c372b52a77b20b454c49d5368a7d1afbc1a23188
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Aug 27 00:05:54 2009 +0200
protocol-native: print more volume change debug messages to easy tracking down of feedback loops
diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index e560bd2..d6e3c15 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -934,6 +934,10 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
data.data = &entry;
data.size = sizeof(entry);
+ pa_log_debug("Client %s changes entry %s.",
+ pa_strnull(pa_proplist_gets(pa_native_connection_get_client(c)->proplist, PA_PROP_APPLICATION_PROCESS_BINARY)),
+ name);
+
if (pa_database_set(u->database, &key, &data, mode == PA_UPDATE_REPLACE) == 0)
if (apply_immediately)
apply_entry(u, name, &entry);
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 98ff407..956767a 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -3386,10 +3386,10 @@ static void command_set_volume(
pa_log_debug("Client %s changes volume of sink %s.", client_name, sink->name);
pa_sink_set_volume(sink, &volume, TRUE, TRUE);
} else if (source) {
- pa_log_debug("Client %s changes volume of sink %s.", client_name, source->name);
+ pa_log_debug("Client %s changes volume of source %s.", client_name, source->name);
pa_source_set_volume(source, &volume, TRUE);
} else if (si) {
- pa_log_debug("Client %s changes volume of sink %s.",
+ pa_log_debug("Client %s changes volume of sink input %s.",
client_name,
pa_strnull(pa_proplist_gets(si->proplist, PA_PROP_MEDIA_NAME)));
pa_sink_input_set_volume(si, &volume, TRUE, TRUE);
@@ -3411,7 +3411,7 @@ static void command_set_mute(
pa_sink *sink = NULL;
pa_source *source = NULL;
pa_sink_input *si = NULL;
- const char *name = NULL;
+ const char *name = NULL, *client_name;
pa_native_connection_assert_ref(c);
pa_assert(t);
@@ -3460,12 +3460,20 @@ static void command_set_mute(
CHECK_VALIDITY(c->pstream, si || sink || source, tag, PA_ERR_NOENTITY);
- if (sink)
+ client_name = pa_strnull(pa_proplist_gets(c->client->proplist, PA_PROP_APPLICATION_PROCESS_BINARY));
+
+ if (sink) {
+ pa_log_debug("Client %s changes mute of sink %s.", client_name, sink->name);
pa_sink_set_mute(sink, mute, TRUE);
- else if (source)
+ } else if (source) {
+ pa_log_debug("Client %s changes mute of source %s.", client_name, source->name);
pa_source_set_mute(source, mute, TRUE);
- else if (si)
+ } else if (si) {
+ pa_log_debug("Client %s changes mute of sink input %s.",
+ client_name,
+ pa_strnull(pa_proplist_gets(si->proplist, PA_PROP_MEDIA_NAME)));
pa_sink_input_set_mute(si, mute, TRUE);
+ }
pa_pstream_send_simple_ack(c->pstream, tag);
}
@@ -4843,3 +4851,9 @@ pa_pstream* pa_native_connection_get_pstream(pa_native_connection *c) {
return c->pstream;
}
+
+pa_client* pa_native_connection_get_client(pa_native_connection *c) {
+ pa_native_connection_assert_ref(c);
+
+ return c->client;
+}
diff --git a/src/pulsecore/protocol-native.h b/src/pulsecore/protocol-native.h
index 8a8d601..9712627 100644
--- a/src/pulsecore/protocol-native.h
+++ b/src/pulsecore/protocol-native.h
@@ -47,7 +47,6 @@ typedef struct pa_native_options {
char *auth_group;
pa_ip_acl *auth_ip_acl;
pa_auth_cookie *auth_cookie;
-
} pa_native_options;
typedef enum pa_native_hook {
@@ -80,6 +79,7 @@ int pa_native_protocol_install_ext(pa_native_protocol *p, pa_module *m, pa_nativ
void pa_native_protocol_remove_ext(pa_native_protocol *p, pa_module *m);
pa_pstream* pa_native_connection_get_pstream(pa_native_connection *c);
+pa_client* pa_native_connection_get_client(pa_native_connection *c);
pa_native_options* pa_native_options_new(void);
pa_native_options* pa_native_options_ref(pa_native_options *o);
commit 5df842db648d876192569e3aa6e0beace1a7ac5c
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Aug 27 00:07:15 2009 +0200
sink-input: extend comments on rewinding logic a bit
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 0ad95e6..484421b 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -1472,7 +1472,13 @@ pa_bool_t pa_sink_input_safe_to_remove(pa_sink_input *i) {
}
/* Called from IO context */
-void pa_sink_input_request_rewind(pa_sink_input *i, size_t nbytes /* in our sample spec */, pa_bool_t rewrite, pa_bool_t flush, pa_bool_t dont_rewind_render) {
+void pa_sink_input_request_rewind(
+ pa_sink_input *i,
+ size_t nbytes /* in our sample spec */,
+ pa_bool_t rewrite,
+ pa_bool_t flush,
+ pa_bool_t dont_rewind_render) {
+
size_t lbq;
/* If 'rewrite' is TRUE the sink is rewound as far as requested
@@ -1487,19 +1493,20 @@ void pa_sink_input_request_rewind(pa_sink_input *i, size_t nbytes /* in our sam
* dont_rewind_render is TRUE then the render memblockq is not
* rewound. */
+ /* nbytes = 0 means maximum rewind request */
+
pa_sink_input_assert_ref(i);
pa_sink_input_assert_io_context(i);
-
- nbytes = PA_MAX(i->thread_info.rewrite_nbytes, nbytes);
-
-/* pa_log_debug("request rewrite %lu", (unsigned long) nbytes); */
+ pa_assert(rewrite || flush);
+ pa_assert(!dont_rewind_render || !rewrite);
/* We don't take rewind requests while we are corked */
if (i->thread_info.state == PA_SINK_INPUT_CORKED)
return;
- pa_assert(rewrite || flush);
- pa_assert(!dont_rewind_render || !rewrite);
+ nbytes = PA_MAX(i->thread_info.rewrite_nbytes, nbytes);
+
+ /* pa_log_debug("request rewrite %zu", nbytes); */
/* Calculate how much we can rewind locally without having to
* touch the sink */
@@ -1519,6 +1526,7 @@ void pa_sink_input_request_rewind(pa_sink_input *i, size_t nbytes /* in our sam
nbytes = pa_resampler_request(i->thread_info.resampler, nbytes);
}
+ /* Remember how much we actually want to rewrite */
if (i->thread_info.rewrite_nbytes != (size_t) -1) {
if (rewrite) {
/* Make sure to not overwrite over underruns */
diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h
index fe6cf75..06e9e4f 100644
--- a/src/pulsecore/sink-input.h
+++ b/src/pulsecore/sink-input.h
@@ -212,7 +212,7 @@ struct pa_sink_input {
pa_bool_t attached:1; /* True only between ->attach() and ->detach() calls */
- /* 0: rewrite nothing, (size_t) -1: rewrite everything, otherwise how many bytes to rewrite */
+ /* rewrite_nbytes: 0: rewrite nothing, (size_t) -1: rewrite everything, otherwise how many bytes to rewrite */
pa_bool_t rewrite_flush:1, dont_rewind_render:1;
size_t rewrite_nbytes;
uint64_t underrun_for, playing_for;
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list