From: Hyunil Date: Thu, 5 Jul 2018 07:58:26 +0000 (+0900) Subject: Add checking support_video for EVAS rendering X-Git-Tag: submit/tizen/20180705.081255^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=58f17ab89bfd15c76bbcff5f21b3a4d5831a69ff;p=platform%2Fcore%2Fapi%2Fplayer.git Add checking support_video for EVAS rendering Change-Id: I2a314729b4f96ef6332e420e74b20a9db031e5a4 Signed-off-by: Hyunil --- diff --git a/src/player.c b/src/player.c index 9bcafef..82cd41b 100644 --- a/src/player.c +++ b/src/player.c @@ -2106,10 +2106,12 @@ int player_unprepare(player_h player) return PLAYER_ERROR_INVALID_STATE; #ifdef TIZEN_FEATURE_EVAS_RENDERER - PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_evas_display_retrieve_all_packets, "disp_evas_display_retrieve_all_packets"); - ret = p_disp_evas_display_retrieve_all_packets(EVAS_HANDLE(pc), false); - if (ret != PLAYER_ERROR_NONE) - LOGI("mm_evas_renderer_retrieve_all_packets returned error"); + if (EVAS_INFO(pc)->support_video && EVAS_HANDLE(pc)) { + PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_evas_display_retrieve_all_packets, "disp_evas_display_retrieve_all_packets"); + ret = p_disp_evas_display_retrieve_all_packets(EVAS_HANDLE(pc), false); + if (ret != PLAYER_ERROR_NONE) + LOGI("mm_evas_renderer_retrieve_all_packets returned error"); + } #endif PLAYER_SEND_MSG(api, pc, ret_buf, ret); @@ -2652,9 +2654,8 @@ static int _get_play_position(player_h player, int64_t *pos) ret_val = _player_get_param_value(ret_buf, MUSE_TYPE_INT64, "pos", (void *)pos, INVALID_MUSE_TYPE_VALUE); - if (!ret_val) { + if (!ret_val) ret = PLAYER_ERROR_INVALID_OPERATION; - } } g_free(ret_buf); @@ -2673,9 +2674,8 @@ int player_get_play_position(player_h player, int *milliseconds) /* LOGD("ENTER"); */ ret = _get_play_position(player, &pos); - if (ret == PLAYER_ERROR_NONE) { + if (ret == PLAYER_ERROR_NONE) *milliseconds = (int)(pos / G_GINT64_CONSTANT(1000000)); - } return ret; } @@ -2691,9 +2691,8 @@ int player_get_play_position_nsec(player_h player, int64_t *nanoseconds) /* LOGD("ENTER"); */ ret = _get_play_position(player, &pos); - if (ret == PLAYER_ERROR_NONE) { + if (ret == PLAYER_ERROR_NONE) *nanoseconds = pos; - } return ret; } @@ -2790,9 +2789,8 @@ static int _get_duration(player_h player, int64_t *duration) ret_val = _player_get_param_value(ret_buf, MUSE_TYPE_INT64, "duration", (void *)duration, INVALID_MUSE_TYPE_VALUE); - if (!ret_val) { + if (!ret_val) ret = PLAYER_ERROR_INVALID_OPERATION; - } } g_free(ret_buf); @@ -2831,9 +2829,8 @@ int player_get_duration_nsec(player_h player, int64_t *nanoseconds) LOGD("ENTER"); ret = _get_duration(player, &duration); - if (ret == PLAYER_ERROR_NONE) { + if (ret == PLAYER_ERROR_NONE) *nanoseconds = duration; - } LOGD("LEAVE 0x%X", ret); return ret;