static gboolean timeout_func(gpointer data)
{
- fprintf(stderr, "waited 10 seconds\n");
+ PRINT_UTC_LOG("[Line : %d][%s] waited 10 seconds\\n", __LINE__, API_NAMESPACE);
g_main_loop_quit((GMainLoop *) data);
return FALSE;
}
static void seek_start_cb(void *user_data)
{
- fprintf(stderr, "seek start callback\n");
+ PRINT_UTC_LOG("[Line : %d][%s] seek start callback\\n", __LINE__, API_NAMESPACE);
int ret = player_set_play_position(player, 2, TRUE, seek_completed_cb, NULL);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player seek is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] fail to set position\\n", __LINE__, API_NAMESPACE);
}
}
static void _player_prepared_cb(void *user_data)
{
- fprintf(stderr, "prepare callback\n");
+ PRINT_UTC_LOG("[Line : %d][%s] prepare callback\\n", __LINE__, API_NAMESPACE);
int ret = player_start(player);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_start is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] fail to start\\n", __LINE__, API_NAMESPACE);
}
}
void *buf_data_ptr = NULL;
if (media_packet_create_alloc(video_fmt, NULL, NULL, &video_pkt) != MEDIA_PACKET_ERROR_NONE) {
- fprintf(stderr, "media_packet_create_alloc failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] fail to alloc media_packet\\n", __LINE__, API_NAMESPACE);
return;
}
if (media_packet_get_buffer_data_ptr(video_pkt, &buf_data_ptr) != MEDIA_PACKET_ERROR_NONE) {
- fprintf(stderr, "media_packet_get_buffer_data_ptr failed\n");
- return;
+ PRINT_UTC_LOG("[Line : %d][%s] media_packet_get_buffer_data_ptr failed\\n", __LINE__, API_NAMESPACE);
+ goto FREE_PACKET;
}
if (media_packet_set_pts(video_pkt, (uint64_t)(pts/1000000)) != MEDIA_PACKET_ERROR_NONE) {
- fprintf(stderr, "media_packet_set_pts failed\n");
- return;
+ PRINT_UTC_LOG("[Line : %d][%s] media_packet_set_pts failed\\n", __LINE__, API_NAMESPACE);
+ goto FREE_PACKET;
}
/* NOTE: In case of H.264 video, stream format for feeding is NAL unit.
* And, SPS(0x67) and PPS(0x68) should be located before IDR.(0x65).
*/
read = bytestream2nalunit(file_src, buf_data_ptr);
- fprintf(stderr, "real length = %d\n", read);
if (read == 0) {
- fprintf(stderr, "input file read failed\n");
- return;
+ PRINT_UTC_LOG("[Line : %d][%s] input file read failed\\n", __LINE__, API_NAMESPACE);
+ goto FREE_PACKET;
}
if (media_packet_set_buffer_size(video_pkt, (uint64_t)read) != MEDIA_PACKET_ERROR_NONE) {
- fprintf(stderr, "media_packet_set_buffer_size failed\n");
- return;
+ PRINT_UTC_LOG("[Line : %d][%s] media_packet_set_buffer_size failed\\n", __LINE__, API_NAMESPACE);
+ goto FREE_PACKET;
}
/* push media packet */
g_ret = player_push_media_stream(player, video_pkt);
pts += ES_DEFAULT_VIDEO_PTS_OFFSET;
- /* destroy media packet after use*/
+ goto FREE_PACKET;
+
+FREE_PACKET:
+ /* destroy media packet after use */
media_packet_destroy(video_pkt);
video_pkt = NULL;
-
return;
}
ret = player_set_uri(player, ES_FEEDING_PATH);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player didn't set uri\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player didn't set uri\\n", __LINE__, API_NAMESPACE);
_is_broken = true;
}
/* get media format format */
ret = media_format_create(&video_fmt);
if (ret != MEDIA_FORMAT_ERROR_NONE) {
- fprintf(stderr, "media_format_create(v) is failed");
+ PRINT_UTC_LOG("[Line : %d][%s] media_format_create(v) is failed\\n", __LINE__, API_NAMESPACE);
}
ret = media_format_create(&audio_fmt);
if (ret != MEDIA_FORMAT_ERROR_NONE) {
- fprintf(stderr, "media_format_create(a) is failed");
+ PRINT_UTC_LOG("[Line : %d][%s] media_format_create(a) is failed\\n", __LINE__, API_NAMESPACE);
}
/* set format */
{
player_state_e state;
int ret = 0;
- elm_shutdown();
if (video_fmt)
media_format_unref(video_fmt);
if(player){
ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE)
player_unprepare(player);
free(media_path);
if(media_path2)
free(media_path2);
+
+ destroy_window();
+ elm_shutdown();
}
/**
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_info(player, PLAYER_STREAM_TYPE_VIDEO, video_fmt);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_info is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_info is failed\\n", __LINE__, API_NAMESPACE);
}
assert_eq(ret, PLAYER_ERROR_NONE);
- destroy_window();
return 0;
}
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_info(player, PLAYER_STREAM_TYPE_VIDEO, NULL);
assert_eq(ret, PLAYER_ERROR_INVALID_OPERATION);
- destroy_window();
return 0;
}
ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
ret = player_set_media_stream_buffer_status_cb(player, PLAYER_STREAM_TYPE_VIDEO, player_media_stream_buffer_status_callback, NULL);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_buffer_status_cb is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_buffer_status_cb is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_buffer_max_size(player, PLAYER_STREAM_TYPE_VIDEO, ES_BUFFER_MAX_SIZE);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_buffer_status_cb is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_buffer_status_cb is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_seek_cb(player, PLAYER_STREAM_TYPE_VIDEO, player_media_stream_seek_callback, NULL);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_buffer_status_cb is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_buffer_status_cb is failed\\n", __LINE__, API_NAMESPACE);
}
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_info(player, PLAYER_STREAM_TYPE_VIDEO, video_fmt);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_info is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_info is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_prepare_async(player, _player_prepared_cb, (void*)player);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player isn't prepared\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't prepared\\n", __LINE__, API_NAMESPACE);
}
if(pthread_create(&feeding_thread_id, NULL, (void*)feed_video_data_thread_func, NULL)<0) {
- fprintf(stderr, "pthread_create is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] pthread_create is failed\\n", __LINE__, API_NAMESPACE);
return 0;
}
player_stop(player);
player_unprepare(player);
- destroy_window();
feeding_thread_id = 0;
return 0;
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_info(player, PLAYER_STREAM_TYPE_AUDIO, audio_fmt);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_info is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_info is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_prepare_async(player, _player_prepared_cb, (void*)player);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player isn't prepared\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't prepared\\n", __LINE__, API_NAMESPACE);
}
ret = player_push_media_stream(player, NULL);
assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
player_stop(player);
player_unprepare(player);
- destroy_window();
return 0;
}
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_buffer_max_size(player, PLAYER_STREAM_TYPE_VIDEO, 10);
assert_eq(ret, PLAYER_ERROR_NONE);
- destroy_window();
return 0;
}
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_buffer_max_size(NULL, PLAYER_STREAM_TYPE_VIDEO, 10);
assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
- destroy_window();
return 0;
}
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_buffer_max_size(player, PLAYER_STREAM_TYPE_VIDEO, 10);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_buffer_max_size is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_buffer_max_size is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_get_media_stream_buffer_max_size(player, PLAYER_STREAM_TYPE_VIDEO, &max_size);
assert_eq(ret, PLAYER_ERROR_NONE);
- destroy_window();
return 0;
}
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_buffer_max_size(player, PLAYER_STREAM_TYPE_VIDEO, 10);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_buffer_max_size is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_buffer_max_size is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_get_media_stream_buffer_max_size(NULL, PLAYER_STREAM_TYPE_VIDEO, &max_size);
assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
- destroy_window();
return 0;
}
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_buffer_min_threshold(player, PLAYER_STREAM_TYPE_VIDEO, 10);
assert_eq(ret, PLAYER_ERROR_NONE);
- destroy_window();
return 0;
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_buffer_min_threshold(NULL, PLAYER_STREAM_TYPE_VIDEO, 10);
assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
- destroy_window();
return 0;
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_buffer_min_threshold(player, PLAYER_STREAM_TYPE_VIDEO, 10);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_buffer_min_threshold is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_buffer_min_threshold is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_get_media_stream_buffer_min_threshold(player, PLAYER_STREAM_TYPE_VIDEO, &percent);
assert_eq(ret, PLAYER_ERROR_NONE);
- destroy_window();
return 0;
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_buffer_min_threshold(player, PLAYER_STREAM_TYPE_VIDEO, 10);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_buffer_min_threshold is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_buffer_min_threshold is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_get_media_stream_buffer_min_threshold(NULL, PLAYER_STREAM_TYPE_VIDEO, &percent);
assert_eq(ret, PLAYER_ERROR_INVALID_PARAMETER);
- destroy_window();
return 0;
ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
ret = player_set_media_stream_buffer_status_cb(player, PLAYER_STREAM_TYPE_VIDEO, player_media_stream_buffer_status_callback, NULL);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_buffer_status_cb is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_buffer_status_cb is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_buffer_max_size(player, PLAYER_STREAM_TYPE_VIDEO, ES_BUFFER_MAX_SIZE);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_buffer_status_cb is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_buffer_status_cb is failed\\n", __LINE__, API_NAMESPACE);
}
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_info(player, PLAYER_STREAM_TYPE_VIDEO, video_fmt);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_info is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_info is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_prepare_async(player, _player_prepared_cb, (void*)player);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player isn't prepared\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't prepared\\n", __LINE__, API_NAMESPACE);
}
if(pthread_create(&feeding_thread_id, NULL, (void*)feed_video_data_thread_func, NULL)<0) {
- fprintf(stderr, "pthread_create is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] pthread_create is failed\\n", __LINE__, API_NAMESPACE);
return 0;
}
player_stop(player);
player_unprepare(player);
- destroy_window();
feeding_thread_id = 0;
assert(_is_pass);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
ret = player_set_media_stream_seek_cb(player, PLAYER_STREAM_TYPE_VIDEO, player_media_stream_seek_callback, NULL);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_seek_cb is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_seek_cb is failed\\n", __LINE__, API_NAMESPACE);
}
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_info(player, PLAYER_STREAM_TYPE_VIDEO, video_fmt);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_info is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_info is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_media_stream_buffer_max_size(player, PLAYER_STREAM_TYPE_VIDEO, ES_BUFFER_MAX_SIZE);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_media_stream_buffer_max_size is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_media_stream_buffer_max_size is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_prepare_async(player, seek_start_cb, (void*)player);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player isn't prepared\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't prepared\\n", __LINE__, API_NAMESPACE);
}
if(pthread_create(&feeding_thread_id, NULL, (void*)feed_video_data_thread_func, NULL)<0) {
- fprintf(stderr, "pthread_create is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] pthread_create is failed\\n", __LINE__, API_NAMESPACE);
return 0;
}
usleep(1000);
player_unprepare(player);
- destroy_window();
feeding_thread_id = 0;
assert(_is_pass);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
}
ret = player_set_uri(player, DRC_URI);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player_set_uri is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_uri is failed\\n", __LINE__, API_NAMESPACE);
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_set_video_stream_changed_cb (player, player_video_stream_changed_callback, 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_CONNECTION_FAILED) {
- fprintf(stderr, "check network status");
+ PRINT_UTC_LOG("[Line : %d][%s] check network status\\n", __LINE__, API_NAMESPACE);
return 0;
}
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player isn't prepared\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't prepared\\n", __LINE__, API_NAMESPACE);
ret = player_start(player);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player isn't started\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't started\\n", __LINE__, API_NAMESPACE);
for(repeat=0; repeat<11; repeat++) {
wait_for_async();
ret = player_stop(player);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player isn't stopped\n");
- destroy_window();
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't stopped\\n", __LINE__, API_NAMESPACE);
assert(_is_pass);
_is_pass = false;
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
}
ret = player_set_uri(player, DRC_URI);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player_set_uri is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_uri is failed\\n", __LINE__, API_NAMESPACE);
create_window();
ret = player_set_display(player, PLAYER_DISPLAY_TYPE_OVERLAY, g_win);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_display is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display 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) {
- fprintf(stderr, "check network status");
+ PRINT_UTC_LOG("[Line : %d][%s] check network status\\n", __LINE__, API_NAMESPACE);
return 0;
}
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player isn't prepared\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't prepared\\n", __LINE__, API_NAMESPACE);
ret = player_set_video_stream_changed_cb (player, player_video_stream_changed_callback, NULL);
assert_eq(ret, PLAYER_ERROR_INVALID_STATE);
- destroy_window();
#endif
return 0;
}
{
int ret = player_set_uri(player, media_path2);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player_set_uri failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_uri failed\\n", __LINE__, API_NAMESPACE);
player_set_display(player, PLAYER_DISPLAY_TYPE_NONE, NULL);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player_set_display failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display failed\\n", __LINE__, API_NAMESPACE);
ret = player_set_media_packet_video_frame_decoded_cb(player, _player_media_packet_decoded_cb, NULL);
assert_eq(ret, PLAYER_ERROR_NONE);
ret = player_prepare(player);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player isn't prepared\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't prepared\\n", __LINE__, API_NAMESPACE);
ret = player_start(player);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player isn't started\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't started\\n", __LINE__, API_NAMESPACE);
ret = player_stop(player);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player isn't stopped\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't stopped\\n", __LINE__, API_NAMESPACE);
return 0;
}
{
int ret = player_set_uri(player, media_path2);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player_set_uri failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_uri failed\\n", __LINE__, API_NAMESPACE);
player_set_display(player, PLAYER_DISPLAY_TYPE_NONE, NULL);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player_set_display failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_display failed\\n", __LINE__, API_NAMESPACE);
ret = player_prepare(player);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player isn't prepared\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't prepared\\n", __LINE__, API_NAMESPACE);
ret = player_set_media_packet_video_frame_decoded_cb(player, _player_media_packet_decoded_cb, NULL);
assert_eq(ret, PLAYER_ERROR_INVALID_STATE);
static gboolean timeout_func(gpointer data)
{
- fprintf(stderr, "waited 10 seconds\n");
+ PRINT_UTC_LOG("[Line : %d][%s] waited 10 seconds\\n", __LINE__, API_NAMESPACE);
g_main_loop_quit((GMainLoop *) data);
return FALSE;
}
if (wifi_supported || telepony_supported || ethernet_supported)
return true;
- fprintf(stderr, "network is not supportable.");
+ PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
return false;
}
_is_network_supportable = _check_network_supportable();
- char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
- 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) + 6;
- download_path = (char*)malloc(size_of_path);
- snprintf(download_path, size_of_path, "%s/res/%s", pszValue, download);
- }
- else
- {
- PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
- }
+ char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+ 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) + 6;
+ download_path = (char*)malloc(size_of_path);
+ snprintf(download_path, size_of_path, "%s/res/%s", pszValue, download);
+ }
+ 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 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) {
- fprintf(stderr, "check network status");
+ PRINT_UTC_LOG("[Line : %d][%s] check network status\\n", __LINE__, API_NAMESPACE);
return 0;
}
assert_eq(ret3, PLAYER_ERROR_NONE);
// 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) {
- fprintf(stderr, "check network status");
+ PRINT_UTC_LOG("[Line : %d][%s] check network status\\n", __LINE__, API_NAMESPACE);
return 0;
}
assert_eq(ret3, PLAYER_ERROR_NONE);
// 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)) {
- fprintf(stderr, "network is not supportable.");
+ PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
return 0;
}
assert_eq(ret2, PLAYER_ERROR_NONE);
// 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)) {
- fprintf(stderr, "network is not supportable.");
+ PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
return 0;
}
assert_eq(ret2, PLAYER_ERROR_NONE);
// 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)) {
- fprintf(stderr, "network is not supportable.");
+ PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
return 0;
}
assert_eq(ret2, PLAYER_ERROR_NONE);
// 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)) {
- fprintf(stderr, "network is not supportable.");
+ PRINT_UTC_LOG("[Line : %d][%s] network is not supportable.\\n", __LINE__, API_NAMESPACE);
return 0;
}
assert_eq(ret2, PLAYER_ERROR_NONE);
int ret = player_set_uri(player, g_media_path);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player_set_uri is failed\n");
+ 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)
- fprintf(stderr, "player_set_display failed\n");
+ 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)
- fprintf(stderr, "player_set_progressive_download_path is failed\n");
+ 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)) {
- fprintf(stderr, "network is not 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_prepare(player);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player isn't prepared\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't prepared\\n", __LINE__, API_NAMESPACE);
ret = player_start(player);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player isn't started\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't started\\n", __LINE__, API_NAMESPACE);
wait_for_async();
if(_is_pass)
- fprintf(stderr, "pd_message_callback is called!\n");
+ PRINT_UTC_LOG("[Line : %d][%s] pd_message_callback is called!\\n", __LINE__, API_NAMESPACE);
return 0;
}
{
int ret = player_set_uri(player, g_media_path);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player_set_uri is failed\n");
+ 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)
- fprintf(stderr, "player_set_display failed\n");
+ 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)
- fprintf(stderr, "player_set_progressive_download_path is failed\n");
+ 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) {
- fprintf(stderr, "check network status");
+ PRINT_UTC_LOG("[Line : %d][%s] check network status\\n", __LINE__, API_NAMESPACE);
return 0;
}
ret = player_start(player);
if (PLAYER_ERROR_NONE != ret)
- fprintf(stderr, "player isn't started\n");
+ 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);
static char* audio_path=NULL;
static char* media_path=NULL;
static char* subtitle_path=NULL;
-
+static int *band_levels = NULL;
+static char* code = NULL;
static player_h player;
static bool _is_broken = false;
static bool _is_pass = false;
-sound_stream_info_h g_stream_info_h = NULL;
+static sound_stream_info_h g_stream_info_h = NULL;
+
+typedef struct{
+ char *album;
+ char *artist;
+ char *author;
+ char *genre;
+ char *title;
+ char *year;
+ char *audio_codec;
+ char *video_codec;
+ int audio_sample_rate;
+ int audio_channel;
+ int audio_bit_rate;
+ void *album_art;
+ int album_art_size;
+ int audio_tracks_count;
+}t_streamInfo;
+static t_streamInfo stream_info = {0};
static GMainLoop *g_mainloop = NULL;
static gboolean timeout_func(gpointer data)
{
- fprintf(stderr, "waited 5 seconds\n");
+ PRINT_UTC_LOG("[Line : %d][%s] waited 5 seconds\\n", __LINE__, API_NAMESPACE);
g_main_loop_quit((GMainLoop *) data);
return FALSE;
}
int ret = SOUND_MANAGER_ERROR_NONE;
if (g_stream_info_h) {
- g_print("stream information is already set, please destory handle and try again\n");
+ g_print("stream information is already set, please destory handle and try again\\n", __LINE__, API_NAMESPACE);
return;
}
if (sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, focus_cb, player, &g_stream_info_h)) {
- g_print("failed to create stream_information()\n");
+ g_print("failed to create stream_information()\\n", __LINE__, API_NAMESPACE);
return;
}
return;
ret = player_set_uri(player, media_path);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player didn't set uri\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player didn't set uri\\n", __LINE__, API_NAMESPACE);
_is_broken = true;
}
ret = player_prepare(player);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player isn't prepared\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player isn't prepared\\n", __LINE__, API_NAMESPACE);
_is_broken = true;
}
if(player){
ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE)
player_unprepare(player);
sound_manager_destroy_stream_information(g_stream_info_h);
g_stream_info_h = NULL;
}
+ if(band_levels)
+ free(band_levels);
+ if(code)
+ free(code);
+ if(stream_info.album)
+ free(stream_info.album);
+ if(stream_info.artist)
+ free(stream_info.artist);
+ if(stream_info.author)
+ free(stream_info.author);
+ if(stream_info.genre)
+ free(stream_info.genre);
+ if(stream_info.title)
+ free(stream_info.title);
+ if(stream_info.year)
+ free(stream_info.year);
+ if(stream_info.audio_codec)
+ free(stream_info.audio_codec);
+ if(stream_info.video_codec)
+ free(stream_info.video_codec);
}
-typedef struct{
- char *album;
- char *artist;
- char *author;
- char *genre;
- char *title;
- char *year;
- char *audio_codec;
- char *video_codec;
- int audio_sample_rate;
- int audio_channel;
- int audio_bit_rate;
- void *album_art;
- int album_art_size;
- int audio_tracks_count;
-}t_streamInfo;
-
-static t_streamInfo stream_info = {0};
-
/**
* @testcase utc_media_player_get_duration_p
* @since_tizen 2.3.1
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE)
player_unprepare(player);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE)
player_unprepare(player);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE)
player_unprepare(player);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE)
player_unprepare(player);
int ret = player_is_looping(player, &is);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_is_looping is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_is_looping is failed\\n", __LINE__, API_NAMESPACE);
}
if(!is)
looping = true;
int ret = player_is_muted(player, &is);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_is_muted is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_is_muted is failed\\n", __LINE__, API_NAMESPACE);
}
if(!is)
mute = true;
int ret3 = player_audio_effect_get_equalizer_level_range(player, &min, &max);
assert_eq(ret3, PLAYER_ERROR_NONE);
- int *band_levels = (int*)malloc(sizeof(int) * count);
+ band_levels = (int*)malloc(sizeof(int) * count);
assert(band_levels);
for(i = 0; i < count; i++)
band_levels[i] = min;
assert_eq(level, min);
}
- if(band_levels){
- free(band_levels);
- band_levels = NULL;
- }
-
return 0;
}
int ret3 = player_audio_effect_get_equalizer_level_range(player, &min, &max);
assert_eq(ret3, PLAYER_ERROR_NONE);
- int *band_levels = (int*)malloc(sizeof(int) * count);
+ band_levels = (int*)malloc(sizeof(int) * count);
assert(band_levels);
for(i=0;i<count;i++)
band_levels[i] = min;
int ret4 = player_audio_effect_set_equalizer_all_bands(player, band_levels, count + 5);
assert_eq(ret4, PLAYER_ERROR_INVALID_PARAMETER);
- if(band_levels){
- free(band_levels);
- band_levels = NULL;
- }
-
return 0;
}
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
}
ret = player_set_uri(player, audio_path);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_uri is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_uri is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_prepare(player);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_prepare is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_prepare is failed\\n", __LINE__, API_NAMESPACE);
}
int ret2 = player_get_content_info(player, PLAYER_CONTENT_INFO_ALBUM, &stream_info.album);
assert(_is_pass);
_is_pass = false;
- if(stream_info.album)
- free(stream_info.album);
- if(stream_info.artist)
- free(stream_info.artist);
- if(stream_info.author)
- free(stream_info.author);
- if(stream_info.genre)
- free(stream_info.genre);
- if(stream_info.title)
- free(stream_info.title);
- if(stream_info.year)
- free(stream_info.year);
-
return 0;
}
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
}
ret = player_set_uri(player, audio_path);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_uri is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_uri is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_get_content_info(player, PLAYER_CONTENT_INFO_ALBUM, &stream_info.album);
assert_eq(ret, PLAYER_ERROR_INVALID_STATE);
assert(_is_pass);
_is_pass = false;
- if(stream_info.audio_codec)
- free(stream_info.audio_codec);
- if(stream_info.video_codec)
- free(stream_info.video_codec);
-
int ret3 = player_stop(player);
assert_eq(ret3, PLAYER_ERROR_NONE);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE)
player_unprepare(player);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE)
player_unprepare(player);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE){
player_unprepare(player);
}
ret = player_set_uri(player, audio_path);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_set_uri is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_set_uri is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_prepare(player);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_prepare is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_prepare is failed\\n", __LINE__, API_NAMESPACE);
}
ret = player_get_album_art(player, &stream_info.album_art, &stream_info.album_art_size);
int ret = player_get_state (player, &state);
if (PLAYER_ERROR_NONE != ret) {
- fprintf(stderr, "player_get_state is failed\n");
+ PRINT_UTC_LOG("[Line : %d][%s] player_get_state is failed\\n", __LINE__, API_NAMESPACE);
}
if (state != PLAYER_STATE_IDLE)
player_unprepare(player);
*/
int utc_player_get_track_language_code_p(void)
{
- char* code = NULL;
-
int ret = player_get_track_language_code(player, PLAYER_STREAM_TYPE_AUDIO, 0, &code);
- if(code)
- free(code);
assert_eq(ret, PLAYER_ERROR_NONE);
return 0;
*/
int utc_player_get_track_language_code_n(void)
{
- char* code = NULL;
-
int ret = player_get_track_language_code(player, PLAYER_STREAM_TYPE_TEXT, 0, &code);
- if(code)
- free(code);
assert_eq(ret, PLAYER_ERROR_INVALID_OPERATION);
return 0;
*/
int utc_player_get_track_language_code_n2(void)
{
- char* code = NULL;
-
int ret = player_unprepare(player);
assert_eq(ret, PLAYER_ERROR_NONE);
ret = player_get_track_language_code(player, PLAYER_STREAM_TYPE_AUDIO, 0, &code);
- if(code)
- free(code);
assert_eq(ret, PLAYER_ERROR_INVALID_STATE);
return 0;