Remove unused configuration 28/274328/1 accepted/tizen/unified/20220428.162705 submit/tizen/20220427.095935
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 26 Apr 2022 08:41:08 +0000 (17:41 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 26 Apr 2022 08:41:08 +0000 (17:41 +0900)
[Version] 0.10.257
[Issue Type] Clean up

Change-Id: I01ef4aa1bac8c7647becf54d504537645b22ebcc
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/libmm-camcorder.spec
src/include/mm_camcorder_attribute.h
src/include/mm_camcorder_platform.h
src/mm_camcorder_attribute.c
src/mm_camcorder_configure.c
src/mm_camcorder_internal.c
src/mm_camcorder_stillshot.c

index 0f70e330a3aabff33b2b5b34836f03307dec913f..540d5c1e5e49f15e2841d1e5189238cae807b6fa 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.256
+Version:    0.10.257
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 3d9da019b34e9463e12550eeb4683e518440b52d..d0ce15ed20e2e9c345eeb1b9e9ae4606fab5cc3c 100644 (file)
@@ -420,14 +420,6 @@ bool _mmcamcorder_set_attribute_to_camsensor2(MMHandleType handle);
  */
 int _mmcamcorder_lock_readonly_attributes(MMHandleType handle);
 
-/**
- * This function disable pre-defined attributes.
- *
- * @param[in]  handle          Handle of camcorder.
- * @return     int             Success on MM_ERROR_NONE or return ERROR with error code
- */
-int _mmcamcorder_set_disabled_attributes(MMHandleType handle);
-
 /**
  * check whether supported or not
  *
index 62b5939c2eef2ee36d77ca45170f13af66ca7b52..ad4f7ead7f33a00b79b2da2a0fc4fd2fe9551a83 100644 (file)
@@ -112,16 +112,6 @@ extern "C" {
 #define MMF_CAM_W1280          1280
 #define MMF_CAM_H720           720
 
-//Zero
-#define MMF_CAM_W0             0
-#define MMF_CAM_H0             0
-
-
-/* Capture related */
-/* High quality resolution */
-#define MMFCAMCORDER_HIGHQUALITY_WIDTH         MMF_CAM_W0      /* High quality resolution is not needed, */
-#define MMFCAMCORDER_HIGHQUALITY_HEIGHT                MMF_CAM_H0      /* because camsensor has a JPEG encoder inside */
-
 /* VGA (1 : 0.75) */
 #define MMF_CROP_VGA_LEFT                      0
 #define MMF_CROP_VGA_RIGHT                     0
index d27adaf1f0ebf404a59928753e232d912a13058d..c188c526987d76862654d5db84e64b6c510b6301 100644 (file)
@@ -4975,45 +4975,6 @@ int _mmcamcorder_lock_readonly_attributes(MMHandleType handle)
 }
 
 
-int _mmcamcorder_set_disabled_attributes(MMHandleType handle)
-{
-       mmf_camcorder_t *hcamcorder = MMF_CAMCORDER(handle);
-       MMHandleType attrs;
-       int i = 0;
-       type_string_array * disabled_attr = NULL;
-       int cnt_str = 0;
-       int nerror = MM_ERROR_NONE ;
-
-       mmf_return_val_if_fail(hcamcorder, MM_ERROR_CAMCORDER_INVALID_ARGUMENT);
-
-       attrs = MMF_CAMCORDER_ATTRS(handle);
-       mmf_return_val_if_fail(attrs, MM_ERROR_CAMCORDER_NOT_INITIALIZED);
-
-       MMCAM_LOG_INFO("");
-
-       /* add gst_param */
-       _mmcamcorder_conf_get_value_string_array(hcamcorder->conf_main,
-               CONFIGURE_CATEGORY_MAIN_GENERAL,
-               "DisabledAttributes",
-               &disabled_attr);
-       if (disabled_attr != NULL && disabled_attr->value) {
-               cnt_str = disabled_attr->count;
-               for (i = 0; i < cnt_str; i++) {
-                       int idx = 0;
-                       MMCAM_LOG_INFO("[%d]%s", i, disabled_attr->value[i]);
-                       nerror = mm_attrs_get_index(attrs, disabled_attr->value[i], &idx);
-
-                       if (nerror == MM_ERROR_NONE)
-                               mm_attrs_set_disabled(attrs, idx);
-                       else
-                               MMCAM_LOG_WARNING("No ATTR named %s[%d]", disabled_attr->value[i], i);
-               }
-       }
-
-       return nerror;
-}
-
-
 /*---------------------------------------------------------------------------------------
 |    INTERNAL FUNCTION DEFINITIONS:                                                    |
 ---------------------------------------------------------------------------------------*/
