}
if (wb < CAMERA_ATTR_WHITE_BALANCE_NONE || wb > CAMERA_ATTR_WHITE_BALANCE_CUSTOM) {
- LOGE("INVALID_PARAMETER(0x%08x)", CAMERA_ERROR_NOT_SUPPORTED);
- return CAMERA_ERROR_NOT_SUPPORTED;
+ LOGE("invalid white balance %d", wb);
+ return CAMERA_ERROR_INVALID_PARAMETER;
}
int ret = CAMERA_ERROR_NONE;
muse_core_api_module_e muse_module = MUSE_CAMERA;
int device_type = (int)device;
+ if (state == NULL) {
+ LOGE("invalid pointer for state");
+ return CAMERA_ERROR_INVALID_PARAMETER;
+ }
+
sock_fd = muse_core_client_new();
if (sock_fd < 0) {
LOGE("muse_core_client_new failed - returned fd %d", sock_fd);
return CAMERA_ERROR_INVALID_PARAMETER;
}
if (mode == NULL) {
- LOGE("CAMERA_ERROR_NOT_SUPPORTED(0x%08x) - mode", CAMERA_ERROR_NOT_SUPPORTED);
- return CAMERA_ERROR_NOT_SUPPORTED;
+ LOGE("INVALID_PARAMETER(0x%08x) - mode", CAMERA_ERROR_INVALID_PARAMETER);
+ return CAMERA_ERROR_INVALID_PARAMETER;
}
int ret = CAMERA_ERROR_NONE;
camera_cli_s *pc = (camera_cli_s *)camera;
int camera_attr_set_hdr_capture_progress_cb(camera_h camera, camera_attr_hdr_progress_cb callback, void *user_data)
{
+ int ret = CAMERA_ERROR_NONE;
+ camera_cli_s *pc = (camera_cli_s *)camera;
+ muse_camera_api_e api = MUSE_CAMERA_API_ATTR_SET_HDR_CAPTURE_PROGRESS_CB;
+ int sock_fd;
+
if (camera == NULL) {
LOGE("INVALID_PARAMETER(0x%08x) - handle", CAMERA_ERROR_INVALID_PARAMETER);
return CAMERA_ERROR_INVALID_PARAMETER;
}
- if (callback == NULL) {
- LOGE("CAMERA_ERROR_NOT_SUPPORTED(0x%08x) - callback", CAMERA_ERROR_NOT_SUPPORTED);
- return CAMERA_ERROR_NOT_SUPPORTED;
- }
- int ret = CAMERA_ERROR_NONE;
- camera_cli_s *pc = (camera_cli_s *)camera;
- muse_camera_api_e api = MUSE_CAMERA_API_ATTR_SET_HDR_CAPTURE_PROGRESS_CB;
- int sock_fd;
if (pc->cb_info == NULL) {
LOGE("INVALID_PARAMETER(0x%08x)", CAMERA_ERROR_INVALID_PARAMETER);
return CAMERA_ERROR_INVALID_PARAMETER;
}
+
sock_fd = pc->cb_info->fd;
- LOGD("Enter, handle :%x", pc->remote_handle);
- pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS] = callback;
- pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS] = user_data;
+ LOGD("Enter, handle :%x", pc->remote_handle);
muse_camera_msg_send(api, sock_fd, pc->cb_info, ret);
+
+ if (ret == CAMERA_ERROR_NONE) {
+ if (callback == NULL) {
+ LOGE("INVALID_PARAMETER(0x%08x) - callback", CAMERA_ERROR_INVALID_PARAMETER);
+ return CAMERA_ERROR_INVALID_PARAMETER;
+ }
+
+ pc->cb_info->user_cb[MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS] = callback;
+ pc->cb_info->user_data[MUSE_CAMERA_EVENT_TYPE_HDR_PROGRESS] = user_data;
+ }
+
LOGD("ret : 0x%x", ret);
+
return ret;
}
}
if (enabled == NULL) {
LOGE("INVALID_PARAMETER(0x%08x) - enabled", CAMERA_ERROR_INVALID_PARAMETER);
- return CAMERA_ERROR_NOT_SUPPORTED;
+ return CAMERA_ERROR_INVALID_PARAMETER;
}
int ret = CAMERA_ERROR_NONE;
camera_cli_s *pc = (camera_cli_s *)camera;
}
if (enabled == NULL) {
LOGE("INVALID_PARAMETER(0x%08x) - enabled", CAMERA_ERROR_INVALID_PARAMETER);
- return CAMERA_ERROR_NOT_SUPPORTED;
+ return CAMERA_ERROR_INVALID_PARAMETER;
}
int ret = CAMERA_ERROR_NONE;
camera_cli_s *pc = (camera_cli_s *)camera;