From d90c0206bef7582c7b17b34e922bc3d05bd0a536 Mon Sep 17 00:00:00 2001 From: Hyunil Date: Wed, 6 May 2020 14:13:12 +0900 Subject: [PATCH] [0.3.130] To remove evas object, add setting visible false to unprepare Change-Id: I36b6295ee614b757e50a37a34cdc5cd0942e09c5 Signed-off-by: Hyunil --- packaging/capi-media-player.spec | 2 +- src/player.c | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packaging/capi-media-player.spec b/packaging/capi-media-player.spec index 8ea4591..d6b0256 100644 --- a/packaging/capi-media-player.spec +++ b/packaging/capi-media-player.spec @@ -1,6 +1,6 @@ Name: capi-media-player Summary: A Media Player API -Version: 0.3.129 +Version: 0.3.130 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/player.c b/src/player.c index 96a66ce..88e7a6d 100644 --- a/src/player.c +++ b/src/player.c @@ -2247,7 +2247,10 @@ int player_unprepare(player_h player) muse_player_api_e api = MUSE_PLAYER_API_UNPREPARE; player_cli_s *pc = (player_cli_s *)player; char *ret_buf = NULL; +#ifdef TIZEN_FEATURE_EVAS_RENDERER int (*p_disp_evas_display_retrieve_all_packets)(void *, bool) = NULL; + int (*p_disp_set_evas_display_visible)(void *, bool) = NULL; +#endif player_state_e state = PLAYER_STATE_NONE; PLAYER_INSTANCE_CHECK(player); @@ -2273,6 +2276,14 @@ int player_unprepare(player_h player) #ifdef TIZEN_FEATURE_EVAS_RENDERER if (EVAS_INFO(pc)->support_video && EVAS_HANDLE(pc)) { + if (EVAS_INFO(pc)->visible != EVAS_VISIBLE_FALSE) { + PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_set_evas_display_visible, "disp_set_evas_display_visible"); + if (!p_disp_set_evas_display_visible || + p_disp_set_evas_display_visible(EVAS_HANDLE(pc), false) != MM_ERROR_NONE) { + LOGE("mm_evas_renderer_set_visible err"); + return PLAYER_ERROR_INVALID_OPERATION; + } + } PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_evas_display_retrieve_all_packets, "disp_evas_display_retrieve_all_packets"); if (!p_disp_evas_display_retrieve_all_packets || p_disp_evas_display_retrieve_all_packets(EVAS_HANDLE(pc), false) != PLAYER_ERROR_NONE) { @@ -2637,8 +2648,7 @@ int player_start(player_h player) int (*p_disp_set_evas_display_visible)(void *, bool) = NULL; if (CALLBACK_INFO(pc) && EVAS_INFO(pc)->support_video) { - if (EVAS_HANDLE(pc) && (EVAS_INFO(pc)->visible == EVAS_VISIBLE_NONE - || EVAS_INFO(pc)->visible == EVAS_VISIBLE_TRUE)) { + if (EVAS_HANDLE(pc) && EVAS_INFO(pc)->visible != EVAS_VISIBLE_FALSE) { PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_set_evas_display_visible, "disp_set_evas_display_visible"); if (!p_disp_set_evas_display_visible || p_disp_set_evas_display_visible(EVAS_HANDLE(pc), true) != MM_ERROR_NONE) { @@ -2687,8 +2697,7 @@ int player_stop(player_h player) #ifdef TIZEN_FEATURE_EVAS_RENDERER if (CALLBACK_INFO(pc) && EVAS_HANDLE(pc) && - EVAS_INFO(pc)->support_video && (EVAS_INFO(pc)->visible == EVAS_VISIBLE_NONE - || EVAS_INFO(pc)->visible == EVAS_VISIBLE_TRUE)) { + EVAS_INFO(pc)->support_video && EVAS_INFO(pc)->visible != EVAS_VISIBLE_FALSE) { PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_set_evas_display_visible, "disp_set_evas_display_visible"); if (!p_disp_set_evas_display_visible || p_disp_set_evas_display_visible(EVAS_HANDLE(pc), false) != MM_ERROR_NONE) { -- 2.7.4