return;
}
-static player_tsurf_info_s *__player_get_tsurf_from_list(callback_cb_info_s *cb_info, int *key, int height, int width)
+static player_tsurf_info_s *__player_get_tsurf_from_list(callback_cb_info_s *cb_info, intptr_t key, int height, int width)
{
GList *l = NULL;
g_mutex_lock(&cb_info->data_mutex);
for (l = g_list_first(cb_info->tsurf_list); l; l = g_list_next(l)) {
player_tsurf_info_s *tmp = (player_tsurf_info_s *)l->data;
- if (tmp && key && (tmp->key[0] == key[0])) {
- LOGD("found tsurf_data of tbm_key %d", key[0]);
+ if (tmp && key && (tmp->key == key)) {
+ LOGD("found tsurf_data of tbm_key %" PRIdPTR, key);
/* need to check tsuf info to support DRC */
if ((tbm_surface_get_height(tmp->tsurf) != height) ||
static void __media_packet_video_frame_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
tbm_bo bo[4] = { NULL, };
- int key[4] = { INVALID_DEFAULT_VALUE, };
tbm_surface_info_s sinfo;
char *surface_info = (char *)&sinfo;
media_packet_h pkt = NULL;
bool make_pkt_fmt = false;
int ret = MEDIA_FORMAT_ERROR_NONE;
_media_pkt_video_fin_data *fin_data = NULL;
+ intptr_t key = 0;
intptr_t v_data = 0;
uint64_t pts = 0;
int i = 0, orientation = 0;
void *jobj = muse_core_msg_object_new(recv_data->buffer, NULL, &err);
if (!jobj ||
- !muse_core_msg_object_get_value("key[0]", jobj, MUSE_TYPE_ANY, &key[0]) ||
- !muse_core_msg_object_get_value("key[1]", jobj, MUSE_TYPE_ANY, &key[1]) ||
- !muse_core_msg_object_get_value("key[2]", jobj, MUSE_TYPE_ANY, &key[2]) ||
- !muse_core_msg_object_get_value("key[3]", jobj, MUSE_TYPE_ANY, &key[3]) ||
+ !muse_core_msg_object_get_value("key", jobj, MUSE_TYPE_POINTER, &key) ||
!muse_core_msg_object_get_value("v_data", jobj, MUSE_TYPE_POINTER, &v_data) ||
!muse_core_msg_object_get_value("mimetype", jobj, MUSE_TYPE_ANY, &mimetype) ||
!muse_core_msg_object_get_value("pts", jobj, MUSE_TYPE_INT64, &pts) ||
LOGE("failed to alloc tsurf info");
goto ERROR;
}
- memset(tsurf_data->key, INVALID_DEFAULT_VALUE, sizeof(tsurf_data->key));
-
- memcpy(tsurf_data->key, key, sizeof(tsurf_data->key));
+ tsurf_data->key = key;
tsurf_data->tsurf = tsurf;
g_mutex_lock(&cb_info->data_mutex);
cb_info->tsurf_list = g_list_append(cb_info->tsurf_list, tsurf_data);
- LOGD("key %d is added to the pool", key[0]);
+ LOGD("key %" PRIdPTR " is added to the pool", key);
if (cb_info->video_frame_pool_size < g_list_length(cb_info->tsurf_list))
LOGE("need to check the pool size: %d < %d", cb_info->video_frame_pool_size, g_list_length(cb_info->tsurf_list));
g_mutex_unlock(&cb_info->data_mutex);