[0.2.87] apply changed interface of set/get pos 24/187724/1 accepted/tizen/unified/20180830.060828 submit/tizen/20180829.053131
authorEunhae Choi <eunhae1.choi@samsung.com>
Tue, 28 Aug 2018 05:22:39 +0000 (14:22 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Tue, 28 Aug 2018 05:22:39 +0000 (14:22 +0900)
Change-Id: Ia42e7047fd8e96e14f00b60af37b9f57b7e2f684

legacy/src/legacy_player.c
muse/src/muse_player.c
packaging/mmsvc-player.spec

index b5cdad5..e5a82f0 100644 (file)
@@ -1191,7 +1191,7 @@ int legacy_player_set_play_position(player_h player, int64_t nanoseconds, bool a
        if (ret != MM_ERROR_NONE)
                return __player_convert_error_code(ret, (char *)__FUNCTION__);
 
-       ret = mm_player_set_position(handle->mm_handle, MM_PLAYER_POS_FORMAT_TIME, nanoseconds);
+       ret = mm_player_set_position(handle->mm_handle, nanoseconds);
        if (ret != MM_ERROR_NONE) {
                handle->user_cb[MUSE_PLAYER_EVENT_TYPE_SEEK] = NULL;
                handle->user_data[MUSE_PLAYER_EVENT_TYPE_SEEK] = NULL;
@@ -1213,7 +1213,7 @@ int legacy_player_get_play_position(player_h player, int64_t *nanoseconds)
                return PLAYER_ERROR_INVALID_STATE;
        }
 
-       int ret = mm_player_get_position(handle->mm_handle, MM_PLAYER_POS_FORMAT_TIME, &pos);
+       int ret = mm_player_get_position(handle->mm_handle, &pos);
        if (ret != MM_ERROR_NONE) {
                if (ret == MM_ERROR_PLAYER_NOT_INITIALIZED) {
                        /* During playbak if a interrupt is occurred, the player can be destroyed internally.
@@ -1776,7 +1776,7 @@ int legacy_player_set_progressive_download_path(player_h player, const char *pat
        player_s *handle = (player_s *)player;
        PLAYER_STATE_CHECK(handle, PLAYER_STATE_IDLE);
 
-       int ret = mm_player_set_attribute(handle->mm_handle, NULL, "pd_mode", MM_PLAYER_PD_MODE_URI, "pd_location", path, strlen(path), (char *)NULL);
+       int ret = mm_player_set_attribute(handle->mm_handle, NULL, MM_PLAYER_PD_MODE, MM_PLAYER_PD_MODE_URI, "pd_location", path, strlen(path), (char *)NULL);
        if (ret != MM_ERROR_NONE) {
                return __player_convert_error_code(ret, (char *)__FUNCTION__);
        } else {
@@ -1853,7 +1853,7 @@ int legacy_player_set_streaming_cookie(player_h player, const char *cookie, int
        player_s *handle = (player_s *)player;
        PLAYER_STATE_CHECK(handle, PLAYER_STATE_IDLE);
 
-       int ret = mm_player_set_attribute(handle->mm_handle, NULL, "streaming_cookie", cookie, size, (char *)NULL);
+       int ret = mm_player_set_attribute(handle->mm_handle, NULL, MM_PLAYER_STREAMING_COOKIE, cookie, size, (char *)NULL);
        if (ret != MM_ERROR_NONE)
                return __player_convert_error_code(ret, (char *)__FUNCTION__);
        else
@@ -1868,7 +1868,7 @@ int legacy_player_set_streaming_user_agent(player_h player, const char *user_age
        player_s *handle = (player_s *)player;
        PLAYER_STATE_CHECK(handle, PLAYER_STATE_IDLE);
 
-       int ret = mm_player_set_attribute(handle->mm_handle, NULL, "streaming_user_agent", user_agent, size, (char *)NULL);
+       int ret = mm_player_set_attribute(handle->mm_handle, NULL, MM_PLAYER_STREAMING_USER_AGENT, user_agent, size, (char *)NULL);
        if (ret != MM_ERROR_NONE)
                return __player_convert_error_code(ret, (char *)__FUNCTION__);
        else
index 9e8a742..07936cf 100644 (file)
@@ -749,9 +749,8 @@ static bool __video_decoded_callback(void *video_data, void *user_data)
        /* check bo */
        for (i = 0, bo_num = 0; i < BUFFER_MAX_PLANE_NUM; i++) {
                if (video_stream->bo[i]) {
-                       key[i] = tbm_bo_export(video_stream->bo[i]); /* FIXME: will be exchanged to unique mm key */
+                       key[i] = tbm_bo_export(video_stream->bo[i]); /* FIXME: will be exchanged to the unique index */
                        tfd[i] = tbm_bo_export_fd(video_stream->bo[i]);
-                       // LOGD("tbm fd = %d:%d", key[i], tfd[i]);
 
                        if (i == 0 && tfd[0] <= INVALID_DEFAULT_VALUE) {
                                LOGE("failed to get tbm fd from %p", video_stream->bo[0]);
@@ -2712,7 +2711,7 @@ int player_disp_set_callback(muse_module_h module)
        return ret;
 }
 
-int player_disp_return_video_data(muse_module_h module)
+int player_disp_return_video_data(muse_module_h module) /* MUSE_PLAYER_API_RETURN_VIDEO_DATA */
 {
        MMPlayerVideoStreamDataType *v_data = NULL;
        muse_player_handle_s *muse_player = NULL;
index 6324091..52b0195 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-player
 Summary:    A Media Player module for muse server
-Version:    0.2.86
+Version:    0.2.87
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0