[ITC][player-display][NonACR][TSDF-2979, TSDF-2973 Tizeniot tc fail, removed target... 12/262312/2
authorNibha Sharma <nibha.sharma@samsung.com>
Fri, 6 Aug 2021 09:33:20 +0000 (15:03 +0530)
committershobhit verma <shobhit.v@samsung.com>
Mon, 9 Aug 2021 04:32:51 +0000 (04:32 +0000)
Change-Id: Ib85fd0e38c645e2268d392e4e9d920c4df4f2583
Signed-off-by: Nibha Sharma <nibha.sharma@samsung.com>
src/itc/player-display/ITs-player-display-common.c
src/itc/player-display/ITs-player-display.c

index 5b7f3d94d8151e244f4a0500cc413725f96437c6..7786e0437ac34f79686442da28d6b8684853d440 100755 (executable)
@@ -144,10 +144,6 @@ bool InitializePlayerHandler(bool bPrepare, int nMediaType)
        int nRet = -1;
        player_state_e state;
 
-#if defined(WEARABLE)
-       bool bValue = false;
-#endif //WEARABLE
-
        char pPath1[PATH_LEN] = {0,};
        char pPath2[PATH_LEN] = {0,};
        char pPath3[PATH_LEN] = {0,};
@@ -180,134 +176,15 @@ bool InitializePlayerHandler(bool bPrepare, int nMediaType)
        if ( nMediaType == 0 )
        {
                nRet = player_set_uri(g_player, pPath1);
-               #if defined(WEARABLE)
-                       bValue = false;
-                       system_info_get_platform_bool(INTERNET_FEATURE, &bValue);
-                       if(bValue == false)
-                       {
-                               if(nRet != PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE)
-                               {
-                                       FPRINTF("[Line : %d][%s] player_set_uri API call returned mismatch %s error for unsupported internet feature\\n", __LINE__, API_NAMESPACE,  PlayerGetError(nRet));
-                                       return false;
-                               }
-                       }
-               #endif
        }
        else if ( nMediaType == 1 )
        {
                nRet = player_set_uri(g_player, pPath2);
-               #if defined(WEARABLE)
-                       bValue = false;
-                       system_info_get_platform_bool(INTERNET_FEATURE, &bValue);
-                       if(bValue == false)
-                       {
-                               if(nRet != PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE)
-                               {
-                                       FPRINTF("[Line : %d][%s] player_set_uri API call returned mismatch %s error for unsupported internet feature\\n", __LINE__, API_NAMESPACE,  PlayerGetError(nRet));
-                                       return false;
-                               }
-                       }
-               #endif
-       }
-       else if ( nMediaType == 2 )
-       {
-               char pstrValue[CONFIG_VALUE_LEN_MAX] = {0,};
-               if ( true == GetValueFromConfigFile("PLAYER_HTTP_STREAMING_URL", pstrValue, API_NAMESPACE) )
-               {
-#if DEBUG
-                       FPRINTF("[Line: %d][%s] Values Received = %s\\n", __LINE__, API_NAMESPACE, pstrValue);
-#endif
-               }
-               else
-               {
-                       FPRINTF("[Line: %d][%s] GetValueFromConfigFile returned error\\n", __LINE__, API_NAMESPACE);
-                       return false;
-               }
-               nRet = player_set_uri(g_player, pstrValue);
-               #if defined(WEARABLE)
-                       bValue = false;
-                       system_info_get_platform_bool(INTERNET_FEATURE, &bValue);
-                       if(bValue == false)
-                       {
-                               if(nRet != PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE)
-                               {
-                                       FPRINTF("[Line : %d][%s] player_set_uri API call returned mismatch %s error for unsupported internet feature\\n", __LINE__, API_NAMESPACE,  PlayerGetError(nRet));
-                                       return false;
-                               }
-
-                       }
-               #endif
-
-               if (!CheckOnlineStatus(pstrValue)) {
-                       FPRINTF("[Line : %d][%s][Reference] network is disconnected\\n", __LINE__, API_NAMESPACE);
-               }
-       }
-       else if ( nMediaType == 3 )
-       {
-               char pstrValue[CONFIG_VALUE_LEN_MAX] = {0,};
-               if ( true == GetValueFromConfigFile("PLAYER_DOWNLOAD_URL_AUDIO", pstrValue, API_NAMESPACE) )
-               {
-#if DEBUG
-                       FPRINTF("[Line: %d][%s] Values Received = %s\\n", __LINE__, API_NAMESPACE, pstrValue);
-#endif
-               }
-               else
-               {
-                       FPRINTF("[Line: %d][%s] GetValueFromConfigFile returned error\\n", __LINE__, API_NAMESPACE);
-                       return false;
-               }
-               nRet = player_set_uri(g_player, pstrValue);
-               #if defined(WEARABLE)
-                       bValue = false;
-                       system_info_get_platform_bool(INTERNET_FEATURE, &bValue);
-                       if(bValue == false)
-                       {
-                               if(nRet != PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE)
-                               {
-                                       FPRINTF("[Line : %d][%s] player_set_uri API call returned mismatch %s error for unsupported internet feature\\n", __LINE__, API_NAMESPACE,  PlayerGetError(nRet));
-                                       return false;
-                               }
-
-                       }
-               #endif
        }
        else if ( nMediaType == 4 )
        {
                nRet = player_set_uri(g_player, pPath3);
        }
-       else if (nMediaType == 5 )
-       {
-               char pstrValue[CONFIG_VALUE_LEN_MAX] = {0,};
-               if ( true == GetValueFromConfigFile("PLAYER_ADAPTIVE_STREAMING_URL", pstrValue, API_NAMESPACE) )
-               {
-#if DEBUG
-                       FPRINTF("[Line: %d][%s] Values Received = %s\\n", __LINE__, API_NAMESPACE, pstrValue);
-#endif
-               }
-               else
-               {
-                       FPRINTF("[Line: %d][%s] GetValueFromConfigFile returned error\\n", __LINE__, API_NAMESPACE);
-                       return false;
-               }
-               nRet = player_set_uri(g_player, pstrValue);
-               #if defined(WEARABLE)
-                       bValue = false;
-                       system_info_get_platform_bool(INTERNET_FEATURE, &bValue);
-                       if(bValue == false)
-                       {
-                               if(nRet != PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE)
-                               {
-                                       FPRINTF("[Line : %d][%s] player_set_uri API call returned mismatch %s error for unsupported internet feature\\n", __LINE__, API_NAMESPACE,  PlayerGetError(nRet));
-                                       return false;
-                               }
-                       }
-               #endif
-
-               if (!CheckOnlineStatus(pstrValue)) {
-                       FPRINTF("[Line : %d][%s][Reference] network is disconnected\\n", __LINE__, API_NAMESPACE);
-               }
-       }
-
        if ( nRet != PLAYER_ERROR_NONE )
        {
                FPRINTF("[Line: %d][%s] Could not set player uri", __LINE__, API_NAMESPACE);
@@ -316,11 +193,7 @@ bool InitializePlayerHandler(bool bPrepare, int nMediaType)
 
        if ( bPrepare )
        {
-               if (nMediaType == 5 ) { /* need to check connection statistics */
-                       nRet = PlayerPrepareWithConnectionCheck(g_player);
-               } else {
-                       nRet = player_prepare(g_player);
-               }
+               nRet = player_prepare(g_player);
                player_get_state(g_player,&state);
                PlayerGetState(state);
                if ( nRet != PLAYER_ERROR_NONE )
index 872e1d1ac37059a342975f512b03917bf86705ee..ce6048f3adda0239bd0198a04044c0b789a5f123 100755 (executable)
@@ -902,22 +902,7 @@ int ITc_player_capture_video_p(void)
        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);
-
-       #if defined(WEARABLE)
-               bool bValue = false;
-               system_info_get_platform_bool(INTERNET_FEATURE, &bValue);
-               if(bValue == false)
-               {
-                       if(nRet != PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE)
-                       {
-                               FPRINTF("[Line : %d][%s] player_set_uri API call returned mismatch %s error for unsupported internet feature\\n", __LINE__, API_NAMESPACE, PlayerGetError(nRet));
-                               return 1;
-                       }
-               }
-       #endif
        PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_uri", PlayerGetError(nRet));
 
        nRet = player_prepare(g_player);
@@ -1032,10 +1017,8 @@ int ITc_player_set_unset_video_stream_changed_cb_p(void)
                return 1;
        }
 
-       #if defined(MOBILE) || defined(WEARABLE)        //Starts MOBILE 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 WEARABLE
+       nRet = player_set_display(g_player, PLAYER_DISPLAY_TYPE_EVAS, g_pEvasObject);
+       PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_display", PlayerGetError(nRet));
 
        nRet = player_set_video_stream_changed_cb(g_player, PlayerVideoStreamChangedCallback, NULL);
        PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_set_video_stream_changed_cb", PlayerGetError(nRet));