[ITC][player][NonACR][DPTTIZEN-3148 Code optimization for TIZENIOT profile] 87/213687/2
authorABHISHEK JAIN <j.abhishek@samsung.com>
Tue, 10 Sep 2019 07:02:14 +0000 (12:32 +0530)
committershobhit verma <shobhit.v@samsung.com>
Tue, 10 Sep 2019 10:32:11 +0000 (10:32 +0000)
Change-Id: Ie668fa6efd7a87ce8eab4bc4575f470fa7498b68
Signed-off-by: ABHISHEK JAIN <j.abhishek@samsung.com>
src/itc/player/ITs-player-display.c
src/itc/player/ITs-player-subtitle.c
src/itc/player/ITs-player.c

index cb1503732705ae19e253e722e40b80e3ed9bef15..88a8897c75a936ea623ef930ac414e78b1ce0bc6 100755 (executable)
@@ -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
index 0eeae1171ff946d4f5124216d49e23b0bc419fa8..11c0d24a0bee88e175eea4e306243016ef1c249c 100755 (executable)
@@ -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));
index a9e48ddf94b9a5cf7d5fd46f77324ccb2e7fddb7..397cac19471954472aa0ea61dd06c9a592a04921 100755 (executable)
@@ -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