cam_idle_event->event = cam_msg->event;
cam_idle_event->cb_info = cb_info;
- strncpy(cam_idle_event->recv_msg, cam_msg->recv_msg, sizeof(cam_idle_event->recv_msg) - 1);
+ strncpy(cam_idle_event->recv_msg, cam_msg->recv_msg, sizeof(cam_idle_event->recv_msg));
memcpy(cam_idle_event->tfd, cam_msg->tfd, sizeof(cam_idle_event->tfd));
/*LOGD("t:%d add camera event[%d, %p] to IDLE", type, cam_msg->event, cam_idle_event);*/
}
mm_ret = mm_display_interface_set_display(cb_info->dp_interface, type, display, &dp_info->parent_id);
- if (mm_ret == MM_ERROR_NOT_SUPPORT_API) {
+ if (mm_ret == (int)MM_ERROR_NOT_SUPPORT_API) {
LOGE("[NOT_SUPPORTED] type %d", type);
return CAMERA_ERROR_NOT_SUPPORTED;
} else if (mm_ret != MM_ERROR_NONE) {
static GTimer *timer;
static int g_camera_device_changed_cb_id;
-GTimeVal previous_time;
-GTimeVal current_time;
-GTimeVal result_time;
+static struct timeval previous_time;
+static struct timeval current_time;
+static struct timeval result_time;
/*-----------------------------------------------------------------------
| GLOBAL CONSTANT DEFINITIONS: |
| 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 mode_change(gchar buf);
int camcordertest_set_attr_int(const char* attr_subcategory, int value);
while ((ch = getchar()) != EOF && ch != '\n');
}
-static bool _release_idle_event_callback(void *data)
+static gboolean _release_idle_event_callback(void *data)
{
g_print("destroy camera 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;
g_print("\n[camcorder_create - type %d]\n", cam_info);
- g_get_current_time(&previous_time);
+ gettimeofday(&previous_time, NULL);
g_timer_reset(timer);
camera_start_preview(hcamcorder->camera);
- g_get_current_time(¤t_time);
+ gettimeofday(¤t_time, NULL);
timersub(¤t_time, &previous_time, &result_time);
g_print("\n\tCamera Starting Time : %ld.%lds\n", result_time.tv_sec, result_time.tv_usec);