{
int ret = MM_ERROR_NONE;
camera_s *handle = (camera_s *)camera;
- MMCamAttrsInfo info;
- int mm_fps = 0;
- int i = 0;
camera_return_val_if_fail(handle, CAMERA_ERROR_INVALID_PARAMETER);
camera_return_val_if_fail(width > 0 && height > 0, CAMERA_ERROR_INVALID_PARAMETER);
- mm_camcorder_get_attributes(handle->mm_handle, NULL,
- MMCAM_CAMERA_FPS, &mm_fps,
- NULL);
-
- ret = mm_camcorder_get_fps_list_by_resolution(handle->mm_handle, width, height, &info);
- if (ret != MM_ERROR_NONE)
- return __convert_camera_error_code(__func__, ret);
-
- for (i = 0 ; i < info.int_array.count ; i++) {
- if (info.int_array.array[i] == mm_fps)
- break;
-
- if (i == info.int_array.count - 1) {
- CAM_LOG_ERROR("Not supported resolution: Current set Resolution's FPS is not supported in wanted resolution.");
- return CAMERA_ERROR_NOT_SUPPORTED;
- }
- }
-
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
MMCAM_CAMERA_WIDTH, width,
MMCAM_CAMERA_HEIGHT, height,