From: ABHISHEK JAIN Date: Tue, 10 Sep 2019 07:02:14 +0000 (+0530) Subject: [ITC][player][NonACR][DPTTIZEN-3148 Code optimization for TIZENIOT profile] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=844397dcaf087ac56746811e75b3ba8b55bf946e;p=test%2Ftct%2Fnative%2Fapi.git [ITC][player][NonACR][DPTTIZEN-3148 Code optimization for TIZENIOT profile] Change-Id: Ie668fa6efd7a87ce8eab4bc4575f470fa7498b68 Signed-off-by: ABHISHEK JAIN --- diff --git a/src/itc/player/ITs-player-display.c b/src/itc/player/ITs-player-display.c index cb1503732..88a8897c7 100755 --- a/src/itc/player/ITs-player-display.c +++ b/src/itc/player/ITs-player-display.c @@ -256,7 +256,7 @@ int ITc_player_set_display_visible_p(void) { START_TEST; int nRet = -1; - #if defined(MOBILE) || defined(TV) || defined(WEARABLE) //Starts MOBILE or TV or WEARABLE + #ifndef TIZENIOT // For Mobile or Wearable or TV nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); #endif //End MOBILE or TV or WEARABLE diff --git a/src/itc/player/ITs-player-subtitle.c b/src/itc/player/ITs-player-subtitle.c index 0eeae1171..11c0d24a0 100755 --- a/src/itc/player/ITs-player-subtitle.c +++ b/src/itc/player/ITs-player-subtitle.c @@ -196,14 +196,13 @@ int ITc_player_set_subtitle_position_offset_p(void) } int nRet = -1; - #if defined(MOBILE) || defined(TV) || defined( WEARABLE) //Starts MOBILE or WEARABLE or TV - nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); - PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); - #endif //End MOBILE or WEARABLE or TV - #if defined(TIZENIOT) //Starts TIZENIOT - nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, g_pEvasWindow); - PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); - #endif //WEARABLE //End TIZENIOT + #ifndef TIZENIOT // For Mobile or Wearable or TV + nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); + PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); + #else //End MOBILE or WEARABLE or TV, Starts TIZENIOT + nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, g_pEvasWindow); + PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); + #endif //End TIZENIOT nRet = player_set_subtitle_path(g_player, pPath); PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_subtitle_path", PlayerGetError(nRet)); @@ -311,14 +310,13 @@ int ITc_player_set_unset_subtitle_updated_cb_p(void) } int nRet = -1; - #if defined(MOBILE) || defined(TV) || defined(WEARABLE) //Starts MOBILE or WEARABLE or TV - nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); - PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); - #endif //End MOBILE or WEARABLE or TV - #if defined(TIZENIOT) //Starts TIZENIOT - nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, g_pEvasWindow); - PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); - #endif //WEARABLE //End TIZENIOT + #ifndef TIZENIOT // For Mobile or Wearable or TV + nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); + PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); + #else //End MOBILE or WEARABLE or TV, Starts TIZENIOT + nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, g_pEvasWindow); + PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); + #endif //End TIZENIOT nRet = player_set_subtitle_path(g_player, pPath); PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_subtitle_path", PlayerGetError(nRet)); diff --git a/src/itc/player/ITs-player.c b/src/itc/player/ITs-player.c index a9e48ddf9..397cac194 100755 --- a/src/itc/player/ITs-player.c +++ b/src/itc/player/ITs-player.c @@ -1347,7 +1347,7 @@ int ITc_player_get_streaming_download_progress_p(void) player_state_e state; int nRet = -1; - #if defined(MOBILE) || defined(TV) || defined(WEARABLE) //Starts MOBILE or TV or WEARABLE + #ifndef TIZENIOT // For Mobile or Wearable or TV nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); #endif //End MOBILE or TV or WEARABLE @@ -1740,7 +1740,7 @@ int ITc_player_pause_p(void) player_state_e state; int nRet = -1; - #if defined(MOBILE) || defined(TV) || defined(WEARABLE) //Starts MOBILE or TV or WEARABLE + #ifndef TIZENIOT // For Mobile or Wearable or TV nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); #endif //End MOBILE or TV or WEARABLE @@ -1954,7 +1954,7 @@ int ITc_player_set_unset_completed_cb_p(void) int nRet = player_set_completed_cb(g_player, PlayerCompletedCallback, NULL); PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_completed_cb", PlayerGetError(nRet)); - #if defined(MOBILE) || defined(TV) || defined(WEARABLE) //Starts MOBILE or TV or WEARABLE + #ifndef TIZENIOT // For Mobile or Wearable or TV nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, GET_DISPLAY(g_pEvasObject)); PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); #endif //End MOBILE or TV or WEARABLE @@ -2126,7 +2126,7 @@ int ITc_player_prepare_async_p(void) int nRet = -1; - #if defined(MOBILE) || defined(TV) || defined(WEARABLE) //Starts MOBILE or TV or WEARABLE + #ifndef TIZENIOT // For Mobile or Wearable or TV nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); #endif //End MOBILE or TV or WEARABLE @@ -2385,7 +2385,7 @@ int ITc_player_get_track_count_p(void) int nCount = 0; int nRet = -1; - #if defined(MOBILE) || defined(TV) || defined(WEARABLE) //Starts MOBILE or TV or WEARABLE + #ifndef TIZENIOT // For Mobile or Wearable or TV nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); #endif //End MOBILE or TV or WEARABLE @@ -2451,7 +2451,7 @@ int ITc_player_get_current_track_p(void) int nCount = 0, nIndex = 0; int nRet = -1; - #if defined(MOBILE) || defined(TV) || defined(WEARABLE) //Starts MOBILE or TV or WEARABLE + #ifndef TIZENIOT // For Mobile or Wearable or TV nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); #endif //End MOBILE or TV or WEARABLE @@ -2530,7 +2530,7 @@ int ITc_player_get_track_language_code_p(void) char *pszLangCode = NULL; int nRet = -1; - #if defined(MOBILE) || defined(TV) || defined(WEARABLE) //Starts MOBILE or TV or WEARABLE + #ifndef TIZENIOT // For Mobile or Wearable or TV nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); #endif //End MOBILE or TV or WEARABLE @@ -2608,7 +2608,7 @@ int ITc_player_select_track_p(void) int nCount = 0, nIndex = 0; int nRet = -1; - #if defined(MOBILE) || defined(TV) || defined(WEARABLE) //Starts MOBILE or TV or WEARABLE + #ifndef TIZENIOT // For Mobile or Wearable or TV nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); #endif //End MOBILE or TV or WEARABLE @@ -3062,10 +3062,9 @@ int ITc_player_capture_video_p(void) int nRet = -1; - #if defined(MOBILE) || defined(TV) || defined(WEARABLE) //Starts MOBILE or TV or WEARABLE - nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); - PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); - #endif //End MOBILE or TV or WEARABLE + nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject); + PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet)); + sleep(2); nRet = player_set_uri(g_player, pPath); @@ -3369,7 +3368,7 @@ int ITc_player_set_unset_media_stream_seek_cb_p(void) player_unprepare(g_player); return 0; } -#endif //TIZENIOT +#endif // End of Mobile or Wearable or TV //& purpose: set and get the play position for playback //& type : auto