Add checking support_video for EVAS rendering 21/183421/2 accepted/tizen/unified/20180706.062147 submit/tizen/20180705.081255
authorHyunil <hyunil46.park@samsung.com>
Thu, 5 Jul 2018 07:58:26 +0000 (16:58 +0900)
committerHyunil <hyunil46.park@samsung.com>
Thu, 5 Jul 2018 08:02:58 +0000 (17:02 +0900)
Change-Id: I2a314729b4f96ef6332e420e74b20a9db031e5a4
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
src/player.c

index 9bcafef..82cd41b 100644 (file)
@@ -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;