[0.3.103] Get the module index using muse configure 80/198480/1 accepted/tizen/5.0/unified/20190131.061553 accepted/tizen/5.0/unified/20190202.022405 submit/tizen_5.0/20190129.231113 submit/tizen_5.0/20190130.102940 submit/tizen_5.0/20190131.231008
authorYoungHun Kim <yh8004.kim@samsung.com>
Thu, 24 Jan 2019 22:53:01 +0000 (07:53 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Thu, 24 Jan 2019 22:53:03 +0000 (07:53 +0900)
Change-Id: I20c10bd463df59d3e8c65a3bcfc0dff196837eff

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

index caa9c0a531c6b8ffe263bd688b7e032597c1026d..8e4c4c31c6eb21379b37d7cddb15e1f25360d229 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-player
 Summary:    A Media Player API
-Version:    0.3.102
+Version:    0.3.103
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 6505597ffd509f3146a1e300560841e03f4fd745..16171f88d73ecf328917d611d517bd8820635975 100644 (file)
@@ -41,6 +41,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"
@@ -1868,7 +1869,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;
@@ -1891,8 +1892,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;