Update code for configuration 16/90916/2 accepted/tizen/3.0/mobile/20161015.033527 accepted/tizen/3.0/tv/20161016.005008 accepted/tizen/3.0/wearable/20161015.083237 accepted/tizen/common/20161005.165520 accepted/tizen/ivi/20161007.003938 accepted/tizen/mobile/20161007.003737 accepted/tizen/tv/20161007.003828 accepted/tizen/wearable/20161007.003906 submit/tizen/20161005.055916 submit/tizen_3.0_mobile/20161015.000003 submit/tizen_3.0_tv/20161015.000003 submit/tizen_3.0_wearable/20161015.000003
authorJeongmo Yang <jm80.yang@samsung.com>
Wed, 5 Oct 2016 02:40:49 +0000 (11:40 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Wed, 5 Oct 2016 02:43:28 +0000 (11:43 +0900)
Some type information has no default value, so the error could be occurred.
Then, skip the error in case of some type which has no default value.

[Version] 0.10.76
[Profile] Common
[Issue Type] Update
[Dependency module] N/A
[Dependency commit] N/A
[Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-mobile_20160930.5]

Change-Id: I0af2aabc7597167388fe2c18d0e2218294732e58
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/libmm-camcorder.spec
src/mm_camcorder_configure.c
src/mm_camcorder_platform.c

index 9c2c3cc..a23e305 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.75
+Version:    0.10.76
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 14feac1..1f64188 100644 (file)
@@ -1671,11 +1671,11 @@ int _mmcamcorder_conf_get_value_int(MMHandleType handle, camera_conf* configure_
        }
 
        if (_mmcamcorder_conf_get_default_value_int(handle, configure_info->type, category, name, value)) {
-               /* _mmcam_dbg_log("Get[%s] int[%d]", name, *value); */
+                /*_mmcam_dbg_log("Get[%s] int[%d]", name, *value);*/
                return TRUE;
        }
 
-       _mmcam_dbg_warn("Faild to get int... check it...Category[%d],Name[%s]", category, name);
+       _mmcam_dbg_err("Faild to get int... check it...Category[%d],Name[%s]", category, name);
 
        return FALSE;
 }
@@ -1787,7 +1787,7 @@ _mmcamcorder_conf_get_value_int_pair_array(camera_conf* configure_info, int cate
 
        *value = NULL;
 
-       _mmcam_dbg_warn("Faild to get int pair array... check it...Category[%d],Name[%s]", category, name);
+       /*_mmcam_dbg_warn("Faild to get int pair array... check it...Category[%d],Name[%s]", category, name);*/
 
        return FALSE;
 }
@@ -1812,18 +1812,18 @@ int _mmcamcorder_conf_get_value_string(MMHandleType handle, camera_conf* configu
 
                        if (!strcmp(((type_string*)(info->detail_info[i]))->name , name)) {
                                *value = ((type_string*)(info->detail_info[i]))->value;
-                               /* _mmcam_dbg_log( "Get[%s] string[%s]", name, *value ); */
+                                /*_mmcam_dbg_log( "Get[%s] string[%s]", name, *value ? *value : "NULL" );*/
                                return TRUE;
                        }
                }
        }
 
        if (_mmcamcorder_conf_get_default_value_string(handle, configure_info->type, category, name, value)) {
-               /* _mmcam_dbg_log("Get[%s]string[%s]", name, *value); */
+               /*_mmcam_dbg_log( "Get[%s] string[%s]", name, *value ? *value : "NULL" );*/
                return TRUE;
        }
 
-       _mmcam_dbg_warn("Faild to get string... check it...Category[%d],Name[%s]", category, name);
+       _mmcam_dbg_err("Faild to get string... check it...Category[%d],Name[%s]", category, name);
 
        return FALSE;
 }
@@ -2054,7 +2054,7 @@ _mmcamcorder_conf_get_default_value_int(MMHandleType handle, int type, int categ
                }
        }
 
-       _mmcam_dbg_warn("Failed to get default int... check it... Type[%d],Category[%d],Name[%s]", type, category, name);
+       _mmcam_dbg_err("Failed to get default int... check it... Type[%d],Category[%d],Name[%s]", type, category, name);
 
        return FALSE;
 }
