From 7aee4a80fa3cfd830091c94b96142ec616476292 Mon Sep 17 00:00:00 2001 From: YoungHun Kim Date: Tue, 22 Jan 2019 16:04:55 +0900 Subject: [PATCH] [0.3.109] Get the module index using muse configure Change-Id: Ib0dc75492c943b0f313bfc66416c4ebfd8be7a24 --- packaging/capi-media-player.spec | 2 +- src/player.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packaging/capi-media-player.spec b/packaging/capi-media-player.spec index ed2d62c..55d9b8d 100644 --- a/packaging/capi-media-player.spec +++ b/packaging/capi-media-player.spec @@ -1,6 +1,6 @@ Name: capi-media-player Summary: A Media Player API -Version: 0.3.108 +Version: 0.3.109 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/player.c b/src/player.c index 5ce8b72..aabc79c 100644 --- a/src/player.c +++ b/src/player.c @@ -42,6 +42,7 @@ #define INVALID_MUSE_TYPE_VALUE 0 #define MAX_S_PATH_LEN 32 +#define MODULE_NAME "player" #define PLAYER_FEATURE_SOUND_STREAM "http://tizen.org/feature/multimedia.player.stream_info" #define PLAYER_FEATURE_OPENGL "http://tizen.org/feature/opengles.version.2_0" #define PLAYER_FEATURE_SPHERICAL_VIDEO "http://tizen.org/feature/multimedia.player.spherical_video" @@ -1856,7 +1857,7 @@ int player_create(player_h *player) int pid = getpid(); muse_player_api_e api = MUSE_PLAYER_API_CREATE; - muse_core_api_module_e module = MUSE_PLAYER; + int module_index = INVALID_DEFAULT_VALUE; player_cli_s *pc = NULL; char *ret_buf = NULL; int retry_count = CONNECTION_RETRY; @@ -1879,8 +1880,13 @@ int player_create(player_h *player) goto ERROR; } + if (muse_client_get_module_index(MODULE_NAME, &module_index) != MM_ERROR_NONE) { + LOGE("muse client get module index failed"); + goto ERROR; + } + PLAYER_SEND_MSG_ASYNC(api, sock_fd, ret, - MUSE_TYPE_INT, "module", module, + MUSE_TYPE_INT, "module", module_index, MUSE_TYPE_INT, "pid", pid); if (ret == PLAYER_ERROR_INVALID_OPERATION) goto ERROR; -- 2.34.1