From 1aa76b1cb11e6ca60a6b32b18cea7c39d0556fba Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Mon, 13 Jan 2020 10:11:32 +0900 Subject: [PATCH] mm_sound_plugin_codec_wave: Set client pid to PulseAudio property [Version] 0.12.57 [Issue Type] Improvement Change-Id: I756323dcfaa05eaf7584c4d6d16814242d137400 Signed-off-by: Sangchul Lee --- packaging/libmm-sound.spec | 2 +- server/plugin/wav/mm_sound_plugin_codec_wave.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packaging/libmm-sound.spec b/packaging/libmm-sound.spec index ec76b73..7d513ad 100644 --- a/packaging/libmm-sound.spec +++ b/packaging/libmm-sound.spec @@ -1,6 +1,6 @@ Name: libmm-sound Summary: MMSound Package contains client lib and sound_server binary -Version: 0.12.56 +Version: 0.12.57 Release: 0 Group: System/Libraries License: Apache-2.0 diff --git a/server/plugin/wav/mm_sound_plugin_codec_wave.c b/server/plugin/wav/mm_sound_plugin_codec_wave.c index 499f904..5418cd0 100644 --- a/server/plugin/wav/mm_sound_plugin_codec_wave.c +++ b/server/plugin/wav/mm_sound_plugin_codec_wave.c @@ -45,6 +45,7 @@ typedef struct { int cb_param; char stream_type[MAX_STREAM_TYPE_LEN]; int stream_index; + int client_pid; pa_threaded_mainloop *m; pa_context *c; @@ -383,6 +384,7 @@ static int _pa_stream_connect(wave_info_t *h) if (!proplist) return -1; pa_proplist_sets(proplist, PA_PROP_MEDIA_ROLE, h->stream_type); + pa_proplist_setf(proplist, PA_PROP_APPLICATION_PROCESS_ID_ORIGIN, "%d", h->client_pid); if (h->stream_index != -1) pa_proplist_setf(proplist, PA_PROP_MEDIA_PARENT_ID, "%d", h->stream_index); @@ -537,6 +539,7 @@ static int _mm_sound_plug_codec_wave_create(mmsound_codec_param_t *param, mmsoun p->stop_cb = param->stop_cb; p->cb_param = param->param; MMSOUND_STRNCPY(p->filename, param->pfilename, MM_SOUND_MAX_FILENAME); + p->client_pid = param->pid; p->stream_index = param->stream_index; MMSOUND_STRNCPY(p->stream_type, param->stream_type, MAX_STREAM_TYPE_LEN); -- 2.34.1