From: Eunhae Choi Date: Wed, 23 Aug 2017 11:49:57 +0000 (+0900) Subject: [0.3.68] remove app dependency at audio_test X-Git-Tag: submit/tizen/20170906.061717~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90f6ab36fb8e9edab2b45ef594e32ee8f75653bd;p=platform%2Fcore%2Fapi%2Fplayer.git [0.3.68] remove app dependency at audio_test Change-Id: I353b927633f94e8b9dd276a66bc369c6acb17933 --- diff --git a/packaging/capi-media-player.spec b/packaging/capi-media-player.spec index 5433766..c2d8090 100644 --- a/packaging/capi-media-player.spec +++ b/packaging/capi-media-player.spec @@ -1,6 +1,6 @@ Name: capi-media-player Summary: A Media Player API -Version: 0.3.67 +Version: 0.3.68 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/test/player_audio_test.c b/test/player_audio_test.c index d7c8a9b..5436d8d 100644 --- a/test/player_audio_test.c +++ b/test/player_audio_test.c @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include -#include -#include -#include + #include -#include -#include -#include +#include +#include +#include +#include +#include "player.h" +#include "player_internal.h" #ifdef PACKAGE #undef PACKAGE @@ -36,8 +36,7 @@ #define PLAYER_AUDIO_TEST_DUMP_PATH_PREFIX "/home/owner/dump_pcm_" #define DEFAULT_HTTP_TIMEOUT -1 -#include -#include + typedef enum { TIZEN_PROFILE_UNKNOWN = 0, TIZEN_PROFILE_MOBILE = 0x1, @@ -139,24 +138,9 @@ static player_h g_player[MAX_HANDLE] = { 0, }; static player_seek_pos_t seek_info = {0}; int g_handle_num = 1; int g_menu_state = CURRENT_STATUS_MAINMENU; -gboolean quit_pushing; sound_stream_info_h g_stream_info_h = NULL; static adaptive_variant_info_t max_limit = {-1, -1, -1}; -static int app_create(void *data) -{ - return 0; -} -static int app_terminate(void *data) -{ - return 0; -} - -struct appcore_ops ops = { - .create = app_create, - .terminate = app_terminate, -}; - static void prepared_cb(void *user_data) { g_print("[Player_Audio_Test] prepared_cb!!!!\n"); @@ -1000,7 +984,6 @@ static void get_audio_eq() void quit_program() { - if (g_pcm_fd) fclose(g_pcm_fd); @@ -1008,12 +991,11 @@ void quit_program() _player_unprepare(); _player_destroy(); } - printf("call quit_program, but can not call elm_exit()..please Ctrl+c\n"); -#ifdef TIZEN_PLAYER_TEST_ENABLE_VIDEO - elm_exit(); -#endif + if (g_audio_fmt) media_format_unref(g_audio_fmt); + + exit(0); } void play_with_ini(char *file_path) @@ -1069,7 +1051,6 @@ void _interpret_main_menu(char *cmd) } else if (strncmp(cmd, "D", 1) == 0) { decoding_audio(); } else if (strncmp(cmd, "q", 1) == 0) { - quit_pushing = TRUE; quit_program(); } else if (strncmp(cmd, "E", 1) == 0) { g_menu_state = CURRENT_STATUS_AUDIO_EQUALIZER; @@ -1394,11 +1375,16 @@ gboolean input(GIOChannel * channel) int main(int argc, char *argv[]) { GIOChannel *stdin_channel; + GMainLoop *loop = g_main_loop_new(NULL, 0); stdin_channel = g_io_channel_unix_new(0); g_io_channel_set_flags(stdin_channel, G_IO_FLAG_NONBLOCK, NULL); g_io_add_watch(stdin_channel, G_IO_IN, (GIOFunc) input, NULL); displaymenu(); - return appcore_efl_main(PACKAGE, &argc, &argv, &ops); + g_main_loop_run(loop); + + g_print("exit player_audio_test\n"); + g_main_loop_unref(loop); + return 0; }