[0.3.109] Get the module index using muse configure 86/198186/3 submit/tizen/20190129.225447
authorYoungHun Kim <yh8004.kim@samsung.com>
Tue, 22 Jan 2019 07:04:55 +0000 (16:04 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Tue, 22 Jan 2019 10:16:57 +0000 (19:16 +0900)
Change-Id: Ib0dc75492c943b0f313bfc66416c4ebfd8be7a24

packaging/capi-media-player.spec
src/player.c

index ed2d62c..55d9b8d 100644 (file)
@@ -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
index 5ce8b72..aabc79c 100644 (file)
@@ -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;