// See the License for the specific language governing permissions and
// limitations under the License.
//
+#include <curl/curl.h>
#include "ITs-player-common.h"
+#include "net_connection.h"
/** @addtogroup itc-player
* @ingroup itc
bool g_bPlayerCallbackParameter;
bool g_bPlayerInterruptCbCallback;
+static connection_h g_connection = NULL;
+
#ifdef TIZENIOT // For TIZENIOT
int g_nTimeoutId;
GMainLoop *g_pMainLoop;
}
#endif // End MOBILE or WEARABLE
+bool CheckOnlineStatus(char *media_path)
+{
+ bool ret = true;
+ CURL *curl = NULL;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, media_path);
+ curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, 10000L);
+
+ res = curl_easy_perform(curl);
+ if(res != CURLE_OK) {
+ FPRINTF("[Line : %d][%s] curl_easy_perform() failed: %s\n", __LINE__, API_NAMESPACE, curl_easy_strerror(res));
+ ret = false;
+ }
+
+ curl_easy_cleanup(curl);
+ }
+
+ return ret;
+
+}
+
+bool CheckConnectionStatistics(connection_h connection, long long *size)
+{
+#define _FEATURE_NAME_WIFI "http://tizen.org/feature/network.wifi"
+#define _FEATURE_NAME_TELEPHONY "http://tizen.org/feature/network.telephony"
+
+ long long rv = 0;
+ int err = CONNECTION_ERROR_NONE;
+ connection_type_e type = CONNECTION_TYPE_DISCONNECTED;
+ bool wifi_supported = false;
+ bool telepony_supported = false;
+
+ system_info_get_platform_bool(_FEATURE_NAME_WIFI, &wifi_supported);
+ system_info_get_platform_bool(_FEATURE_NAME_TELEPHONY, &telepony_supported);
+
+ if (wifi_supported) {
+ type = CONNECTION_TYPE_WIFI;
+ } else if (telepony_supported) {
+ type = CONNECTION_TYPE_CELLULAR;
+ } else {
+ FPRINTF("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
+ return false;
+ }
+
+ err = connection_get_statistics(connection, type, CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA, &rv);
+
+ if (err != CONNECTION_ERROR_NONE) {
+ FPRINTF("[Line : %d][%s] Failed to check connection statistics.\\n", __LINE__, API_NAMESPACE);
+ return false;
+ } else {
+ FPRINTF("[Line : %d][%s] WiFi last recv data size [%lld]\\n", __LINE__, API_NAMESPACE, rv);
+ }
+
+ *size = rv;
+ return true;
+}
+
+
+int PlayerPrepareWithConnectionCheck(player_h g_player)
+{
+ int ret = PLAYER_ERROR_NONE;
+ long long before = 0, after = 0;
+
+ if (connection_create(&g_connection) != CONNECTION_ERROR_NONE) {
+ FPRINTF("[Line : %d][%s] Failed to create connection handle\\n", __LINE__, API_NAMESPACE);
+ } else {
+ FPRINTF("[Line : %d][%s] Success to create connection handle %p\\n", __LINE__, API_NAMESPACE, g_connection);
+ }
+
+ if (g_connection && !CheckConnectionStatistics(g_connection, &before)) {
+ FPRINTF("[Line : %d][%s] Failed to get connection statistics\\n", __LINE__, API_NAMESPACE);
+ }
+
+ ret = player_prepare(g_player);
+ if (g_connection) {
+ if (!CheckConnectionStatistics(g_connection, &after)) {
+ FPRINTF("[Line : %d][%s] Failed to get connection statistics\\n", __LINE__, API_NAMESPACE);
+ } else {
+ FPRINTF("[Line : %d][%s][Reference] total received data [%lld]\\n",
+ __LINE__, API_NAMESPACE, (after-before));
+ }
+ }
+
+ if (g_connection && connection_destroy(g_connection) != CONNECTION_ERROR_NONE) {
+ FPRINTF("[Line : %d][%s] Failed to destroy connection handle\\n", __LINE__, API_NAMESPACE);
+ }
+
+ return ret;
+}
+
+
+static int PlayerStartWithConnectionCheck(player_h g_player, char* media_path)
+{
+ int ret = PLAYER_ERROR_NONE;
+ long long before = 0, after = 0;
+
+ if (!CheckOnlineStatus(media_path)) {
+ FPRINTF("[Line : %d][%s][Reference] network is disconnected\\n", __LINE__, API_NAMESPACE);
+ }
+
+ if (connection_create(&g_connection) != CONNECTION_ERROR_NONE) {
+ FPRINTF("[Line : %d][%s] Failed to create connection handle\\n", __LINE__, API_NAMESPACE);
+ } else {
+ FPRINTF("[Line : %d][%s] Success to create connection handle %p\\n", __LINE__, API_NAMESPACE, g_connection);
+ }
+
+ if (g_connection && !CheckConnectionStatistics(g_connection, &before)) {
+ FPRINTF("[Line : %d][%s] Failed to get connection statistics\\n", __LINE__, API_NAMESPACE);
+ }
+
+ ret = player_prepare(g_player);
+ if (ret != PLAYER_ERROR_NONE) {
+ if (g_connection) {
+ if (!CheckConnectionStatistics(g_connection, &after)) {
+ FPRINTF("[Line : %d][%s] Failed to get connection statistics\\n", __LINE__, API_NAMESPACE);
+ } else {
+ FPRINTF("[Line : %d][%s][Reference] total received data [%lld]\\n",
+ __LINE__, API_NAMESPACE, (after-before));
+ }
+ }
+
+ FPRINTF("[Line : %d][%s] player_prepare failed, error returned = %s\\n",
+ __LINE__, API_NAMESPACE, PlayerGetError(ret));
+ goto EXIT;
+ }
+
+ sleep(3);
+
+ /* progressive download case have to include player_start for checking network env */
+ ret = player_start(g_player);
+
+ if (g_connection) {
+ if (!CheckConnectionStatistics(g_connection, &after)) {
+ FPRINTF("[Line : %d][%s] Failed to get connection statistics\\n", __LINE__, API_NAMESPACE);
+ } else {
+ FPRINTF("[Line : %d][%s][Reference] total received data [%lld]\\n", __LINE__, API_NAMESPACE, (after-before));
+ }
+ }
+
+ if (ret != PLAYER_ERROR_NONE) {
+ FPRINTF("[Line : %d][%s] player_start failed, error returned = %s\\n",
+ __LINE__, API_NAMESPACE, PlayerGetError(ret));
+ }
+
+EXIT:
+ if (g_connection && connection_destroy(g_connection) != CONNECTION_ERROR_NONE) {
+ FPRINTF("[Line : %d][%s] Failed to destroy connection handle\\n", __LINE__, API_NAMESPACE);
+ }
+
+ return ret;
+}
/** @addtogroup itc-player-testcases
sleep(3);
- nRet = player_prepare(g_player);
+ nRet = PlayerPrepareWithConnectionCheck(g_player);
PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
nRet = player_get_state(g_player,&state);
sleep(3);
- nRet = player_prepare(g_player);
- PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
-
- sleep(3);
-
- nRet = player_start(g_player);
- PRINT_RESULT_CLEANUP(PLAYER_ERROR_NONE, nRet, "player_start", PlayerGetError(nRet), player_unprepare(g_player));
+ nRet = PlayerStartWithConnectionCheck(g_player, pstrValue);
+ PRINT_RESULT_CLEANUP(PLAYER_ERROR_NONE, nRet, "start playback", PlayerGetError(nRet), player_unprepare(g_player));
nRet = player_get_state(g_player,&state);
PRINT_RESULT_CLEANUP(PLAYER_ERROR_NONE, nRet, "player_get_state", PlayerGetError(nRet), player_stop(g_player);player_unprepare(g_player));
sleep(3);
- nRet = player_prepare(g_player);
- PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
-
- sleep(3);
-
- nRet = player_start(g_player);
- PRINT_RESULT_CLEANUP(PLAYER_ERROR_NONE, nRet, "player_start", PlayerGetError(nRet), player_unprepare(g_player));
+ nRet = PlayerStartWithConnectionCheck(g_player, pstrValue);
+ PRINT_RESULT_CLEANUP(PLAYER_ERROR_NONE, nRet, "start playback", PlayerGetError(nRet), player_unprepare(g_player));
nRet = player_get_state(g_player,&state);
PRINT_RESULT_CLEANUP(PLAYER_ERROR_NONE, nRet, "player_get_state", PlayerGetError(nRet), player_stop(g_player);player_unprepare(g_player));
sleep(3);
- nRet = player_prepare(g_player);
- PRINT_RESULT(PLAYER_ERROR_NONE, nRet, "player_prepare", PlayerGetError(nRet));
-
- nRet = player_get_state(g_player,&state);
- PRINT_RESULT_CLEANUP(PLAYER_ERROR_NONE, nRet, "player_get_state", PlayerGetError(nRet), player_unprepare(g_player));
-
- PlayerGetState(state);
- if ( state != PLAYER_STATE_READY )
- {
- FPRINTF("[Line : %d][%s] Player state does not change after player_prepare() call", __LINE__, API_NAMESPACE);
- return 1;
- }
-
- sleep(3);
-
- nRet = player_start(g_player);
- PRINT_RESULT_CLEANUP(PLAYER_ERROR_NONE, nRet, "player_start", PlayerGetError(nRet), player_unprepare(g_player));
+ nRet = PlayerStartWithConnectionCheck(g_player, pstrValue);
+ PRINT_RESULT_CLEANUP(PLAYER_ERROR_NONE, nRet, "start playback", PlayerGetError(nRet), player_unprepare(g_player));
nRet = player_get_state(g_player,&state);
PRINT_RESULT_CLEANUP(PLAYER_ERROR_NONE, nRet, "player_get_state", PlayerGetError(nRet), player_stop(g_player);player_unprepare(g_player));
// limitations under the License.
//
#include "assert.h"
-#include <media/player.h>
#include <glib.h>
#include <Elementary.h>
#include <storage.h>
#include <system_info.h>
+#include <media/player.h>
+#include <curl/curl.h>
#include "tct_common.h"
+#include "net_connection.h"
#define API_NAMESPACE "[PLAYER]"
static char* download = "test.pd";
static char* download_path = NULL;
-static player_h player;
+static player_h player = NULL;
+static connection_h connection = NULL;
+static bool wifi_supported = false;
+static bool telepony_supported = false;
+static bool ethernet_supported = false;
static bool _is_broken = false;
static bool _is_pass = false;
return true;
}
+bool check_online_status(char *media_path)
+{
+ bool ret = true;
+ CURL *curl = NULL;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, media_path);
+ curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, 10000L);
+
+ res = curl_easy_perform(curl);
+ if(res != CURLE_OK) {
+ PRINT_UTC_LOG("[Line : %d][%s] curl_easy_perform() failed: %s\n", __LINE__, API_NAMESPACE, curl_easy_strerror(res));
+ ret = false;
+ }
+
+ curl_easy_cleanup(curl);
+ }
+
+ return ret;
+
+}
+
+bool check_connection_statistics(connection_h connection, long long *size)
+{
+ long long rv = 0;
+ int err = CONNECTION_ERROR_NONE;
+ connection_type_e type = CONNECTION_TYPE_DISCONNECTED;
+
+ if (wifi_supported) {
+ type = CONNECTION_TYPE_WIFI;
+ } else if (telepony_supported) {
+ type = CONNECTION_TYPE_CELLULAR;
+ } else {
+ PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
+ return false;
+ }
+
+ err = connection_get_statistics(connection, type, CONNECTION_STATISTICS_TYPE_TOTAL_RECEIVED_DATA, &rv);
+
+ if (err != CONNECTION_ERROR_NONE) {
+ PRINT_UTC_LOG("[Line : %d][%s] Failed to check connection statistics.\\n", __LINE__, API_NAMESPACE);
+ return false;
+ } else {
+ PRINT_UTC_LOG("[Line : %d][%s] WiFi last recv data size [%lld]\\n", __LINE__, API_NAMESPACE, rv);
+ }
+
+ *size = rv;
+ return true;
+}
+
+static int _player_prepare_with_connection_check(gchar *media_path)
+{
+ int ret = PLAYER_ERROR_NONE;
+ long long before = 0, after = 0;
+
+ if (!check_online_status(media_path)) {
+ PRINT_UTC_LOG("[Line : %d][%s][Reference] network is disconnected\\n", __LINE__, API_NAMESPACE);
+ }
+
+ if (connection && !check_connection_statistics(connection, &before)) {
+ PRINT_UTC_LOG("[Line : %d][%s] Failed to get connection statistics\\n", __LINE__, API_NAMESPACE);
+ }
+
+ ret = player_prepare(player);
+
+ if (connection) {
+ if (!check_connection_statistics(connection, &after)) {
+ PRINT_UTC_LOG("[Line : %d][%s] Failed to get connection statistics\\n", __LINE__, API_NAMESPACE);
+ } else {
+ PRINT_UTC_LOG("[Line : %d][%s][Reference] total received data [%lld]\\n", __LINE__, API_NAMESPACE, (after-before));
+ }
+ }
+
+ if (ret != PLAYER_ERROR_NONE) {
+ PRINT_UTC_LOG("[Line : %d][%s] Failed to player_prepare 0x%X\\n", __LINE__, API_NAMESPACE, ret);
+ }
+
+ return ret;
+}
+
+static int _player_prepare_start_with_connection_check(gchar *media_path)
+{
+ int ret = PLAYER_ERROR_NONE;
+ long long before = 0, after = 0;
+
+ if (!check_online_status(media_path)) {
+ PRINT_UTC_LOG("[Line : %d][%s][Reference] network is disconnected\\n", __LINE__, API_NAMESPACE);
+ }
+
+ if (connection && !check_connection_statistics(connection, &before)) {
+ PRINT_UTC_LOG("[Line : %d][%s] Failed to get connection statistics\\n", __LINE__, API_NAMESPACE);
+ }
+
+ ret = player_prepare(player);
+
+ if (ret != PLAYER_ERROR_NONE) {
+ if (connection) {
+ if (!check_connection_statistics(connection, &after)) {
+ PRINT_UTC_LOG("[Line : %d][%s] Failed to get connection statistics\\n", __LINE__, API_NAMESPACE);
+ } else {
+ PRINT_UTC_LOG("[Line : %d][%s][Reference] total received data [%lld]\\n",
+ __LINE__, API_NAMESPACE, (after-before));
+ }
+ }
+
+ PRINT_UTC_LOG("[Line : %d][%s] Failed to player_prepare 0x%X\\n", __LINE__, API_NAMESPACE, ret);
+ return ret;
+ }
+
+ /* progressive download case have to include player_start for checking network env */
+ ret = player_start(player);
+
+ if (connection) {
+ if (!check_connection_statistics(connection, &after)) {
+ PRINT_UTC_LOG("[Line : %d][%s] Failed to get connection statistics\\n", __LINE__, API_NAMESPACE);
+ } else {
+ PRINT_UTC_LOG("[Line : %d][%s][Reference] total received data [%lld]\\n", __LINE__, API_NAMESPACE, (after-before));
+ }
+ }
+
+ if (ret != PLAYER_ERROR_NONE) {
+ PRINT_UTC_LOG("[Line : %d][%s] Failed to player_start 0x%X\\n", __LINE__, API_NAMESPACE, ret);
+ }
+
+ return ret;
+}
bool check_network_supportable(void)
{
-#define _FEATURE_NAME_WIFI "http://tizen.org/feature/network.wifi"
-#define _FEATURE_NAME_TELEPHONY "http://tizen.org/feature/network.telephony"
-#define _FEATURE_NAME_ETHERNET "http://tizen.org/feature/network.ethernet"
- bool wifi_supported = FALSE;
- bool telepony_supported = FALSE;
- bool ethernet_supported = FALSE;
+#define _FEATURE_NAME_WIFI "http://tizen.org/feature/network.wifi"
+#define _FEATURE_NAME_TELEPHONY "http://tizen.org/feature/network.telephony"
+#define _FEATURE_NAME_ETHERNET "http://tizen.org/feature/network.ethernet"
- system_info_get_platform_bool(_FEATURE_NAME_WIFI, &wifi_supported);
- system_info_get_platform_bool(_FEATURE_NAME_TELEPHONY, &telepony_supported);
- system_info_get_platform_bool(_FEATURE_NAME_ETHERNET, ðernet_supported);
+ system_info_get_platform_bool(_FEATURE_NAME_WIFI, &wifi_supported);
+ system_info_get_platform_bool(_FEATURE_NAME_TELEPHONY, &telepony_supported);
+ system_info_get_platform_bool(_FEATURE_NAME_ETHERNET, ðernet_supported);
- if (wifi_supported || telepony_supported || ethernet_supported)
- return true;
+ if (wifi_supported || telepony_supported || ethernet_supported)
+ return true;
- PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
- return false;
+ PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
+ return false;
}
/**
_is_network_supportable = check_network_supportable();
- if ( true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE ))
- {
+ if (true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE)) {
PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE, pszValue);
unsigned int size_of_path = strlen(pszValue) + strlen(download) + 11;
download_path = (char*)malloc(size_of_path);
snprintf(download_path, size_of_path, "%s/res/res/%s", pszValue, download);
- }
- else
- {
+ } else {
PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
}
- if ( true != get_value_from_config("PLAYER_DOWNLOAD_PROGRESS_URL", g_media_path) )
- {
+ if (true != get_value_from_config("PLAYER_DOWNLOAD_PROGRESS_URL", g_media_path)) {
PRINT_UTC_LOG("[Line : %d][%s] Failed to get value from config\\n", __LINE__, API_NAMESPACE);
_is_broken = true;
}
- if ( true != get_value_from_config("PLAYER_ADAPTIVE_STREAMING_URL", g_media_adaptive_path) )
- {
+ if (true != get_value_from_config("PLAYER_ADAPTIVE_STREAMING_URL", g_media_adaptive_path)) {
PRINT_UTC_LOG("[Line : %d][%s] Failed to get value from config\\n", __LINE__, API_NAMESPACE);
_is_broken = true;
}
_is_broken = true;
return;
}
+
+ if (connection_create(&connection) != CONNECTION_ERROR_NONE) {
+ PRINT_UTC_LOG("[Line : %d][%s] Failed to create connection handle\\n", __LINE__, API_NAMESPACE);
+ } else {
+ PRINT_UTC_LOG("[Line : %d][%s] Success to create connection handle %p\\n", __LINE__, API_NAMESPACE, connection);
+ }
}
/**
*/
void utc_media_player_streaming_cleanup(void)
{
+ if (connection && connection_destroy(connection) != CONNECTION_ERROR_NONE) {
+ PRINT_UTC_LOG("[Line : %d][%s] Failed to destroy connection handle\\n", __LINE__, API_NAMESPACE);
+ }
+
player_destroy(player);
- if(download_path)
+ if (download_path)
free(download_path);
}
static void _player_pd_message_cb(player_pd_message_type_e type, void *user_data)
{
- if(type==PLAYER_PD_STARTED || type==PLAYER_PD_COMPLETED)
+ if (type == PLAYER_PD_STARTED || type == PLAYER_PD_COMPLETED)
_is_pass = TRUE;
}
*/
int utc_media_player_get_streaming_download_progress_p(void)
{
- assert(!_is_broken);
- int start;
- int current;
+ assert(!_is_broken);
- int ret = player_set_streaming_cookie(player, COOKIE_EXAMPLE, sizeof(COOKIE_EXAMPLE));
- assert_eq(ret, PLAYER_ERROR_NONE);
+ int ret = PLAYER_ERROR_NONE;
+ int start;
+ int current;
- int ret2 = player_set_uri(player, g_media_path);
- assert_eq(ret2, PLAYER_ERROR_NONE);
+ ret = player_set_streaming_cookie(player, COOKIE_EXAMPLE, sizeof(COOKIE_EXAMPLE));
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret3 = player_prepare(player);
- // if wifi isn't connected or internet modules don't exist, this error will be returned.
- // and it is wrongly detected as a fail. so we will skip the test on these cases.
- if(ret3==PLAYER_ERROR_CONNECTION_FAILED) {
- PRINT_UTC_LOG("[Line : %d][%s] check network status\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- assert_eq(ret3, PLAYER_ERROR_NONE);
+ ret = player_set_uri(player, g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret4 = player_start(player);
- assert_eq(ret4, PLAYER_ERROR_NONE);
+ ret = _player_prepare_with_connection_check(g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret5 = player_get_streaming_download_progress(player, &start, ¤t);
- assert_eq(ret5, PLAYER_ERROR_NONE);
+ ret = player_start(player);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret6 = player_stop(player);
- assert_eq(ret6, PLAYER_ERROR_NONE);
+ ret = player_get_streaming_download_progress(player, &start, ¤t);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret7 = player_unprepare(player);
- assert_eq(ret7, PLAYER_ERROR_NONE);
+ ret = player_stop(player);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- if (start < 0 || start > 100 || current < 0 || current > 100) {
- assert(false);
- }
+ ret = player_unprepare(player);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- return 0;
+ if (start < 0 || start > 100 || current < 0 || current > 100) {
+ assert(false);
+ }
+
+ return 0;
}
/**
*/
int utc_media_player_get_streaming_download_progress_n(void)
{
- int start;
- int current;
+ int ret = PLAYER_ERROR_NONE;
+ int start;
+ int current;
- int ret = player_set_streaming_cookie(player, COOKIE_EXAMPLE, sizeof(COOKIE_EXAMPLE));
- assert_eq(ret, PLAYER_ERROR_NONE);
+ ret = player_set_streaming_cookie(player, COOKIE_EXAMPLE, sizeof(COOKIE_EXAMPLE));
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret2 = player_set_uri(player, g_media_path);
- assert_eq(ret2, PLAYER_ERROR_NONE);
+ ret = player_set_uri(player, g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret3 = player_prepare(player);
- // if wifi isn't connected or internet modules don't exist, this error will be returned.
- // and it is wrongly detected as a fail. so we will skip the test on these cases.
- if(ret3==PLAYER_ERROR_CONNECTION_FAILED) {
- PRINT_UTC_LOG("[Line : %d][%s] check network status\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- assert_eq(ret3, PLAYER_ERROR_NONE);
+ ret = _player_prepare_with_connection_check(g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret4 = player_start(player);
- assert_eq(ret4, PLAYER_ERROR_NONE);
+ ret = player_start(player);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret5 = player_get_streaming_download_progress(NULL, &start, ¤t);
- assert_eq(ret5, PLAYER_ERROR_INVALID_PARAMETER);
+ ret = player_get_streaming_download_progress(NULL, &start, ¤t);
+ assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
- int ret6 = player_stop(player);
- assert_eq(ret6, PLAYER_ERROR_NONE);
+ ret = player_stop(player);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret7 = player_unprepare(player);
- assert_eq(ret7, PLAYER_ERROR_NONE);
+ ret = player_unprepare(player);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_media_player_get_streaming_download_progress_n2(void)
{
+ int ret = PLAYER_ERROR_NONE;
int start;
int current;
- int ret = player_set_streaming_cookie(player, COOKIE_EXAMPLE, sizeof(COOKIE_EXAMPLE));
+ ret = player_set_streaming_cookie(player, COOKIE_EXAMPLE, sizeof(COOKIE_EXAMPLE));
assert_eq(ret, PLAYER_ERROR_NONE);
- int ret2 = player_set_uri(player, g_media_path);
- assert_eq(ret2, PLAYER_ERROR_NONE);
+ ret = player_set_uri(player, g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret5 = player_get_streaming_download_progress(player, &start, ¤t);
- assert_eq(ret5, PLAYER_ERROR_INVALID_STATE);
+ ret = player_get_streaming_download_progress(player, &start, ¤t);
+ assert_eq(ret, PLAYER_ERROR_INVALID_STATE);
return 0;
}
*/
int utc_media_player_get_progressive_download_status_p(void)
{
- assert(!_is_broken);
- unsigned long current;
- unsigned long total_size;
+ assert(!_is_broken);
- int ret = player_set_uri(player, g_media_path);
- assert_eq(ret, PLAYER_ERROR_NONE);
+ int ret = PLAYER_ERROR_NONE;
+ unsigned long current;
+ unsigned long total_size;
- int ret2 = player_set_progressive_download_path(player, download_path);
- // if wifi isn't connected or internet modules don't exist, this error will be returned.
- // and it is wrongly detected as a fail. so we will skip the test on these cases.
- if ((ret2==PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) &&
- (!_is_network_supportable)) {
- PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- assert_eq(ret2, PLAYER_ERROR_NONE);
+ ret = player_set_uri(player, g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret3 = player_prepare(player);
- assert_eq(ret3, PLAYER_ERROR_NONE);
+ ret = player_set_progressive_download_path(player, download_path);
+ // if wifi isn't connected or internet modules don't exist, this error will be returned.
+ // and it is wrongly detected as a fail. so we will skip the test on these cases.
+ if ((ret == PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) &&
+ (!_is_network_supportable)) {
+ PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
+ return 0;
+ }
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret4 = player_start(player);
- assert_eq(ret4, PLAYER_ERROR_NONE);
+ ret = _player_prepare_start_with_connection_check(g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret5 = player_get_progressive_download_status(player, ¤t, &total_size);
- assert_eq(ret5, PLAYER_ERROR_NONE);
+ ret = player_get_progressive_download_status(player, ¤t, &total_size);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- wait_for_async();
+ wait_for_async();
- int ret7 = player_unprepare(player);
- assert_eq(ret7, PLAYER_ERROR_NONE);
+ ret = player_unprepare(player);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- return 0;
+ return 0;
}
/**
*/
int utc_media_player_get_progressive_download_status_n(void)
{
- unsigned long current;
- unsigned long total_size;
+ int ret = PLAYER_ERROR_NONE;
+ unsigned long current;
+ unsigned long total_size;
- int ret = player_set_uri(player, g_media_path);
- assert_eq(ret, PLAYER_ERROR_NONE);
+ ret = player_set_uri(player, g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret2 = player_set_progressive_download_path(player, download_path);
- // if wifi isn't connected or internet modules don't exist, this error will be returned.
- // and it is wrongly detected as a fail. so we will skip the test on these cases.
- if ((ret2==PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) &&
- (!_is_network_supportable)) {
- PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- assert_eq(ret2, PLAYER_ERROR_NONE);
+ ret = player_set_progressive_download_path(player, download_path);
+ // if wifi isn't connected or internet modules don't exist, this error will be returned.
+ // and it is wrongly detected as a fail. so we will skip the test on these cases.
+ if ((ret == PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) &&
+ (!_is_network_supportable)) {
+ PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
+ return 0;
+ }
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret3 = player_prepare(player);
- assert_eq(ret3, PLAYER_ERROR_NONE);
+ ret = _player_prepare_start_with_connection_check(g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret4 = player_start(player);
- assert_eq(ret4, PLAYER_ERROR_NONE);
+ ret = player_get_progressive_download_status(NULL, ¤t, &total_size);
+ assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
- int ret5 = player_get_progressive_download_status(NULL, ¤t, &total_size);
- assert_eq(ret5, PLAYER_ERROR_INVALID_PARAMETER);
+ wait_for_async();
- wait_for_async();
+ ret = player_unprepare(player);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret7 = player_unprepare(player);
- assert_eq(ret7, PLAYER_ERROR_NONE);
-
- return 0;
+ return 0;
}
/**
*/
int utc_media_player_get_progressive_download_status_n2(void)
{
- unsigned long current;
- unsigned long total_size;
-
- int ret = player_set_uri(player, g_media_path);
- assert_eq(ret, PLAYER_ERROR_NONE);
-
- int ret2 = player_set_progressive_download_path(player, download_path);
- // if wifi isn't connected or internet modules don't exist, this error will be returned.
- // and it is wrongly detected as a fail. so we will skip the test on these cases.
- if ((ret2==PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) &&
- (!_is_network_supportable)) {
- PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- assert_eq(ret2, PLAYER_ERROR_NONE);
-
- int ret5 = player_get_progressive_download_status(player, ¤t, &total_size);
- assert_eq(ret5, PLAYER_ERROR_INVALID_STATE);
-
- return 0;
+ int ret = PLAYER_ERROR_NONE;
+ unsigned long current;
+ unsigned long total_size;
+
+ ret = player_set_uri(player, g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
+
+ ret = player_set_progressive_download_path(player, download_path);
+ // if wifi isn't connected or internet modules don't exist, this error will be returned.
+ // and it is wrongly detected as a fail. so we will skip the test on these cases.
+ if ((ret == PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) &&
+ (!_is_network_supportable)) {
+ PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
+ return 0;
+ }
+ assert_eq(ret, PLAYER_ERROR_NONE);
+
+ ret = player_get_progressive_download_status(player, ¤t, &total_size);
+ assert_eq(ret, PLAYER_ERROR_INVALID_STATE);
+
+ return 0;
}
/**
*/
int utc_media_player_set_progressive_download_path_p(void)
{
- int ret = player_set_uri(player, g_media_path);
- assert_eq(ret, PLAYER_ERROR_NONE);
-
- int ret2 = player_set_progressive_download_path(player, download_path);
- // if wifi isn't connected or internet modules don't exist, this error will be returned.
- // and it is wrongly detected as a fail. so we will skip the test on these cases.
- if ((ret2==PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) &&
- (!_is_network_supportable)) {
- PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- assert_eq(ret2, PLAYER_ERROR_NONE);
-
- return 0;
+ int ret = PLAYER_ERROR_NONE;
+
+ ret = player_set_uri(player, g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
+
+ ret = player_set_progressive_download_path(player, download_path);
+ // if wifi isn't connected or internet modules don't exist, this error will be returned.
+ // and it is wrongly detected as a fail. so we will skip the test on these cases.
+ if ((ret == PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) &&
+ (!_is_network_supportable)) {
+ PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
+ return 0;
+ }
+ assert_eq(ret, PLAYER_ERROR_NONE);
+
+ return 0;
}
/**
*/
int utc_media_player_set_progressive_download_path_n(void)
{
- assert(!_is_broken);
+ assert(!_is_broken);
- int ret = player_set_uri(player, g_media_path);
- assert_eq(ret, PLAYER_ERROR_NONE);
+ int ret = PLAYER_ERROR_NONE;
- int ret2 = player_set_progressive_download_path(NULL, download_path);
- assert_eq(ret2, PLAYER_ERROR_INVALID_PARAMETER);
+ ret = player_set_uri(player, g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- return 0;
+ ret = player_set_progressive_download_path(NULL, download_path);
+ assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
+
+ return 0;
}
/**
*/
int utc_media_player_set_progressive_download_message_cb_p(void)
{
- assert(!_is_broken);
+ assert(!_is_broken);
+ int ret = PLAYER_ERROR_NONE;
- int ret = player_set_uri(player, g_media_path);
- if (PLAYER_ERROR_NONE != ret)
- PRINT_UTC_LOG("[Line : %d][%s] player_set_uri is failed\\n", __LINE__, API_NAMESPACE);
-
- ret = player_set_display(player, PLAYER_DISPLAY_TYPE_NONE, NULL);
- if (PLAYER_ERROR_NONE != ret)
- PRINT_UTC_LOG("[Line : %d][%s] player_set_display failed\\n", __LINE__, API_NAMESPACE);
-
- ret = player_set_progressive_download_path(player, download_path);
- if (PLAYER_ERROR_NONE != ret)
- PRINT_UTC_LOG("[Line : %d][%s] player_set_progressive_download_path is failed\\n", __LINE__, API_NAMESPACE);
-
- ret = player_set_progressive_download_message_cb(player, _player_pd_message_cb, NULL);
- // if wifi isn't connected or internet modules don't exist, this error will be returned.
- // and it is wrongly detected as a fail. so we will skip the test on these cases.
- if ((ret==PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) &&
- (!_is_network_supportable)) {
- PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- assert_eq(ret, PLAYER_ERROR_NONE);
+ ret = player_set_uri(player, g_media_path);
+ if (PLAYER_ERROR_NONE != ret)
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_uri is failed\\n", __LINE__, API_NAMESPACE);
- ret = player_prepare(player);
- if (PLAYER_ERROR_NONE != ret)
- PRINT_UTC_LOG("[Line : %d][%s] player isn't prepared\\n", __LINE__, API_NAMESPACE);
+ ret = player_set_display(player, PLAYER_DISPLAY_TYPE_NONE, NULL);
+ if (PLAYER_ERROR_NONE != ret)
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display failed\\n", __LINE__, API_NAMESPACE);
- ret = player_start(player);
- if (PLAYER_ERROR_NONE != ret)
- PRINT_UTC_LOG("[Line : %d][%s] player isn't started\\n", __LINE__, API_NAMESPACE);
+ ret = player_set_progressive_download_path(player, download_path);
+ if (PLAYER_ERROR_NONE != ret)
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_progressive_download_path is failed\\n", __LINE__, API_NAMESPACE);
- wait_for_async();
+ ret = player_set_progressive_download_message_cb(player, _player_pd_message_cb, NULL);
+ // if wifi isn't connected or internet modules don't exist, this error will be returned.
+ // and it is wrongly detected as a fail. so we will skip the test on these cases.
+ if ((ret == PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE) &&
+ (!_is_network_supportable)) {
+ PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
+ return 0;
+ }
+ assert_eq(ret, PLAYER_ERROR_NONE);
- if(_is_pass)
- PRINT_UTC_LOG("[Line : %d][%s] pd_message_callback is called!\\n", __LINE__, API_NAMESPACE);
+ ret = _player_prepare_start_with_connection_check(g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- return 0;
+ wait_for_async();
+
+ if(_is_pass)
+ PRINT_UTC_LOG("[Line : %d][%s] pd_message_callback is called!\\n", __LINE__, API_NAMESPACE);
+
+ return 0;
}
/**
*/
int utc_media_player_set_progressive_download_message_cb_n2(void)
{
- int ret = player_set_uri(player, g_media_path);
- if (PLAYER_ERROR_NONE != ret)
- PRINT_UTC_LOG("[Line : %d][%s] player_set_uri is failed\\n", __LINE__, API_NAMESPACE);
+ int ret = player_set_uri(player, g_media_path);
+ if (PLAYER_ERROR_NONE != ret)
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_uri is failed\\n", __LINE__, API_NAMESPACE);
- ret = player_set_display(player, PLAYER_DISPLAY_TYPE_NONE, NULL);
- if (PLAYER_ERROR_NONE != ret)
- PRINT_UTC_LOG("[Line : %d][%s] player_set_display failed\\n", __LINE__, API_NAMESPACE);
+ ret = player_set_display(player, PLAYER_DISPLAY_TYPE_NONE, NULL);
+ if (PLAYER_ERROR_NONE != ret)
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display failed\\n", __LINE__, API_NAMESPACE);
- ret = player_set_progressive_download_path(player, download_path);
- if (PLAYER_ERROR_NONE != ret)
- PRINT_UTC_LOG("[Line : %d][%s] player_set_progressive_download_path is failed\\n", __LINE__, API_NAMESPACE);
+ ret = player_set_progressive_download_path(player, download_path);
+ if (PLAYER_ERROR_NONE != ret)
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_progressive_download_path is failed\\n", __LINE__, API_NAMESPACE);
- ret = player_prepare(player);
- // if wifi isn't connected or internet modules don't exist, this error will be returned.
- // and it is wrongly detected as a fail. so we will skip the test on these cases.
- if(ret==PLAYER_ERROR_CONNECTION_FAILED) {
- PRINT_UTC_LOG("[Line : %d][%s] check network status\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
+ ret = _player_prepare_start_with_connection_check(g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- ret = player_start(player);
- if (PLAYER_ERROR_NONE != ret)
- PRINT_UTC_LOG("[Line : %d][%s] player isn't started\\n", __LINE__, API_NAMESPACE);
+ ret = player_set_progressive_download_message_cb(player, _player_pd_message_cb, NULL);
+ assert_eq(ret, PLAYER_ERROR_INVALID_STATE);
- ret = player_set_progressive_download_message_cb(player, _player_pd_message_cb, NULL);
- assert_eq(ret, PLAYER_ERROR_INVALID_STATE);
-
- return 0;
+ return 0;
}
/**
*/
int utc_media_player_foreach_adaptive_variant_p(void)
{
- assert(!_is_broken);
+ assert(!_is_broken);
+ int ret = PLAYER_ERROR_NONE;
- int ret = player_set_uri(player, g_media_adaptive_path);
- assert_eq(ret, PLAYER_ERROR_NONE);
+ ret = player_set_uri(player, g_media_adaptive_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret2 = player_prepare(player);
- // if wifi isn't connected or internet modules don't exist, this error will be returned.
- // and it is wrongly detected as a fail. so we will skip the test on these cases.
- if (ret2 == PLAYER_ERROR_CONNECTION_FAILED) {
- PRINT_UTC_LOG("[Line : %d][%s] check network status\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- assert_eq(ret2, PLAYER_ERROR_NONE);
+ ret = _player_prepare_with_connection_check(g_media_adaptive_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret3 = player_foreach_adaptive_variant(player, (player_adaptive_variant_cb)_player_adaptive_variant_cb, player);
- assert_eq(ret3, PLAYER_ERROR_NONE);
- assert(_is_pass);
+ ret = player_foreach_adaptive_variant(player, (player_adaptive_variant_cb)_player_adaptive_variant_cb, player);
+ assert_eq(ret, PLAYER_ERROR_NONE);
+ assert(_is_pass);
- return 0;
+ return 0;
}
/**
*/
int utc_media_player_foreach_adaptive_variant_n(void)
{
- assert(!_is_broken);
+ assert(!_is_broken);
+ int ret = PLAYER_ERROR_NONE;
- int ret = player_set_uri(player, g_media_adaptive_path);
- assert_eq(ret, PLAYER_ERROR_NONE);
+ ret = player_set_uri(player, g_media_adaptive_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret2 = player_prepare(player);
- // if wifi isn't connected or internet modules don't exist, this error will be returned.
- // and it is wrongly detected as a fail. so we will skip the test on these cases.
- if (ret2 == PLAYER_ERROR_CONNECTION_FAILED) {
- PRINT_UTC_LOG("[Line : %d][%s] check network status\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- assert_eq(ret2, PLAYER_ERROR_NONE);
+ ret = _player_prepare_with_connection_check(g_media_adaptive_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret3 = player_foreach_adaptive_variant(player, NULL, player);
- assert_eq(ret3, PLAYER_ERROR_INVALID_PARAMETER);
+ ret = player_foreach_adaptive_variant(player, NULL, player);
+ assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
- return 0;
+ return 0;
}
/**
*/
int utc_media_player_set_get_max_adaptive_variant_limit_p(void)
{
- assert(!_is_broken);
- int bandwidth = 500000, width = 1920, height = 1080;
- int get_bandwidth = 0, get_width = 0, get_height = 0;
+ assert(!_is_broken);
- int ret = player_set_uri(player, g_media_adaptive_path);
- assert_eq(ret, PLAYER_ERROR_NONE);
+ int ret = PLAYER_ERROR_NONE;
+ int bandwidth = 500000, width = 1920, height = 1080;
+ int get_bandwidth = 0, get_width = 0, get_height = 0;
- int ret2 = player_prepare(player);
- // if wifi isn't connected or internet modules don't exist, this error will be returned.
- // and it is wrongly detected as a fail. so we will skip the test on these cases.
- if (ret2 == PLAYER_ERROR_CONNECTION_FAILED) {
- PRINT_UTC_LOG("[Line : %d][%s] check network status\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- assert_eq(ret2, PLAYER_ERROR_NONE);
+ ret = player_set_uri(player, g_media_adaptive_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret3 = player_set_max_adaptive_variant_limit(player, bandwidth, width, height);
- assert_eq(ret3, PLAYER_ERROR_NONE);
+ ret = _player_prepare_with_connection_check(g_media_adaptive_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret4 = player_get_max_adaptive_variant_limit(player, &get_bandwidth, &get_width, &get_height);
- assert_eq(ret4, PLAYER_ERROR_NONE);
- assert_eq(bandwidth, get_bandwidth);
- assert_eq(width, get_width);
- assert_eq(height, get_height);
+ ret = player_set_max_adaptive_variant_limit(player, bandwidth, width, height);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- return 0;
+ ret = player_get_max_adaptive_variant_limit(player, &get_bandwidth, &get_width, &get_height);
+ assert_eq(ret, PLAYER_ERROR_NONE);
+ assert_eq(bandwidth, get_bandwidth);
+ assert_eq(width, get_width);
+ assert_eq(height, get_height);
+
+ return 0;
}
/**
*/
int utc_media_player_set_get_streaming_buffering_time_p(void)
{
- assert(!_is_broken);
- int btime = 50000, rbtime = 100000;
- int get_btime = 0, get_rbtime = 0;
+ assert(!_is_broken);
+ int ret = PLAYER_ERROR_NONE;
+ int btime = 50000, rbtime = 100000;
+ int get_btime = 0, get_rbtime = 0;
- int ret = player_set_uri(player, g_media_path);
- assert_eq(ret, PLAYER_ERROR_NONE);
+ ret = player_set_uri(player, g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret2 = player_set_streaming_buffering_time(player, btime, rbtime);
- assert_eq(ret2, PLAYER_ERROR_NONE);
+ ret = player_set_streaming_buffering_time(player, btime, rbtime);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret3 = player_prepare(player);
- // if wifi isn't connected or internet modules don't exist, this error will be returned.
- // and it is wrongly detected as a fail. so we will skip the test on these cases.
- if (ret3 == PLAYER_ERROR_CONNECTION_FAILED) {
- PRINT_UTC_LOG("[Line : %d][%s] check network status\\n", __LINE__, API_NAMESPACE);
- return 0;
- }
- assert_eq(ret3, PLAYER_ERROR_NONE);
+ ret = _player_prepare_with_connection_check(g_media_path);
+ assert_eq(ret, PLAYER_ERROR_NONE);
- int ret4 = player_get_streaming_buffering_time(player, &get_btime, &get_rbtime);
- assert_eq(ret4, PLAYER_ERROR_NONE);
- assert_eq(btime, get_btime);
- assert_eq(rbtime, get_rbtime);
+ ret = player_get_streaming_buffering_time(player, &get_btime, &get_rbtime);
+ assert_eq(ret, PLAYER_ERROR_NONE);
+ assert_eq(btime, get_btime);
+ assert_eq(rbtime, get_rbtime);
- return 0;
+ return 0;
}
/**