rec_idle_event->event = rec_msg->event;
rec_idle_event->cb_info = cb_info;
- strncpy(rec_idle_event->recv_msg, rec_msg->recv_msg, sizeof(rec_idle_event->recv_msg) - 1);
+ strncpy(rec_idle_event->recv_msg, rec_msg->recv_msg, sizeof(rec_idle_event->recv_msg));
/*LOGD("add recorder event[%d, %p] to IDLE", rec_msg->event, rec_idle_event);*/
}
-static int _recorder_storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
+static bool _recorder_storage_device_supported_cb(int storage_id, storage_type_e type, storage_state_e state, const char *path, void *user_data)
{
char **root_directory = (char **)user_data;
#endif
-GTimeVal previous;
-GTimeVal current;
-GTimeVal res;
+static struct timeval previous;
+static struct timeval current;
+static struct timeval res;
/*-----------------------------------------------------------------------
| LOCAL FUNCTION PROTOTYPES: |
---------------------------------------------------------------------------*/
static void print_menu();
-static gboolean cmd_input(GIOChannel *channel);
+static gboolean cmd_input(GIOChannel *channel, GIOCondition condition, gpointer data);
static gboolean init(int type);
static gboolean mode_change(gchar buf);
return;
}
-static bool _release_idle_event_callback(void *data)
+static gboolean _release_idle_event_callback(void *data)
{
g_print("destroy recorder handle\n\n");
* @remark
* @see
*/
-static gboolean cmd_input(GIOChannel *channel)
+static gboolean cmd_input(GIOChannel *channel, GIOCondition condition, gpointer data)
{
gchar *buf = NULL;
gsize read_size;
bool check = FALSE;
recorder_device_state_e device_state = RECORDER_DEVICE_STATE_IDLE;
- g_get_current_time(&previous);
+ gettimeofday(&previous, NULL);
g_timer_reset(timer);
if (hcamcorder->recorder) {
return FALSE;
}
- g_get_current_time(¤t);
+ gettimeofday(¤t, NULL);
timersub(¤t, &previous, &res);
g_print("Recorder Preparing Time : %ld.%lds\n", res.tv_sec, res.tv_usec);