[pulseaudio-commits] src/modules
Tanu Kaskinen
tanuk at kemper.freedesktop.org
Thu Mar 10 16:13:05 UTC 2016
src/modules/module-role-cork.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
New commits:
commit 61164d3b5127fe93050f1a66e3d5b67b911560f0
Author: Georg Chini <georg at chini.tk>
Date: Thu Mar 26 21:54:17 2015 +0100
role-cork: Don't ignore streams without media.role
When corking do not ignore streams without media.role. Instead treat
them as if media.role="no_role", so that you can specify "no_role" as
trigger or cork role.
diff --git a/src/modules/module-role-cork.c b/src/modules/module-role-cork.c
index 7c0f59f..835ce65 100644
--- a/src/modules/module-role-cork.c
+++ b/src/modules/module-role-cork.c
@@ -77,7 +77,7 @@ static bool shall_cork(struct userdata *u, pa_sink *s, pa_sink_input *ignore) {
continue;
if (!(role = pa_proplist_gets(j->proplist, PA_PROP_MEDIA_ROLE)))
- continue;
+ role = "no_role";
PA_IDXSET_FOREACH(trigger_role, u->trigger_roles, role_idx) {
if (pa_streq(role, trigger_role)) {
@@ -107,7 +107,7 @@ static inline void apply_cork_to_sink(struct userdata *u, pa_sink *s, pa_sink_in
continue;
if (!(role = pa_proplist_gets(j->proplist, PA_PROP_MEDIA_ROLE)))
- continue;
+ role = "no_role";
PA_IDXSET_FOREACH(cork_role, u->cork_roles, role_idx) {
if ((trigger = pa_streq(role, cork_role)))
@@ -152,7 +152,6 @@ static void apply_cork(struct userdata *u, pa_sink *s, pa_sink_input *ignore, bo
static pa_hook_result_t process(struct userdata *u, pa_sink_input *i, bool create) {
bool cork = false;
- const char *role;
pa_assert(u);
pa_sink_input_assert_ref(i);
@@ -160,9 +159,6 @@ static pa_hook_result_t process(struct userdata *u, pa_sink_input *i, bool creat
if (!create)
pa_hashmap_remove(u->cork_state, i);
- if (!(role = pa_proplist_gets(i->proplist, PA_PROP_MEDIA_ROLE)))
- return PA_HOOK_OK;
-
if (!i->sink)
return PA_HOOK_OK;
More information about the pulseaudio-commits
mailing list