[0.2.136] remove tbm export interface 21/261521/2
authorEunhye Choi <eunhae1.choi@samsung.com>
Tue, 20 Jul 2021 10:31:06 +0000 (19:31 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Wed, 21 Jul 2021 02:08:02 +0000 (11:08 +0900)
- use bo address as key instead of tbm key
  which interface is not supported in specific case
  as headless

Change-Id: I44208cdf61d04aaf1257a902d6c6b986930234a7

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

index 4450223..3fa0fcb 100644 (file)
@@ -663,7 +663,7 @@ static bool __mplayer_video_decoded_callback(void *video_data, void *user_data)
        uint32_t bo_format = 0;
        int bo_num = 0;
        tbm_fd tfd[4];
-       int key[4];
+       intptr_t key = 0;
        tbm_surface_info_s sinfo;
        int i = 0;
        char *surface_info = (char *)&sinfo;
@@ -677,7 +677,6 @@ static bool __mplayer_video_decoded_callback(void *video_data, void *user_data)
 
        memset(&sinfo, 0, sizeof(tbm_surface_info_s));
        memset(tfd, INVALID_DEFAULT_VALUE, sizeof(tfd));
-       memset(key, INVALID_DEFAULT_VALUE, sizeof(key));
 
        muse_player = (muse_player_handle_t *)muse_server_ipc_get_handle(module);
        if (muse_player == NULL) {
@@ -694,7 +693,6 @@ static bool __mplayer_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 the unique index */
                        tfd[i] = tbm_bo_export_fd(video_stream->bo[i]);
 
                        if (i == 0 && tfd[0] <= INVALID_DEFAULT_VALUE) {
@@ -711,6 +709,8 @@ static bool __mplayer_video_decoded_callback(void *video_data, void *user_data)
                goto ERROR;
        }
 
+       key = (intptr_t)(video_stream->bo[0]);
+
        /* get format info */
        ret = __mplayer_get_tbm_surface_format(video_stream->format, &bo_format);
        ret |= __mplayer_get_media_packet_mimetype(video_stream->format, &mimetype);
@@ -754,11 +754,9 @@ static bool __mplayer_video_decoded_callback(void *video_data, void *user_data)
 
        msg_len = (surface_info_size / sizeof(int) + (surface_info_size % sizeof(int) ? 1 : 0));
        PLAYER_SEND_EVENT_MSG_WITH_TFDS(api, ev, module, tfd,
-               MUSE_TYPE_INT, "key[0]", key[0], MUSE_TYPE_INT, "key[1]", key[1],
-               MUSE_TYPE_INT, "key[2]", key[2], MUSE_TYPE_INT, "key[3]", key[3],
-               MUSE_TYPE_POINTER, "v_data", v_data, MUSE_TYPE_INT, "mimetype", (int)mimetype,
-               MUSE_TYPE_INT64, "pts", (INT64)pts, MUSE_TYPE_INT, "orientation", orientation,
-               MUSE_TYPE_ARRAY, "surface_info", msg_len, surface_info);
+               MUSE_TYPE_POINTER, "key", key, MUSE_TYPE_POINTER, "v_data", v_data,
+               MUSE_TYPE_INT, "mimetype", (int)mimetype, MUSE_TYPE_INT64, "pts", (INT64)pts,
+               MUSE_TYPE_INT, "orientation", orientation, MUSE_TYPE_ARRAY, "surface_info", msg_len, surface_info);
 
        ret_val = true;
 ERROR:
index 8c40d16..cf923d9 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mmsvc-player
 Summary:    A Media Player module for muse server
-Version:    0.2.135
+Version:    0.2.136
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0