case MM_ERROR_CAMCORDER_FILE_SIZE_OVER:
case MM_ERROR_CAMCORDER_DISPLAY_DEVICE_OFF:
case MM_ERROR_CAMCORDER_INVALID_CONDITION:
+ case MM_ERROR_CAMCORDER_MNOTE_CREATION:
+ case MM_ERROR_CAMCORDER_MNOTE_ADD_ENTRY:
+ case MM_ERROR_FILE_NOT_FOUND:
+ case MM_ERROR_FILE_READ:
ret = CAMERA_ERROR_INVALID_OPERATION;
errorstr = "INVALID_OPERATION";
break;
case MM_ERROR_CAMCORDER_RESOURCE_CREATION:
+ case MM_ERROR_CAMCORDER_LOW_MEMORY:
+ case MM_ERROR_CAMCORDER_MNOTE_MALLOC:
case MM_ERROR_COMMON_OUT_OF_MEMORY:
ret = CAMERA_ERROR_OUT_OF_MEMORY;
errorstr = "OUT_OF_MEMORY";
break;
//LCOV_EXCL_START
case MM_MESSAGE_CAMCORDER_ERROR:
- switch (m->code) {
- case MM_ERROR_CAMCORDER_DEVICE:
- case MM_ERROR_CAMCORDER_DEVICE_TIMEOUT:
- case MM_ERROR_CAMCORDER_DEVICE_WRONG_JPEG:
- camera_error = CAMERA_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_NEGOTIATION:
- case MM_ERROR_CAMCORDER_GST_FLOW_ERROR:
- case MM_ERROR_CAMCORDER_ENCODER:
- case MM_ERROR_CAMCORDER_ENCODER_BUFFER:
- case MM_ERROR_CAMCORDER_ENCODER_WORKING:
- case MM_ERROR_CAMCORDER_MNOTE_CREATION:
- case MM_ERROR_CAMCORDER_MNOTE_ADD_ENTRY:
- case MM_ERROR_CAMCORDER_INTERNAL:
- case MM_ERROR_FILE_NOT_FOUND:
- case MM_ERROR_FILE_READ:
- camera_error = CAMERA_ERROR_INVALID_OPERATION;
- break;
- case MM_ERROR_CAMCORDER_LOW_MEMORY:
- case MM_ERROR_CAMCORDER_MNOTE_MALLOC:
- camera_error = CAMERA_ERROR_OUT_OF_MEMORY;
- break;
- case MM_ERROR_CAMCORDER_DEVICE_REG_TROUBLE:
- camera_error = CAMERA_ERROR_ESD;
- break;
- case MM_ERROR_OUT_OF_STORAGE:
- case MM_ERROR_FILE_WRITE:
+ if (m->code == MM_ERROR_OUT_OF_STORAGE || m->code == MM_ERROR_FILE_WRITE) {
CAM_LOG_WARNING("unhandled message[0x%x]", m->code);
return FALSE;
- default:
- camera_error = CAMERA_ERROR_INVALID_OPERATION;
- break;
}
+ camera_error = __convert_camera_error_code("MESSAGE_ERROR", m->code);
+
/* set capture completed flag as true to release camera handle */
handle->is_capture_completed = true;