recorder_test: Remove unused GTimer
[platform/core/api/recorder.git] / test / recorder_test.c
index 243f369..a16e5da 100644 (file)
@@ -28,7 +28,6 @@
   |    GLOBAL VARIABLES:                                                  |
   -----------------------------------------------------------------------*/
 static int g_recorder_state;
-static GTimer *g_recorder_timer = NULL;
 static int g_recorder_device_changed_cb_id;
 static int g_recorder_ve_frame_count = 0;
 static cam_handle_t *g_cam_handle;
@@ -195,7 +194,7 @@ static bool strobe_mode_cb(camera_attr_flash_mode_e mode , void *user_data)
 
 static void _state_changed_cb(recorder_state_e previous_state, recorder_state_e current_state, bool by_policy, void *user_data)
 {
-       g_print("\n\tstate changed[by_policy:%d] : %d -> %d\n\n", by_policy, previous_state, current_state);
+       g_print("\tstate changed[by_policy:%d] : %d -> %d\n\n", by_policy, previous_state, current_state);
        return;
 }
 
@@ -225,7 +224,7 @@ static void _recording_status_cb(unsigned long long elapsed_time, unsigned long
                temp_time = elapsed % 3600;
                minute = temp_time / 60;
                second = temp_time % 60;
-               g_print("\n\tCurrent Time - %lld:%lld:%lld, filesize %lld KB\n\n",
+               g_print("\tCurrent Time - %lld:%lld:%lld, filesize %lld KB\n",
                                hour, minute, second, file_size);
        }
 
@@ -234,7 +233,7 @@ static void _recording_status_cb(unsigned long long elapsed_time, unsigned long
 
 static void _recording_limit_reached_cb(recorder_recording_limit_type_e type, void *user_data)
 {
-       g_print("\n\tRECORDING LIMIT REACHED [type: %d]\n\n", type);
+       g_print("\tRECORDING LIMIT REACHED [type: %d]\n\n", type);
        return;
 }
 
@@ -265,7 +264,7 @@ static void _recording_muxed_stream_cb(void *stream, int size, unsigned long lon
                        fclose(fp);
                        fp = NULL;
                } else {
-                       g_print("\n\n\t File open failed [%s], errno %d", TARGET_FILENAME_MUXED_CB, errno);
+                       g_print("\tFile open failed [%s], errno %d", TARGET_FILENAME_MUXED_CB, errno);
                }
 
                current_offset = offset;
@@ -362,7 +361,7 @@ static gboolean _release_idle_event_callback(void *data)
 
 static void _recorder_error_cb(int error, recorder_state_e current_state, void *user_data)
 {
-       g_print("\n\n\tERROR [0x%x], current state %d\n", error, current_state);
+       g_print("\tERROR [0x%x], current state %d\n", error, current_state);
 
        switch (error) {
        case RECORDER_ERROR_RESOURCE_CONFLICT:
@@ -553,7 +552,7 @@ void print_menu()
                g_print("\t   '6' Get recorder device state\n");
                g_print("\t   'q' Exit\n");
                g_print("\t=======================================\n");
-               g_print("\t  Choose the menu :\n\t");
+               g_print("\t  Choose the menu : ");
                break;
        case MENU_STATE_MAIN:
                g_print("\n\t=======================================\n");
@@ -648,10 +647,10 @@ static void main_menu(gchar buf)
                switch (buf) {
                case '1': /* Start Recording */
                        g_print("*Recording start!\n");
+
                        g_cam_handle->elapsed_time = 0;
                        g_recorder_ve_frame_count = 0;
 
-                       g_timer_reset(g_recorder_timer);
                        err = recorder_start(g_cam_handle->recorder);
 
                        if (err != 0)
@@ -715,7 +714,6 @@ static void main_menu(gchar buf)
 
                case 's': /* Save */
                        g_print("*Save Recording!\n");
-                       g_timer_reset(g_recorder_timer);
 
                        err = recorder_commit(g_cam_handle->recorder);
 
@@ -1054,11 +1052,9 @@ gboolean cmd_input(GIOChannel *channel, GIOCondition condition, gpointer data)
        gsize read_size;
        GError *g_error = NULL;
 
-       g_print("\n\tENTER\n");
-
        g_io_channel_read_line(channel, &buf, &read_size, NULL, &g_error);
        if (g_error) {
-               g_print("\n\tg_io_channel_read_chars error\n");
+               g_print("\tg_io_channel_read_chars error\n");
                g_error_free(g_error);
                g_error = NULL;
        }
@@ -1066,7 +1062,7 @@ gboolean cmd_input(GIOChannel *channel, GIOCondition condition, gpointer data)
        if (buf) {
                g_strstrip(buf);
 
-               g_print("\n\tMenu Status : %d\n", g_cam_handle->menu_state);
+               g_print("\tMenu Status : %d\n", g_cam_handle->menu_state);
                switch (g_cam_handle->menu_state) {
                case MENU_STATE_INIT:
                        mode_change(buf[0]);
@@ -1086,7 +1082,7 @@ gboolean cmd_input(GIOChannel *channel, GIOCondition condition, gpointer data)
 
                print_menu();
        } else {
-               g_print("\n\tNo read input\n");
+               g_print("\tNo read input\n");
        }
 
        return TRUE;
@@ -1217,7 +1213,6 @@ static gboolean mode_change(gchar buf)
        sound_stream_info_h stream_info = NULL;
 
        gettimeofday(&time_previous, NULL);
-       g_timer_reset(g_recorder_timer);
 
        if (g_cam_handle->recorder) {
                err = recorder_get_state(g_cam_handle->recorder, (recorder_state_e*)&state);
@@ -1335,9 +1330,6 @@ static gboolean mode_change(gchar buf)
        }
 
        err = recorder_prepare(g_cam_handle->recorder);
-
-       g_print("recorder_prepare()  : %12.6lfs\n", g_timer_elapsed(g_recorder_timer, NULL));
-
        if (err != RECORDER_ERROR_NONE) {
                g_print("recorder_prepare  = %x\n", err);
                return FALSE;