* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <player.h>
-#include <player_internal.h>
-#include <sound_manager.h>
-#include <pthread.h>
+
#include <glib.h>
-#include <dlfcn.h>
-#include <appcore-efl.h>
-#include <Ecore.h>
+#include <stdlib.h>
+#include <pthread.h>
+#include <system_info.h>
+#include <sound_manager.h>
+#include "player.h"
+#include "player_internal.h"
#ifdef PACKAGE
#undef PACKAGE
#define PLAYER_AUDIO_TEST_DUMP_PATH_PREFIX "/home/owner/dump_pcm_"
#define DEFAULT_HTTP_TIMEOUT -1
-#include <system_info.h>
-#include <stdlib.h>
+
typedef enum {
TIZEN_PROFILE_UNKNOWN = 0,
TIZEN_PROFILE_MOBILE = 0x1,
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");
void quit_program()
{
-
if (g_pcm_fd)
fclose(g_pcm_fd);
_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)
} 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;
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;
}