[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, stable-queue, updated. v0.9.21-66-ga7c1778
Colin Guthrie
gitmailer-noreply at 0pointer.de
Wed Mar 17 09:50:41 PDT 2010
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 stable-queue branch has been updated
from e756467434f787d392c45aac1327768bcf0b610c (commit)
- Log -----------------------------------------------------------------
a7c1778 intended-roles: Do not pick monitor sources when doing automatic role-based device selection
-----------------------------------------------------------------------
Summary of changes:
src/modules/module-intended-roles.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
-----------------------------------------------------------------------
commit a7c1778a68a058686dc0b3e4e446bf0af01cd879
Author: Colin Guthrie <cguthrie at mandriva.org>
Date: Wed Mar 17 15:30:32 2010 +0000
intended-roles: Do not pick monitor sources when doing automatic role-based device selection
diff --git a/src/modules/module-intended-roles.c b/src/modules/module-intended-roles.c
index b9924df..78a2c49 100644
--- a/src/modules/module-intended-roles.c
+++ b/src/modules/module-intended-roles.c
@@ -123,6 +123,7 @@ static pa_hook_result_t sink_input_new_hook_callback(pa_core *c, pa_sink_input_n
return PA_HOOK_OK;
}
+ /* @todo: favour the highest priority device, not the first one we find? */
PA_IDXSET_FOREACH(s, c->sinks, idx) {
if (s == def)
continue;
@@ -173,12 +174,16 @@ static pa_hook_result_t source_output_new_hook_callback(pa_core *c, pa_source_ou
}
PA_IDXSET_FOREACH(s, c->sources, idx) {
+ if (s->monitor_of)
+ continue;
+
if (s == def)
continue;
if (!PA_SOURCE_IS_LINKED(pa_source_get_state(s)))
continue;
+ /* @todo: favour the highest priority device, not the first one we find? */
if (role_match(s->proplist, role)) {
new_data->source = s;
new_data->save_source = FALSE;
@@ -242,6 +247,9 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
pa_assert(u);
pa_assert(u->on_hotplug);
+ if (source->monitor_of)
+ return PA_HOOK_OK;
+
PA_IDXSET_FOREACH(so, c->source_outputs, idx) {
const char *role;
@@ -315,6 +323,7 @@ static pa_hook_result_t sink_unlink_hook_callback(pa_core *c, pa_sink *sink, str
continue;
/* Try to find some other fitting sink */
+ /* @todo: favour the highest priority device, not the first one we find? */
PA_IDXSET_FOREACH(d, c->sinks, jdx) {
if (d == def || d == sink)
continue;
@@ -370,6 +379,7 @@ static pa_hook_result_t source_unlink_hook_callback(pa_core *c, pa_source *sourc
}
/* Try to find some other fitting source */
+ /* @todo: favour the highest priority device, not the first one we find? */
PA_IDXSET_FOREACH(d, c->sources, jdx) {
if (d == def || d == source)
continue;
@@ -377,7 +387,8 @@ static pa_hook_result_t source_unlink_hook_callback(pa_core *c, pa_source *sourc
if (!PA_SOURCE_IS_LINKED(pa_source_get_state(d)))
continue;
- if (role_match(d->proplist, role) && !source->monitor_of == !d->monitor_of) {
+ /* If moving from a monitor, move to another monitor */
+ if (!source->monitor_of == !d->monitor_of && role_match(d->proplist, role)) {
pa_source_output_move_to(so, d, FALSE);
break;
}
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list