/* [VideoInput] matching table */
static conf_info_table conf_main_video_input_table[] = {
- { "UseConfCtrl", CONFIGURE_VALUE_INT, {.value_int = 1} },
- { "ConfCtrlFile0", CONFIGURE_VALUE_STRING, {NULL} },
- { "ConfCtrlFile1", CONFIGURE_VALUE_STRING, {NULL} },
{ "VideosrcElement", CONFIGURE_VALUE_ELEMENT, {&_videosrc_element_default} },
{ "UseVideoscale", CONFIGURE_VALUE_INT, {.value_int = 0} },
{ "VideoscaleElement", CONFIGURE_VALUE_ELEMENT, {&_videoscale_element_default} },
{ "FPS9", CONFIGURE_VALUE_INT_ARRAY, {NULL} },
{ "PictureFormat", CONFIGURE_VALUE_INT_ARRAY, {NULL} },
{ "Overlay", CONFIGURE_VALUE_INT_RANGE, {NULL} },
- { "RecommendDisplayRotation", CONFIGURE_VALUE_INT, {.value_int = 3} },
+ { "RecommendDisplayRotation", CONFIGURE_VALUE_INT, {.value_int = 3} },
{ "RecommendPreviewFormatCapture", CONFIGURE_VALUE_INT, {.value_int = MM_PIXEL_FORMAT_YUYV} },
{ "RecommendPreviewFormatRecord", CONFIGURE_VALUE_INT, {.value_int = MM_PIXEL_FORMAT_NV12} },
{ "RecommendPreviewResolution", CONFIGURE_VALUE_INT_PAIR_ARRAY, {NULL} },
{ "FacingDirection", CONFIGURE_VALUE_INT, {.value_int = MM_CAMCORDER_CAMERA_FACING_DIRECTION_REAR} },
+ { "FrameStabilityCount", CONFIGURE_VALUE_INT, {.value_int = 0} },
};
/* [Strobe] matching table */
{ "Contrast", CONFIGURE_VALUE_INT_RANGE, {NULL} },
{ "Saturation", CONFIGURE_VALUE_INT_RANGE, {NULL} },
{ "Sharpness", CONFIGURE_VALUE_INT_RANGE, {NULL} },
+ { "Hue", CONFIGURE_VALUE_INT_RANGE, {NULL} },
{ "WhiteBalance", CONFIGURE_VALUE_INT_ARRAY, {NULL} },
{ "ColorTone", CONFIGURE_VALUE_INT_ARRAY, {NULL} },
{ "Flip", CONFIGURE_VALUE_INT_ARRAY, {NULL} },
{ "SensorEncodedCapture", CONFIGURE_VALUE_INT, {.value_int = 1} },
{ "SupportHDR", CONFIGURE_VALUE_INT_ARRAY, {NULL} },
{ "SupportZSL", CONFIGURE_VALUE_INT, {.value_int = FALSE} },
+ { "FrameStabilityCount", CONFIGURE_VALUE_INT, {.value_int = 0} },
};
/* [Detect] matching table */
_mmcam_dbg_log("Try open Configure File[%s]", conf_path);
fp = fopen(conf_path, "r");
- if (fp == NULL) {
+ if (!fp) {
_mmcam_dbg_warn("File open failed.[%s] retry...", conf_path);
snprintf(conf_path, sizeof(conf_path), "%s/multimedia/%s", TZ_SYS_ETC, ConfFile);
_mmcam_dbg_log("Try open Configure File[%s]", conf_path);
fp = fopen(conf_path, "r");
- if (fp == NULL)
+ if (!fp) {
_mmcam_dbg_warn("open failed.[%s] errno [%d]", conf_path, errno);
+ ret = MM_ERROR_CAMCORDER_NOT_SUPPORTED;
+ }
}
- if (fp != NULL) {
+ if (fp) {
ret = _mmcamcorder_conf_parse_info(handle, type, fp, configure_info);
fclose(fp);
- } else {
- if (errno == ENOENT)
- ret = MM_ERROR_CAMCORDER_NOT_SUPPORTED;
- else
- ret = MM_ERROR_CAMCORDER_CREATE_CONFIGURE;
}
- _mmcam_dbg_log("Leave...");
+ _mmcam_dbg_log("Leave [0x%x]", ret);
return ret;
}
new_conf = (camera_conf *)g_malloc0(sizeof(camera_conf));
if (new_conf == NULL) {
- _mmcam_dbg_err("new_conf alloc failed : %d", sizeof(camera_conf));
+ _mmcam_dbg_err("new_conf alloc failed : %zu", sizeof(camera_conf));
return MM_ERROR_CAMCORDER_LOW_MEMORY;
}
buffer_string = (char*)g_malloc0(sizeof(char) * BUFFER_LENGTH_STRING);
if (buffer_string == NULL) {
- _mmcam_dbg_err("buffer_string alloc failed : %d", sizeof(char) * BUFFER_LENGTH_STRING);
+ _mmcam_dbg_err("buffer_string alloc failed : %zu", sizeof(char) * BUFFER_LENGTH_STRING);
g_free(new_conf);
return MM_ERROR_CAMCORDER_LOW_MEMORY;
}
}
}
} else {
- _mmcam_dbg_err("malloc failed : %d", sizeof(type_string2*)*(new_element->count_string));
+ _mmcam_dbg_err("malloc failed : %zu", sizeof(type_string2*)*(new_element->count_string));
}
} else {
/*_mmcam_dbg_err("invalid count - %d", new_element->count_string);*/
arr = (int*) g_malloc0(count * sizeof(int));
if (arr == NULL) {
- _mmcam_dbg_err("malloc failed : %d", count * sizeof(int));
+ _mmcam_dbg_err("malloc failed : %zu", count * sizeof(int));
return 0;
}