+int _mmcamcorder_get_fps_array_by_resolution(MMHandleType handle, int width, int height, MMCamAttrsInfo* fps_info)
+{
+ MMCamAttrsInfo *infoW = NULL;
+ MMCamAttrsInfo *infoH = NULL;
+ int i = 0;
+ char nameFps[10] = {0,};
+ bool valid_check = false;
+
+ type_int_array *fps_array;
+
+ mmf_camcorder_t *hcamcorder = MMF_CAMCORDER(handle);
+
+ //_mmcam_dbg_log("prev resolution w:%d, h:%d", width, height);
+
+ infoW = (MMCamAttrsInfo*)calloc(1, sizeof(MMCamAttrsInfo));
+ if (infoW == NULL) {
+ _mmcam_dbg_err("failed to alloc infoW");
+ return MM_ERROR_CAMCORDER_LOW_MEMORY;
+ }
+
+ infoH = (MMCamAttrsInfo*)calloc(1, sizeof(MMCamAttrsInfo));
+ if (infoH == NULL) {
+ _mmcam_dbg_err("failed to alloc infoH");
+
+ free(infoW);
+ infoW = NULL;
+
+ return MM_ERROR_CAMCORDER_LOW_MEMORY;
+ }
+
+ mm_camcorder_get_attribute_info(handle, MMCAM_CAMERA_WIDTH, infoW);
+ mm_camcorder_get_attribute_info(handle, MMCAM_CAMERA_HEIGHT, infoH);
+
+ for(i=0; i < infoW->int_array.count; i++) {
+ //_mmcam_dbg_log("width :%d, height : %d\n", infoW->int_array.array[i], infoH->int_array.array[i]);
+ if(infoW->int_array.array[i] == width && infoH->int_array.array[i] == height) {
+ valid_check = true;
+ snprintf(nameFps, 10, "FPS%d", i);
+ _mmcam_dbg_log("nameFps : %s!!!", nameFps);
+ break;
+ }
+ }
+
+ free(infoW);
+ infoW = NULL;
+ free(infoH);
+ infoH = NULL;
+
+ if(!valid_check) {
+ _mmcam_dbg_err("FAILED : Can't find the valid resolution from attribute.");
+ return MM_ERROR_CAMCORDER_NOT_SUPPORTED;
+ }
+
+ if (!_mmcamcorder_conf_get_value_int_array(hcamcorder->conf_ctrl, CONFIGURE_CATEGORY_CTRL_CAMERA, nameFps, &fps_array)) {
+ _mmcam_dbg_err("FAILED : Can't find the valid FPS array.");
+ return MM_ERROR_CAMCORDER_CREATE_CONFIGURE;
+ }
+
+ fps_info->int_array.count = fps_array->count;
+ fps_info->int_array.array = fps_array->value;
+ fps_info->int_array.def = fps_array->default_value;
+
+ return MM_ERROR_NONE;
+}
+