From: Eunhae Choi Date: Thu, 9 Jun 2016 06:10:39 +0000 (+0900) Subject: modify about _set_pcm_extraction_mode test code X-Git-Tag: submit/tizen/20160609.113656^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5729a5060ebf09f53a707ef5439b94f434f23f9;p=platform%2Fcore%2Fapi%2Fplayer.git modify about _set_pcm_extraction_mode test code Change-Id: Ia3c75d907ae1ebc8164468751e7309b7bf03383f --- diff --git a/test/player_test.c b/test/player_test.c index ffd0c7d..f8e0325 100644 --- a/test/player_test.c +++ b/test/player_test.c @@ -1340,10 +1340,9 @@ static void get_duration() g_print(" ==> [Player_Test] Duration: [%d ] msec\n", duration); } -static void audio_frame_decoded_cb_ex() +static void audio_frame_decoded_cb_ex(bool sync) { int ret; - #if DUMP_OUTBUF fp_out1 = fopen("/tmp/out1.pcm", "wb"); fp_out2 = fopen("/tmp/out2.pcm", "wb"); @@ -1353,13 +1352,8 @@ static void audio_frame_decoded_cb_ex() } #endif - ret = player_set_pcm_extraction_mode(g_player[0], false, _audio_frame_decoded_cb_ex, &ret); - g_print(" ==> [Player_Test] player_set_audio_frame_decoded_cb_ex return: %d\n", ret); -} - -static void set_pcm_spec() -{ - int ret = 0; + ret = player_set_pcm_extraction_mode(g_player[0], sync, _audio_frame_decoded_cb_ex, &ret); + g_print(" ==> [Player_Test] player_set_audio_frame_decoded_cb_ex(sync:%d) ret:%d\n", sync, ret); ret = player_set_pcm_spec(g_player[0], "F32LE", 44100, 2); g_print("[Player_Test] set_pcm_spec return: %d\n", ret); @@ -1898,9 +1892,9 @@ void _interpret_main_menu(char *cmd) } else if (strncmp(cmd, "ss", 2) == 0) { g_menu_state = CURRENT_STATUS_SWITCH_SUBTITLE; } else if (strncmp(cmd, "X3", 2) == 0) { - audio_frame_decoded_cb_ex(); + audio_frame_decoded_cb_ex(TRUE); } else if (strncmp(cmd, "X4", 2) == 0) { - set_pcm_spec(); + audio_frame_decoded_cb_ex(FALSE); } else if (strncmp(cmd, "su", 2) == 0) { g_menu_state = CURRENT_STATUS_NEXT_URI; } else if (strncmp(cmd, "gu", 2) == 0) { @@ -1970,7 +1964,8 @@ void display_sub_basic() g_print("[etc] sp. Set Progressive Download\t"); g_print("gp. Get Progressive Download status\n"); g_print("mp. memory playback\n"); - g_print("[audio_frame_decoded_cb_ex] X3. (input) set audio_frame_decoded_cb_ex callback \n"); + g_print("[audio_frame_decoded_cb_ex] X3. set audio_cb with sync\t"); + g_print("X4. set audio_cb with async \n"); g_print("\n"); g_print("=========================================================================================\n"); }