emixer: use a better name for the sink inputs

it seems applications are using a higher quality name with the property
PA_PROP_APPLICATION_NAME.

ref T5664
This commit is contained in:
Marcel Hollerbach 2017-07-04 09:59:19 +02:00 committed by Mike Blumenkrantz
parent bd60a1ea0a
commit d016800c51
1 changed files with 8 additions and 1 deletions

View File

@ -329,7 +329,14 @@ _sink_input_cb(pa_context *c EINA_UNUSED, const pa_sink_input_info *info,
info->name);
input->idx = info->index;
input->base.name = eina_stringshare_add(info->name);
Eina_Strbuf *input_name;
input_name = eina_strbuf_new();
eina_strbuf_append(input_name, pa_proplist_gets(info->proplist, PA_PROP_APPLICATION_NAME));
eina_strbuf_append(input_name, ":");
eina_strbuf_append(input_name, info->name);
input->base.name = eina_strbuf_release(input_name);
input->base.volume = _pa_cvolume_convert(&info->volume);
input->base.mute = !!info->mute;
EINA_LIST_FOREACH(ctx->sinks, l, s)