summaryrefslogtreecommitdiffstats
path: root/src/modules/module-intended-roles.c
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2011-02-28 13:23:23 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-05-02 11:54:43 +0530
commit0ac2cfce6d1a3d7ab5af6aca659e46625c32d3c4 (patch)
tree584ac3a49636412d2ff3c53608050c4042b6af6f /src/modules/module-intended-roles.c
parent47e0f91aa2ca6eb3ea8b7be8aa03cd03a28c3fbe (diff)
core: Add extended stream API to support compressed formats
This is the beginning of work to support compressed formats natively in PulseAudio. This adds a pa_stream_new_extended() that takes a format structure, sends it to the server (=> protocol extension) and has the server negotiate with the appropropriate sink to figure out what format it should use. This is work in progress, and works only with PCM streams. Actual compressed format support in some sink needs to be implemented, and extensive testing is required. More details on how this is supposed to work is available at: http://pulseaudio.org/wiki/PassthroughSupport
Diffstat (limited to 'src/modules/module-intended-roles.c')
-rw-r--r--src/modules/module-intended-roles.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/modules/module-intended-roles.c b/src/modules/module-intended-roles.c
index d19444d2..90385622 100644
--- a/src/modules/module-intended-roles.c
+++ b/src/modules/module-intended-roles.c
@@ -117,11 +117,8 @@ static pa_hook_result_t sink_input_new_hook_callback(pa_core *c, pa_sink_input_n
/* Prefer the default sink over any other sink, just in case... */
if ((def = pa_namereg_get_default_sink(c)))
- if (role_match(def->proplist, role)) {
- new_data->sink = def;
- new_data->save_sink = FALSE;
+ if (role_match(def->proplist, role) && pa_sink_input_new_data_set_sink(new_data, def, FALSE))
return PA_HOOK_OK;
- }
/* @todo: favour the highest priority device, not the first one we find? */
PA_IDXSET_FOREACH(s, c->sinks, idx) {
@@ -131,11 +128,8 @@ static pa_hook_result_t sink_input_new_hook_callback(pa_core *c, pa_sink_input_n
if (!PA_SINK_IS_LINKED(pa_sink_get_state(s)))
continue;
- if (role_match(s->proplist, role)) {
- new_data->sink = s;
- new_data->save_sink = FALSE;
+ if (role_match(s->proplist, role) && pa_sink_input_new_data_set_sink(new_data, s, FALSE))
return PA_HOOK_OK;
- }
}
return PA_HOOK_OK;