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,};
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);
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 )
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);
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));