api, event, event_class);
if (event == MUSE_CAMERA_EVENT_TYPE_PREVIEW) {
+ if (!cb_info->preview_cb_info.thread) {
+ LOGI("The thread for preview cb is not created yet, create it now");
+ if (!__create_msg_handler_thread(&cb_info->preview_cb_info,
+ CAMERA_MESSAGE_HANDLER_TYPE_PREVIEW_CB, "cam:preview_cb", cb_info)) {
+ CAM_LOG_ERROR("failed to create thread for preview cb");
+ g_free(cam_msg);
+ return;
+ }
+ }
+
g_mutex_lock(&cb_info->preview_cb_info.mutex);
g_queue_push_tail(cb_info->preview_cb_info.queue, (gpointer)cam_msg);
g_cond_signal(&cb_info->preview_cb_info.cond);