static int camera_set_parameters(struct camera_device *device, const char *params) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return -EINVAL; char *tmp = NULL; tmp = camera_fixup_setparams(CAMERA_ID(device), params); #ifdef LOG_NDEBUG __android_log_write(ANDROID_LOG_VERBOSE, LOG_TAG, tmp); #endif if (flipZsl) { camera_stop_preview(device); } int ret = VENDOR_CALL(device, set_parameters, tmp); if (flipZsl) { camera_start_preview(device); flipZsl = false; } return ret; }
static Eina_Bool _main_view_stop_camera_preview (camera_h camera) { INF("in _main_view_stop_camera_preview function"); camera_state_e cur_state = CAMERA_STATE_NONE; int result = camera_get_state(camera, &cur_state); if(CAMERA_ERROR_NONE == result) { if(cur_state == CAMERA_STATE_PREVIEW) { camera_stop_preview(camera); return EINA_TRUE; } } else { ERR("Cannot get camera state. Error: %d", result); } return EINA_FALSE; }