@@ -2084,7 +2084,7 @@ int _mmcamcorder_conf_get_default_value_string(MMHandleType handle, int type, in
                for (i = 0 ; i < count_value ; i++) {
                        if (!strcmp(hcamcorder->conf_main_info_table[category][i].name, name)) {
                                *value = hcamcorder->conf_main_info_table[category][i].value_string;
-                               _mmcam_dbg_log("Get[%s] default string[%s]", name, *value);
+                               /*_mmcam_dbg_log("Get[%s] default string[%s]", name, *value ? *value : "NULL");*/
                                return TRUE;
                        }
                }
@@ -2092,7 +2092,7 @@ int _mmcamcorder_conf_get_default_value_string(MMHandleType handle, int type, in
                for (i = 0 ; i < count_value ; i++) {
                        if (!strcmp(hcamcorder->conf_ctrl_info_table[category][i].name, name)) {
                                *value = hcamcorder->conf_ctrl_info_table[category][i].value_string;
-                               _mmcam_dbg_log("Get[%s] default string[%s]", name, *value);
+                               /*_mmcam_dbg_log("Get[%s] default string[%s]", name, *value ? *value : "NULL");*/
                                return TRUE;
                        }
                }
index b4c0117..9dcd29d 100644 (file)
@@ -940,6 +940,9 @@ int __mmcamcorder_set_info_to_attr(MMHandleType handle, _MMCamcorderInfoConverti
                        info[i].conv_type);
                */
 
+               if (ret != MM_ERROR_NONE)
+                       break;
+
                if (info[i].type == CONFIGURE_TYPE_MAIN) {
                        conf_info = hcamcorder->conf_main;
                        /*_mmcam_dbg_log("MAIN configure [%s]", info[i].keyword);*/
@@ -955,7 +958,7 @@ int __mmcamcorder_set_info_to_attr(MMHandleType handle, _MMCamcorderInfoConverti
 
                        if (!_mmcamcorder_conf_get_value_int(handle, conf_info, info[i].category, info[i].keyword, &ivalue)) {
                                ret = MM_ERROR_CAMCORDER_CREATE_CONFIGURE;
-                               break;  /* skip to set */
+                               break; /* skip to set */
                        }
 
                        ret = mm_attrs_set_int(MMF_CAMCORDER_ATTRS(hcamcorder), info[i].attr_idx, ivalue);
@@ -968,10 +971,8 @@ int __mmcamcorder_set_info_to_attr(MMHandleType handle, _MMCamcorderInfoConverti
                        int idefault = 0;
                        type_int_array *tarray = NULL;
 
-                       if (!_mmcamcorder_conf_get_value_int_array(conf_info, info[i].category, info[i].keyword, &tarray)) {
-                               ret = MM_ERROR_CAMCORDER_CREATE_CONFIGURE;
-                               break;  /* skip to set */
-                       }
+                       if (!_mmcamcorder_conf_get_value_int_array(conf_info, info[i].category, info[i].keyword, &tarray))
+                               break; /* skip to set, but not error */
 
                        if (tarray) {
                                idefault = tarray->default_value;
@@ -1006,10 +1007,8 @@ int __mmcamcorder_set_info_to_attr(MMHandleType handle, _MMCamcorderInfoConverti
                {
                        type_int_range *irange = NULL;
 
-                       if (!_mmcamcorder_conf_get_value_int_range(conf_info, info[i].category, info[i].keyword, &irange)) {
-                               ret = MM_ERROR_CAMCORDER_CREATE_CONFIGURE;
-                               break;  /* skip to set */
-                       }
+                       if (!_mmcamcorder_conf_get_value_int_range(conf_info, info[i].category, info[i].keyword, &irange))
+                               break; /* skip to set, but not error */
 
                        if (irange) {
                                /* _mmcam_dbg_log("INT Range. m:%d, s:%d, min=%d, max=%d", info[i].main_key, info[i].sub_key1, irange->min, irange->max); */
@@ -1029,7 +1028,7 @@ int __mmcamcorder_set_info_to_attr(MMHandleType handle, _MMCamcorderInfoConverti
 
                        if (!_mmcamcorder_conf_get_value_string(handle, conf_info, info[i].category, info[i].keyword, &cString)) {
                                ret = MM_ERROR_CAMCORDER_CREATE_CONFIGURE;
-                               break;  /* skip to set */
+                               break; /* skip to set */
                        }
 
                        /* _mmcam_dbg_log("String. m:%d, s:%d, cString=%s", info[i].main_key, info[i].sub_key1, cString); */
@@ -1048,10 +1047,8 @@ int __mmcamcorder_set_info_to_attr(MMHandleType handle, _MMCamcorderInfoConverti
 
                        /*_mmcam_dbg_log("INT PAIR Array. type:%d, attr_idx:%d, attr_idx_pair:%d", info[i].type, info[i].attr_idx, info[i].attr_idx_pair);*/
 
-                       if (!_mmcamcorder_conf_get_value_int_pair_array(conf_info, info[i].category, info[i].keyword, &pair_array)) {
-                               ret = MM_ERROR_CAMCORDER_CREATE_CONFIGURE;
-                               break;  /* skip to set */
-                       }
+                       if (!_mmcamcorder_conf_get_value_int_pair_array(conf_info, info[i].category, info[i].keyword, &pair_array))
+                               break; /* skip to set, but not error */
 
                        if (pair_array && pair_array->count > 0) {
                                /* "mmf_attrs_set_valid_type" initializes spec value in attribute, so allocated memory could be missed */