From: Nibha Sharma Date: Fri, 6 Aug 2021 09:33:20 +0000 (+0530) Subject: [ITC][player-display][NonACR][TSDF-2979, TSDF-2973 Tizeniot tc fail, removed target... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91b6aa0f80a7301af0c089db237a07fe00249b5a;p=test%2Ftct%2Fnative%2Fapi.git [ITC][player-display][NonACR][TSDF-2979, TSDF-2973 Tizeniot tc fail, removed target options] Change-Id: Ib85fd0e38c645e2268d392e4e9d920c4df4f2583 Signed-off-by: Nibha Sharma --- diff --git a/src/itc/player-display/ITs-player-display-common.c b/src/itc/player-display/ITs-player-display-common.c index 5b7f3d94d..7786e0437 100755 --- a/src/itc/player-display/ITs-player-display-common.c +++ b/src/itc/player-display/ITs-player-display-common.c @@ -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 ) diff --git a/src/itc/player-display/ITs-player-display.c b/src/itc/player-display/ITs-player-display.c index 872e1d1ac..ce6048f3a 100755 --- a/src/itc/player-display/ITs-player-display.c +++ b/src/itc/player-display/ITs-player-display.c @@ -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));