static char *camera_get_parameters(struct camera_device *device) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return NULL; char *params = VENDOR_CALL(device, get_parameters); char *tmp = camera_fixup_getparams(CAMERA_ID(device), params); VENDOR_CALL(device, put_parameters, params); params = tmp; return params; }
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; }
int camera_preview_enabled(struct camera_device * device) { if(!device) return -EINVAL; return VENDOR_CALL(device, preview_enabled); }
int camera_cancel_auto_focus(struct camera_device * device) { if(!device) return -EINVAL; return VENDOR_CALL(device, cancel_auto_focus); }
int camera_dump(struct camera_device * device, int fd) { if(!device) return -EINVAL; return VENDOR_CALL(device, dump, fd); }
static int camera_auto_focus(struct camera_device *device) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return -EINVAL; if (activeFocusMove) { ALOGV("FORCED FOCUS MOVE STOP"); VENDOR_CALL(device, cancel_auto_focus); activeFocusMove = false; } return VENDOR_CALL(device, auto_focus); }
int camera_cancel_picture(struct camera_device * device) { if(!device) return -EINVAL; return VENDOR_CALL(device, cancel_picture); }
int camera_recording_enabled(struct camera_device * device) { if(!device) return -EINVAL; return VENDOR_CALL(device, recording_enabled); }
int camera_start_recording(struct camera_device * device) { if(!device) return EINVAL; return VENDOR_CALL(device, start_recording); }
void camera_stop_recording(struct camera_device * device) { if(!device) return; VENDOR_CALL(device, stop_recording); }
void camera_release(struct camera_device * device) { if(!device) return; VENDOR_CALL(device, release); }
int camera_store_meta_data_in_buffers(struct camera_device * device, int enable) { if(!device) return -EINVAL; return VENDOR_CALL(device, store_meta_data_in_buffers, enable); }
void camera_stop_preview(struct camera_device * device) { if(!device) return; VENDOR_CALL(device, stop_preview); }
int camera_start_preview(struct camera_device * device) { if(!device) return -EINVAL; return VENDOR_CALL(device, start_preview); }
int camera_msg_type_enabled(struct camera_device * device, int32_t msg_type) { if(!device) return 0; return VENDOR_CALL(device, msg_type_enabled, msg_type); }
void camera_disable_msg_type(struct camera_device * device, int32_t msg_type) { if(!device) return; VENDOR_CALL(device, disable_msg_type, msg_type); }
int camera_send_command(struct camera_device * device, int32_t cmd, int32_t arg1, int32_t arg2) { if(!device) return -EINVAL; return VENDOR_CALL(device, send_command, cmd, arg1, arg2); }
void camera_release_recording_frame(struct camera_device * device, const void *opaque) { if(!device) return; VENDOR_CALL(device, release_recording_frame, opaque); }
int camera_set_preview_window(struct camera_device * device, struct preview_stream_ops *window) { if(!device || !window) return -EINVAL; return VENDOR_CALL(device, set_preview_window, window); }
static int camera_dump(struct camera_device *device, int fd) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return -EINVAL; return VENDOR_CALL(device, dump, fd); }
static int camera_recording_enabled(struct camera_device *device) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return -EINVAL; return VENDOR_CALL(device, recording_enabled); }
static void camera_release(struct camera_device *device) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return; VENDOR_CALL(device, release); }
static int camera_cancel_picture(struct camera_device *device) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return -EINVAL; return VENDOR_CALL(device, cancel_picture); }
static void camera_stop_preview(struct camera_device *device) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return; previewRunning = false; VENDOR_CALL(device, stop_preview); }
static int camera_send_command(struct camera_device *device, int32_t cmd, int32_t arg1, int32_t arg2) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return -EINVAL; return VENDOR_CALL(device, send_command, cmd, arg1, arg2); }
static int camera_store_meta_data_in_buffers(struct camera_device *device, int enable) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return -EINVAL; return VENDOR_CALL(device, store_meta_data_in_buffers, enable); }
static int camera_msg_type_enabled(struct camera_device *device, int32_t msg_type) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return 0; return VENDOR_CALL(device, msg_type_enabled, msg_type); }
static void camera_disable_msg_type(struct camera_device *device, int32_t msg_type) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return; VENDOR_CALL(device, disable_msg_type, msg_type); }
static int camera_set_preview_window(struct camera_device *device, struct preview_stream_ops *window) { ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device, (uintptr_t)(((wrapper_camera_device_t*)device)->vendor)); if (!device) return -EINVAL; return VENDOR_CALL(device, set_preview_window, window); }
int camera_set_parameters(struct camera_device * device, const char *params) { if(!device) return -EINVAL; char *tmp = NULL; tmp = camera_fixup_setparams(CAMERA_ID(device), params); int ret = VENDOR_CALL(device, set_parameters, tmp); return ret; }