mm_sound_plugin_codec_wave: Set client pid to PulseAudio property 41/222241/2
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 13 Jan 2020 01:11:32 +0000 (10:11 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 13 Jan 2020 05:35:26 +0000 (14:35 +0900)
[Version] 0.12.57
[Issue Type] Improvement

Change-Id: I756323dcfaa05eaf7584c4d6d16814242d137400
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/libmm-sound.spec
server/plugin/wav/mm_sound_plugin_codec_wave.c

index ec76b73..7d513ad 100644 (file)
@@ -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
index 499f904..5418cd0 100644 (file)
@@ -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);