index ab1472b42d54b991d5ceb499fd24ce466683c29a..78902d460eae3e9e06f46d11a6873f50bd2cf6ee 100644 (file)
@@ -654,10 +654,7 @@ int _mmcamcorder_conf_init(MMHandleType handle, int type, camera_conf *configure
 
        /* [General] matching table */
        static conf_info_table conf_main_general_table[] = {
-               { "SyncStateChange",            CONFIGURE_VALUE_INT,            {.value_int = 1} },
                { "GSTInitOption",              CONFIGURE_VALUE_STRING_ARRAY,   {NULL} },
-               { "ModelName",                  CONFIGURE_VALUE_STRING,         {NULL} },
-               { "DisabledAttributes",         CONFIGURE_VALUE_STRING_ARRAY,   {NULL} },
                { "PlatformPrivilegeCamera",    CONFIGURE_VALUE_STRING,         {NULL} },
                { "LogLevel",                   CONFIGURE_VALUE_INT,            {.value_int = MM_CAMCORDER_LOG_LEVEL_INFO} },
                { "NetworkCameraHALName",       CONFIGURE_VALUE_STRING,         {NULL} },
@@ -709,7 +706,6 @@ int _mmcamcorder_conf_init(MMHandleType handle, int type, camera_conf *configure
        /* [Capture] matching table */
        static conf_info_table conf_main_capture_table[] = {
                { "UseEncodebin",           CONFIGURE_VALUE_INT,     {.value_int = 0} },
-               { "UseCaptureMode",         CONFIGURE_VALUE_INT,     {.value_int = 0} },
                { "VideoscaleElement",      CONFIGURE_VALUE_ELEMENT, {&_videoscale_element_default} },
                { "PlayCaptureSound",       CONFIGURE_VALUE_INT,     {.value_int = 1} },
        };
index 27a683d7d209fda8743ea671a6b7ae0cb460555b..1867d854ee66b5268886357d215ee5686ef96474 100644 (file)
@@ -735,9 +735,6 @@ int _mmcamcorder_create(MMHandleType *handle, MMCamPreset *info)
        /* Make some attributes as read-only type */
        _mmcamcorder_lock_readonly_attributes((MMHandleType)hcamcorder);
 
-       /* Disable attributes in each model */
-       _mmcamcorder_set_disabled_attributes((MMHandleType)hcamcorder);
-
        /* get system information */
        __mmcamcorder_get_system_info(hcamcorder);
 
index a7834f7dfe319e1d4b8da451a124112738810227..1ee633e38b24278c605afbc8a4f7b78216d746c5 100644 (file)
@@ -351,7 +351,6 @@ _REUSE_CHECK_DONE:
 int _mmcamcorder_image_cmd_capture(MMHandleType handle)
 {
        int ret = MM_ERROR_NONE;
-       int UseCaptureMode = 0;
        int width = 0;
        int height = 0;
        int fps = 0;
@@ -383,11 +382,6 @@ int _mmcamcorder_image_cmd_capture(MMHandleType handle)
                return MM_ERROR_CAMCORDER_DEVICE_BUSY;
        }
 
-       _mmcamcorder_conf_get_value_int(handle, hcamcorder->conf_main,
-               CONFIGURE_CATEGORY_MAIN_CAPTURE,
-               "UseCaptureMode",
-               &UseCaptureMode);
-
        /* get current state */
        mm_camcorder_get_state(handle, &current_state);
 
@@ -507,20 +501,9 @@ int _mmcamcorder_image_cmd_capture(MMHandleType handle)
                control = GST_CAMERA_CONTROL(sc->element[_MMCAMCORDER_VIDEOSRC_SRC].gst);
                gst_camera_control_set_capture_command(control, GST_CAMERA_CONTROL_CAPTURE_COMMAND_START);
        } else {
-               int need_change = 0;
-               int set_width = 0;
-               int set_height = 0;
                int cap_jpeg_quality = 0;
 
-               if (UseCaptureMode) {
-                       if (width != MMFCAMCORDER_HIGHQUALITY_WIDTH || height != MMFCAMCORDER_HIGHQUALITY_HEIGHT)
-                               need_change = 1;
-               } else {
-                       if (width != info->width || height != info->height)
-                               need_change = 1;
-               }
-
-               if (need_change) {
+               if (width != info->width || height != info->height) {
                        int rotation = 0;
 
                        MMCAM_LOG_INFO("Need to change resolution");
@@ -545,14 +528,6 @@ int _mmcamcorder_image_cmd_capture(MMHandleType handle)
                                goto cmd_done;
                        }
 
-                       if (UseCaptureMode) {
-                               set_width = MMFCAMCORDER_HIGHQUALITY_WIDTH;
-                               set_height = MMFCAMCORDER_HIGHQUALITY_HEIGHT;
-                       } else {
-                               set_width = info->width;
-                               set_height = info->height;
-                       }
-
                        mm_camcorder_get_attributes(handle, &err_name,
                                MMCAM_CAMERA_ROTATION, &rotation,
                                NULL);
@@ -562,7 +537,7 @@ int _mmcamcorder_image_cmd_capture(MMHandleType handle)
                        }
 
                        /* set new caps */
-                       ret = _mmcamcorder_set_videosrc_caps(handle, sc->fourcc, set_width, set_height, fps, rotation);
+                       ret = _mmcamcorder_set_videosrc_caps(handle, sc->fourcc, info->width, info->height, fps, rotation);
                        if (!ret) {
                                MMCAM_LOG_ERROR("_mmcamcorder_set_videosrc_caps failed");
                                ret = MM_ERROR_CAMCORDER_INTERNAL;
@@ -581,7 +556,7 @@ int _mmcamcorder_image_cmd_capture(MMHandleType handle)
                                goto cmd_done;
                        }
 
-                       MMCAM_LOG_INFO("Change to target resolution(%d, %d)", set_width, set_height);
+                       MMCAM_LOG_INFO("Change to target resolution(%d, %d)", info->width, info->height);
                } else {
                        MMCAM_LOG_INFO("No need to change resolution. Open toggle now.");
                        info->resolution_change = FALSE;