- switch( code ){
- case MM_ERROR_NONE:
- ret = CAMERA_ERROR_NONE;
- errorstr = "ERROR_NONE";
- break;
- case MM_ERROR_CAMCORDER_INVALID_ARGUMENT:
- case MM_ERROR_COMMON_INVALID_ATTRTYPE:
- ret = CAMERA_ERROR_INVALID_PARAMETER;
- errorstr = "INVALID_PARAMETER";
- break;
- case MM_ERROR_CAMCORDER_NOT_INITIALIZED:
- case MM_ERROR_CAMCORDER_INVALID_STATE:
- ret = CAMERA_ERROR_INVALID_STATE;
- errorstr = "INVALID_STATE";
- break;
- case MM_ERROR_CAMCORDER_DEVICE_NOT_FOUND:
- ret = CAMERA_ERROR_DEVICE_NOT_FOUND;
- errorstr = "DEVICE_NOT_FOUND";
- break;
- case MM_ERROR_CAMCORDER_DEVICE_BUSY:
- case MM_ERROR_CAMCORDER_DEVICE_OPEN:
- case MM_ERROR_CAMCORDER_CMD_IS_RUNNING:
- ret = CAMERA_ERROR_DEVICE_BUSY;
- errorstr = "DEVICE_BUSY";
- break;
- case MM_ERROR_CAMCORDER_DEVICE:
- case MM_ERROR_CAMCORDER_DEVICE_IO:
- case MM_ERROR_CAMCORDER_DEVICE_TIMEOUT:
- case MM_ERROR_CAMCORDER_DEVICE_WRONG_JPEG:
- case MM_ERROR_CAMCORDER_DEVICE_LACK_BUFFER:
- ret = CAMERA_ERROR_DEVICE;
- errorstr = "ERROR_DEVICE";
- break;
-
- case MM_ERROR_CAMCORDER_GST_CORE:
- case MM_ERROR_CAMCORDER_GST_LIBRARY:
- case MM_ERROR_CAMCORDER_GST_RESOURCE:
- case MM_ERROR_CAMCORDER_GST_STREAM:
- case MM_ERROR_CAMCORDER_GST_STATECHANGE:
- case MM_ERROR_CAMCORDER_GST_NEGOTIATION:
- case MM_ERROR_CAMCORDER_GST_LINK:
- case MM_ERROR_CAMCORDER_GST_FLOW_ERROR:
- case MM_ERROR_CAMCORDER_ENCODER:
- case MM_ERROR_CAMCORDER_ENCODER_BUFFER:
- case MM_ERROR_CAMCORDER_ENCODER_WRONG_TYPE:
- case MM_ERROR_CAMCORDER_ENCODER_WORKING:
- case MM_ERROR_CAMCORDER_INTERNAL:
- case MM_ERROR_CAMCORDER_RESPONSE_TIMEOUT:
- case MM_ERROR_CAMCORDER_DSP_FAIL:
- case MM_ERROR_CAMCORDER_AUDIO_EMPTY:
- case MM_ERROR_CAMCORDER_CREATE_CONFIGURE:
- case MM_ERROR_CAMCORDER_FILE_SIZE_OVER:
- case MM_ERROR_CAMCORDER_DISPLAY_DEVICE_OFF:
- case MM_ERROR_CAMCORDER_INVALID_CONDITION:
- ret = CAMERA_ERROR_INVALID_OPERATION;
- errorstr = "INVALID_OPERATION";
- break;
-
- case MM_ERROR_CAMCORDER_RESOURCE_CREATION:
- case MM_ERROR_COMMON_OUT_OF_MEMORY:
- ret = CAMERA_ERROR_OUT_OF_MEMORY;
- errorstr = "OUT_OF_MEMORY";
- break;
-
- case MM_ERROR_POLICY_BLOCKED:
- ret = CAMERA_ERROR_SOUND_POLICY;
- errorstr = "ERROR_SOUND_POLICY";
- break;
- case MM_ERROR_POLICY_BLOCKED_BY_CALL:
- ret = CAMERA_ERROR_SOUND_POLICY_BY_CALL;
- errorstr = "ERROR_SOUND_POLICY_BY_CALL";
- break;
- case MM_ERROR_POLICY_BLOCKED_BY_ALARM:
- ret = CAMERA_ERROR_SOUND_POLICY_BY_ALARM;
- errorstr = "ERROR_SOUND_POLICY_BY_ALARM";
- break;
- case MM_ERROR_POLICY_RESTRICTED:
- ret = CAMERA_ERROR_SECURITY_RESTRICTED;
- errorstr = "ERROR_RESTRICTED";
- break;
- case MM_ERROR_CAMCORDER_DEVICE_REG_TROUBLE:
- ret = CAMERA_ERROR_ESD;
- errorstr = "ERROR_ESD";
- break;
- case MM_ERROR_COMMON_INVALID_PERMISSION:
- ret = CAMERA_ERROR_PERMISSION_DENIED;
- errorstr = "ERROR_PERMISSION_DENIED";
- break;
- case MM_ERROR_COMMON_OUT_OF_ARRAY:
- case MM_ERROR_COMMON_OUT_OF_RANGE:
- case MM_ERROR_COMMON_ATTR_NOT_EXIST:
- case MM_ERROR_CAMCORDER_NOT_SUPPORTED:
- ret = CAMERA_ERROR_NOT_SUPPORTED;
- errorstr = "ERROR_NOT_SUPPORTED";
- break;
- default:
- ret = CAMERA_ERROR_INVALID_OPERATION;
- errorstr = "INVALID_OPERATION";
+ switch (code) {
+ case MM_ERROR_NONE:
+ ret = CAMERA_ERROR_NONE;
+ errorstr = "ERROR_NONE";
+ break;
+ case MM_ERROR_CAMCORDER_INVALID_ARGUMENT:
+ case MM_ERROR_COMMON_INVALID_ATTRTYPE:
+ ret = CAMERA_ERROR_INVALID_PARAMETER;
+ errorstr = "INVALID_PARAMETER";
+ break;
+ case MM_ERROR_CAMCORDER_NOT_INITIALIZED:
+ case MM_ERROR_CAMCORDER_INVALID_STATE:
+ ret = CAMERA_ERROR_INVALID_STATE;
+ errorstr = "INVALID_STATE";
+ break;
+ case MM_ERROR_CAMCORDER_DEVICE_NOT_FOUND:
+ ret = CAMERA_ERROR_DEVICE_NOT_FOUND;
+ errorstr = "DEVICE_NOT_FOUND";
+ break;
+ case MM_ERROR_CAMCORDER_DEVICE_BUSY:
+ case MM_ERROR_CAMCORDER_DEVICE_OPEN:
+ case MM_ERROR_CAMCORDER_CMD_IS_RUNNING:
+ ret = CAMERA_ERROR_DEVICE_BUSY;
+ errorstr = "DEVICE_BUSY";
+ break;
+ case MM_ERROR_CAMCORDER_DEVICE:
+ case MM_ERROR_CAMCORDER_DEVICE_IO:
+ case MM_ERROR_CAMCORDER_DEVICE_TIMEOUT:
+ case MM_ERROR_CAMCORDER_DEVICE_WRONG_JPEG:
+ case MM_ERROR_CAMCORDER_DEVICE_LACK_BUFFER:
+ ret = CAMERA_ERROR_DEVICE;
+ errorstr = "ERROR_DEVICE";
+ break;
+ case MM_ERROR_CAMCORDER_GST_CORE:
+ case MM_ERROR_CAMCORDER_GST_LIBRARY:
+ case MM_ERROR_CAMCORDER_GST_RESOURCE:
+ case MM_ERROR_CAMCORDER_GST_STREAM:
+ case MM_ERROR_CAMCORDER_GST_STATECHANGE:
+ case MM_ERROR_CAMCORDER_GST_NEGOTIATION:
+ case MM_ERROR_CAMCORDER_GST_LINK:
+ case MM_ERROR_CAMCORDER_GST_FLOW_ERROR:
+ case MM_ERROR_CAMCORDER_ENCODER:
+ case MM_ERROR_CAMCORDER_ENCODER_BUFFER:
+ case MM_ERROR_CAMCORDER_ENCODER_WRONG_TYPE:
+ case MM_ERROR_CAMCORDER_ENCODER_WORKING:
+ case MM_ERROR_CAMCORDER_INTERNAL:
+ case MM_ERROR_CAMCORDER_RESPONSE_TIMEOUT:
+ case MM_ERROR_CAMCORDER_DSP_FAIL:
+ case MM_ERROR_CAMCORDER_AUDIO_EMPTY:
+ case MM_ERROR_CAMCORDER_CREATE_CONFIGURE:
+ case MM_ERROR_CAMCORDER_FILE_SIZE_OVER:
+ case MM_ERROR_CAMCORDER_DISPLAY_DEVICE_OFF:
+ case MM_ERROR_CAMCORDER_INVALID_CONDITION:
+ ret = CAMERA_ERROR_INVALID_OPERATION;
+ errorstr = "INVALID_OPERATION";
+ break;
+ case MM_ERROR_CAMCORDER_RESOURCE_CREATION:
+ case MM_ERROR_COMMON_OUT_OF_MEMORY:
+ ret = CAMERA_ERROR_OUT_OF_MEMORY;
+ errorstr = "OUT_OF_MEMORY";
+ break;
+ case MM_ERROR_POLICY_BLOCKED:
+ ret = CAMERA_ERROR_SOUND_POLICY;
+ errorstr = "ERROR_SOUND_POLICY";
+ break;
+ case MM_ERROR_POLICY_BLOCKED_BY_CALL:
+ ret = CAMERA_ERROR_SOUND_POLICY_BY_CALL;
+ errorstr = "ERROR_SOUND_POLICY_BY_CALL";
+ break;
+ case MM_ERROR_POLICY_BLOCKED_BY_ALARM:
+ ret = CAMERA_ERROR_SOUND_POLICY_BY_ALARM;
+ errorstr = "ERROR_SOUND_POLICY_BY_ALARM";
+ break;
+ case MM_ERROR_POLICY_RESTRICTED:
+ ret = CAMERA_ERROR_SECURITY_RESTRICTED;
+ errorstr = "ERROR_RESTRICTED";
+ break;
+ case MM_ERROR_CAMCORDER_DEVICE_REG_TROUBLE:
+ ret = CAMERA_ERROR_ESD;
+ errorstr = "ERROR_ESD";
+ break;
+ case MM_ERROR_COMMON_INVALID_PERMISSION:
+ ret = CAMERA_ERROR_PERMISSION_DENIED;
+ errorstr = "ERROR_PERMISSION_DENIED";
+ break;
+ case MM_ERROR_COMMON_OUT_OF_ARRAY:
+ case MM_ERROR_COMMON_OUT_OF_RANGE:
+ case MM_ERROR_COMMON_ATTR_NOT_EXIST:
+ case MM_ERROR_CAMCORDER_NOT_SUPPORTED:
+ ret = CAMERA_ERROR_NOT_SUPPORTED;
+ errorstr = "ERROR_NOT_SUPPORTED";
+ break;
+ default:
+ ret = CAMERA_ERROR_INVALID_OPERATION;
+ errorstr = "INVALID_OPERATION";
- switch( stream->data_type ){
- case MM_CAM_STREAM_DATA_YUV420 :
- frame.data.single_plane.yuv = stream->data.yuv420.yuv;
- frame.data.single_plane.size = stream->data.yuv420.length_yuv;
- break;
- case MM_CAM_STREAM_DATA_YUV422:
- frame.data.single_plane.yuv = stream->data.yuv422.yuv;
- frame.data.single_plane.size = stream->data.yuv422.length_yuv;
- break;
- case MM_CAM_STREAM_DATA_YUV420SP:
- frame.data.double_plane.y = stream->data.yuv420sp.y;
- frame.data.double_plane.uv = stream->data.yuv420sp.uv;
- frame.data.double_plane.y_size = stream->data.yuv420sp.length_y;
- frame.data.double_plane.uv_size = stream->data.yuv420sp.length_uv;
- break;
- case MM_CAM_STREAM_DATA_YUV420P:
- frame.data.triple_plane.y = stream->data.yuv420p.y;
- frame.data.triple_plane.u = stream->data.yuv420p.u;
- frame.data.triple_plane.v = stream->data.yuv420p.v;
- frame.data.triple_plane.y_size = stream->data.yuv420p.length_y;
- frame.data.triple_plane.u_size = stream->data.yuv420p.length_u;
- frame.data.triple_plane.v_size = stream->data.yuv420p.length_v;
- break;
- case MM_CAM_STREAM_DATA_YUV422P:
- frame.data.triple_plane.y = stream->data.yuv422p.y;
- frame.data.triple_plane.u = stream->data.yuv422p.u;
- frame.data.triple_plane.v = stream->data.yuv422p.v;
- frame.data.triple_plane.y_size = stream->data.yuv422p.length_y;
- frame.data.triple_plane.u_size = stream->data.yuv422p.length_u;
- frame.data.triple_plane.v_size = stream->data.yuv422p.length_v;
- break;
- default :
- break;
+
+ switch (stream->data_type) {
+ case MM_CAM_STREAM_DATA_YUV420:
+ frame.data.single_plane.yuv = stream->data.yuv420.yuv;
+ frame.data.single_plane.size = stream->data.yuv420.length_yuv;
+ break;
+ case MM_CAM_STREAM_DATA_YUV422:
+ frame.data.single_plane.yuv = stream->data.yuv422.yuv;
+ frame.data.single_plane.size = stream->data.yuv422.length_yuv;
+ break;
+ case MM_CAM_STREAM_DATA_YUV420SP:
+ frame.data.double_plane.y = stream->data.yuv420sp.y;
+ frame.data.double_plane.uv = stream->data.yuv420sp.uv;
+ frame.data.double_plane.y_size = stream->data.yuv420sp.length_y;
+ frame.data.double_plane.uv_size = stream->data.yuv420sp.length_uv;
+ break;
+ case MM_CAM_STREAM_DATA_YUV420P:
+ frame.data.triple_plane.y = stream->data.yuv420p.y;
+ frame.data.triple_plane.u = stream->data.yuv420p.u;
+ frame.data.triple_plane.v = stream->data.yuv420p.v;
+ frame.data.triple_plane.y_size = stream->data.yuv420p.length_y;
+ frame.data.triple_plane.u_size = stream->data.yuv420p.length_u;
+ frame.data.triple_plane.v_size = stream->data.yuv420p.length_v;
+ break;
+ case MM_CAM_STREAM_DATA_YUV422P:
+ frame.data.triple_plane.y = stream->data.yuv422p.y;
+ frame.data.triple_plane.u = stream->data.yuv422p.u;
+ frame.data.triple_plane.v = stream->data.yuv422p.v;
+ frame.data.triple_plane.y_size = stream->data.yuv422p.length_y;
+ frame.data.triple_plane.u_size = stream->data.yuv422p.length_u;
+ frame.data.triple_plane.v_size = stream->data.yuv422p.length_v;
+ break;
+ default :
+ break;
- if( bo_num > 0 && ret == CAMERA_ERROR_NONE ){
- tsurf = tbm_surface_internal_create_with_bos(stream->width, stream->height, bo_format, (tbm_bo *)stream->bo, bo_num);
+ if (bo_num > 0 && ret == CAMERA_ERROR_NONE) {
+ tsurf_info.width = stream->width;
+ tsurf_info.height = stream->height;
+ tsurf_info.format = bo_format;
+ tsurf_info.bpp = tbm_surface_internal_get_bpp(bo_format);
+ tsurf_info.num_planes = tbm_surface_internal_get_num_planes(bo_format);
+
+ switch (bo_format) {
+ case TBM_FORMAT_NV12:
+ case TBM_FORMAT_NV21:
+ tsurf_info.planes[0].size = stream->stride[0] * stream->elevation[0];
+ tsurf_info.planes[1].size = stream->stride[1] * stream->elevation[1];
+ tsurf_info.planes[0].offset = 0;
+ if (bo_num == 1) {
+ tsurf_info.planes[1].offset = tsurf_info.planes[0].size;
+ }
+ tsurf_info.size = tsurf_info.planes[0].size + tsurf_info.planes[1].size;
+ break;
+ case TBM_FORMAT_YUV420:
+ case TBM_FORMAT_YVU420:
+ tsurf_info.planes[0].size = stream->stride[0] * stream->elevation[0];
+ tsurf_info.planes[1].size = stream->stride[1] * stream->elevation[1];
+ tsurf_info.planes[2].size = stream->stride[2] * stream->elevation[2];
+ tsurf_info.planes[0].offset = 0;
+ if (bo_num == 1) {
+ tsurf_info.planes[1].offset = tsurf_info.planes[0].size;
+ tsurf_info.planes[2].offset = tsurf_info.planes[0].size + tsurf_info.planes[1].size;
+ }
+ tsurf_info.size = tsurf_info.planes[0].size + tsurf_info.planes[1].size + tsurf_info.planes[2].size;
+ break;
+ case TBM_FORMAT_UYVY:
+ case TBM_FORMAT_YUYV:
+ tsurf_info.planes[0].size = (stream->stride[0] * stream->elevation[0]) << 1;
+ tsurf_info.planes[0].offset = 0;
+ tsurf_info.size = tsurf_info.planes[0].size;
+ break;
+ default:
+ break;
+ }
+
+ tsurf = tbm_surface_internal_create_with_bos(&tsurf_info, (tbm_bo *)stream->bo, bo_num);
- switch( mm_state ){
- case MM_CAMCORDER_STATE_NONE:
- state = CAMERA_STATE_NONE;
- break;
- case MM_CAMCORDER_STATE_NULL:
- state = CAMERA_STATE_CREATED;
- break;
- case MM_CAMCORDER_STATE_READY:
- state = CAMERA_STATE_CREATED;
- break;
- case MM_CAMCORDER_STATE_PREPARE:
- state = CAMERA_STATE_PREVIEW;
- break;
- case MM_CAMCORDER_STATE_CAPTURING:
- state = CAMERA_STATE_CAPTURING;
- break;
- case MM_CAMCORDER_STATE_RECORDING:
- state = CAMERA_STATE_PREVIEW;
- break;
- case MM_CAMCORDER_STATE_PAUSED:
- state = CAMERA_STATE_PREVIEW;
- break;
- default:
- state = CAMERA_STATE_NONE;
- break;
+ switch (mm_state) {
+ case MM_CAMCORDER_STATE_NONE:
+ state = CAMERA_STATE_NONE;
+ break;
+ case MM_CAMCORDER_STATE_NULL:
+ state = CAMERA_STATE_CREATED;
+ break;
+ case MM_CAMCORDER_STATE_READY:
+ state = CAMERA_STATE_CREATED;
+ break;
+ case MM_CAMCORDER_STATE_PREPARE:
+ state = CAMERA_STATE_PREVIEW;
+ break;
+ case MM_CAMCORDER_STATE_CAPTURING:
+ state = CAMERA_STATE_CAPTURING;
+ break;
+ case MM_CAMCORDER_STATE_RECORDING:
+ state = CAMERA_STATE_PREVIEW;
+ break;
+ case MM_CAMCORDER_STATE_PAUSED:
+ state = CAMERA_STATE_PREVIEW;
+ break;
+ default:
+ state = CAMERA_STATE_NONE;
+ break;
- case MM_MESSAGE_CAMCORDER_FACE_DETECT_INFO:
- {
- MMCamFaceDetectInfo *cam_fd_info = (MMCamFaceDetectInfo *)(m->data);
- if ( cam_fd_info ) {
- camera_detected_face_s faces[cam_fd_info->num_of_faces];
- handle->num_of_faces = cam_fd_info->num_of_faces > MAX_DETECTED_FACE ? MAX_DETECTED_FACE : cam_fd_info->num_of_faces;
- int i;
- for(i=0; i < handle->num_of_faces ; i++){
- faces[i].id = cam_fd_info->face_info[i].id;
- faces[i].score = cam_fd_info->face_info[i].score;
- faces[i].x = cam_fd_info->face_info[i].rect.x;
- faces[i].y = cam_fd_info->face_info[i].rect.y;
- faces[i].width = cam_fd_info->face_info[i].rect.width;
- faces[i].height = cam_fd_info->face_info[i].rect.height;
- handle->faceinfo[i] = faces[i]; //cache face coordinate
- }
- if( handle->user_cb[_CAMERA_EVENT_TYPE_FACE_DETECTION] )
- ((camera_face_detected_cb)handle->user_cb[_CAMERA_EVENT_TYPE_FACE_DETECTION])(faces, handle->num_of_faces, handle->user_data[_CAMERA_EVENT_TYPE_FACE_DETECTION]);
- }else{
- handle->num_of_faces = 0;
+ break;
+ case MM_MESSAGE_CAMCORDER_FACE_DETECT_INFO:
+ cam_fd_info = (MMCamFaceDetectInfo *)(m->data);
+ if (cam_fd_info) {
+ camera_detected_face_s faces[cam_fd_info->num_of_faces];
+ handle->num_of_faces = cam_fd_info->num_of_faces > MAX_DETECTED_FACE ? MAX_DETECTED_FACE : cam_fd_info->num_of_faces;
+
+ for (i = 0 ; i < handle->num_of_faces ; i++) {
+ faces[i].id = cam_fd_info->face_info[i].id;
+ faces[i].score = cam_fd_info->face_info[i].score;
+ faces[i].x = cam_fd_info->face_info[i].rect.x;
+ faces[i].y = cam_fd_info->face_info[i].rect.y;
+ faces[i].width = cam_fd_info->face_info[i].rect.width;
+ faces[i].height = cam_fd_info->face_info[i].rect.height;
+ handle->faceinfo[i] = faces[i]; //cache face coordinate
- switch( mode ){
- case CAMERA_ATTR_AF_NONE:
- ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_NONE,
- MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NONE,
- NULL);
- break;
- case CAMERA_ATTR_AF_NORMAL:
- ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NORMAL,
- NULL);
- break;
- case CAMERA_ATTR_AF_MACRO:
- ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_MACRO,
- NULL);
- break;
- case CAMERA_ATTR_AF_FULL:
- ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_FULL,
- NULL);
- break;
- default:
- return ret;
+ switch (mode) {
+ case CAMERA_ATTR_AF_NONE:
+ ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
+ MMCAM_CAMERA_FOCUS_MODE, MM_CAMCORDER_FOCUS_MODE_NONE,
+ MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NONE,
+ NULL);
+ break;
+ case CAMERA_ATTR_AF_NORMAL:
+ ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
+ MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_NORMAL,
+ NULL);
+ break;
+ case CAMERA_ATTR_AF_MACRO:
+ ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
+ MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_MACRO,
+ NULL);
+ break;
+ case CAMERA_ATTR_AF_FULL:
+ ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
+ MMCAM_CAMERA_AF_SCAN_RANGE, MM_CAMCORDER_AUTO_FOCUS_FULL,
+ NULL);
+ break;
+ default:
+ LOGE("invalid mode %d", mode);
+ return CAMERA_ERROR_INVALID_PARAMETER;
- int maptable[] = {
- CAMERA_ATTR_EXPOSURE_MODE_OFF, //MM_CAMCORDER_AUTO_EXPOSURE_OFF
- CAMERA_ATTR_EXPOSURE_MODE_ALL, //MM_CAMCORDER_AUTO_EXPOSURE_ALL
- CAMERA_ATTR_EXPOSURE_MODE_CENTER, //MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1
- CAMERA_ATTR_EXPOSURE_MODE_CENTER, //MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2
- CAMERA_ATTR_EXPOSURE_MODE_CENTER, //MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3
- CAMERA_ATTR_EXPOSURE_MODE_SPOT, //MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1
- CAMERA_ATTR_EXPOSURE_MODE_SPOT, //MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2
- CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,//MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1
- CAMERA_ATTR_EXPOSURE_MODE_CUSTOM //MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2
- };
- int ret;
+ int maptable[] = {CAMERA_ATTR_EXPOSURE_MODE_OFF, /* MM_CAMCORDER_AUTO_EXPOSURE_OFF */
+ CAMERA_ATTR_EXPOSURE_MODE_ALL, /* MM_CAMCORDER_AUTO_EXPOSURE_ALL */
+ CAMERA_ATTR_EXPOSURE_MODE_CENTER, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1 */
+ CAMERA_ATTR_EXPOSURE_MODE_CENTER, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2 */
+ CAMERA_ATTR_EXPOSURE_MODE_CENTER, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3 */
+ CAMERA_ATTR_EXPOSURE_MODE_SPOT, /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1 */
+ CAMERA_ATTR_EXPOSURE_MODE_SPOT, /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2 */
+ CAMERA_ATTR_EXPOSURE_MODE_CUSTOM, /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1 */
+ CAMERA_ATTR_EXPOSURE_MODE_CUSTOM /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2 */
+ };
+ int ret = MM_ERROR_NONE;
- int maptable[] = {
- CAMERA_ATTR_EXPOSURE_MODE_OFF, //MM_CAMCORDER_AUTO_EXPOSURE_OFF
- CAMERA_ATTR_EXPOSURE_MODE_ALL, //MM_CAMCORDER_AUTO_EXPOSURE_ALL
- CAMERA_ATTR_EXPOSURE_MODE_CENTER, //MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1
- -1, //MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2
- -1, //MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3
- CAMERA_ATTR_EXPOSURE_MODE_SPOT, //MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1
- -1, //MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2
- CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,//MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1
- -1//MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2
- };
- int ret;
- camera_s * handle = (camera_s*)camera;
+ int maptable[] = {CAMERA_ATTR_EXPOSURE_MODE_OFF, /* MM_CAMCORDER_AUTO_EXPOSURE_OFF */
+ CAMERA_ATTR_EXPOSURE_MODE_ALL, /* MM_CAMCORDER_AUTO_EXPOSURE_ALL */
+ CAMERA_ATTR_EXPOSURE_MODE_CENTER, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_1 */
+ -1, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_2 */
+ -1, /* MM_CAMCORDER_AUTO_EXPOSURE_CENTER_3 */
+ CAMERA_ATTR_EXPOSURE_MODE_SPOT, /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_1 */
+ -1, /* MM_CAMCORDER_AUTO_EXPOSURE_SPOT_2 */
+ CAMERA_ATTR_EXPOSURE_MODE_CUSTOM, /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_1 */
+ -1 /* MM_CAMCORDER_AUTO_EXPOSURE_CUSTOM_2 */
+ };
+ int i = 0;
+ int ret = MM_ERROR_NONE;
+ camera_s *handle = (camera_s *)camera;