[0.3.55] set evas visible FALSE when player_stop is called 45/125345/1
authorEunhae Choi <eunhae1.choi@samsung.com>
Fri, 7 Apr 2017 07:12:51 +0000 (16:12 +0900)
committereunhae choi <eunhae1.choi@samsung.com>
Mon, 17 Apr 2017 05:22:29 +0000 (22:22 -0700)
- and it is related to the backward compatibility

Change-Id: I7ef6fb959fc25f2fb7ab8053c51e4ea3e4f0390f
(cherry picked from commit 45948012eaf9eaec623888400782d9738ed1f2ff)

packaging/capi-media-player.spec
src/player.c

index d3214c2..07d73c3 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-player
 Summary:    A Media Player API
-Version:    0.3.54
+Version:    0.3.55
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 23c2c11..6051b6b 100644 (file)
@@ -2366,7 +2366,7 @@ int player_start(player_h player)
 
        LOGD("ENTER");
 #ifdef TIZEN_FEATURE_EVAS_RENDERER
-       if (EVAS_HANDLE(pc) && EVAS_INFO(pc)->visible == EVAS_VISIBLE_NONE) {
+       if (CALLBACK_INFO(pc) && EVAS_HANDLE(pc) && EVAS_INFO(pc)->visible == EVAS_VISIBLE_NONE) {
                ret = mm_evas_renderer_set_visible(EVAS_HANDLE(pc), true);
                if (ret != MM_ERROR_NONE) {
                        LOGE("mm_evas_renderer_set_visible err 0x%x", ret);
@@ -2397,6 +2397,19 @@ int player_stop(player_h player)
        if (ret == PLAYER_ERROR_NONE)
                set_null_user_cb_lock(pc->cb_info, MUSE_PLAYER_EVENT_TYPE_SEEK);
 
+#ifdef TIZEN_FEATURE_EVAS_RENDERER
+       if (ret != PLAYER_ERROR_INVALID_STATE) {
+               if (CALLBACK_INFO(pc) && EVAS_HANDLE(pc) && (EVAS_INFO(pc)->visible == EVAS_VISIBLE_TRUE)) {
+                       ret = mm_evas_renderer_set_visible(EVAS_HANDLE(pc), false);
+                       if (ret != MM_ERROR_NONE) {
+                               LOGE("mm_evas_renderer_set_visible err 0x%x", ret);
+                               return PLAYER_ERROR_INVALID_OPERATION;
+                       }
+                       /* do not update EVAS_INFO(pc)->visible to set visible true if start again */
+               }
+       }
+#endif
+
        g_free(ret_buf);
        return ret;
 }