Move "SupportExtraPreview" from main to control configure 74/275474/1
authorJeongmo Yang <jm80.yang@samsung.com>
Wed, 25 May 2022 12:45:11 +0000 (21:45 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Wed, 25 May 2022 12:45:11 +0000 (21:45 +0900)
[Version] 0.10.258
[Issue Type] Update

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

index 4bcef3b..6537004 100755 (executable)
@@ -1,7 +1,7 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.257
-Release:    1
+Version:    0.10.258
+Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
index 78902d4..55328a0 100644 (file)
@@ -670,7 +670,6 @@ int _mmcamcorder_conf_init(MMHandleType handle, int type, camera_conf *configure
                { "SupportMediaPacketPreviewCb",  CONFIGURE_VALUE_INT,          {.value_int = 0} },
                { "SupportUserBuffer",            CONFIGURE_VALUE_INT,          {.value_int = 0} },
                { "MeasurePreviewFPS",            CONFIGURE_VALUE_INT,          {.value_int = 0} },
-               { "SupportExtraPreview",          CONFIGURE_VALUE_INT,          {.value_int = 0} },
                { "DefaultEncodedPreviewBitrate", CONFIGURE_VALUE_INT,          {.value_int = DEFAULT_ENCODED_PREVIEW_BITRATE} },
        };
 
@@ -817,12 +816,13 @@ int _mmcamcorder_conf_init(MMHandleType handle, int type, camera_conf *configure
                { "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} },
-               { "RecommendPreviewFormatCapture", CONFIGURE_VALUE_INT, {.value_int = MM_PIXEL_FORMAT_YUYV} },
-               { "RecommendPreviewFormatRecord",  CONFIGURE_VALUE_INT, {.value_int = MM_PIXEL_FORMAT_NV12} },
+               { "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} },
+               { "FacingDirection",      CONFIGURE_VALUE_INT,            {.value_int = MM_CAMCORDER_CAMERA_FACING_DIRECTION_REAR} },
+               { "FrameStabilityCount",  CONFIGURE_VALUE_INT,            {.value_int = 0} },
+               { "SupportExtraPreview",  CONFIGURE_VALUE_INT,            {.value_int = 0} }
        };
 
        /* [Strobe] matching table */
@@ -968,14 +968,13 @@ int _mmcamcorder_conf_get_info(MMHandleType handle, int type, const char *ConfFi
                fp = fopen(conf_path, "r");
                if (!fp) {
                        MMCAM_LOG_WARNING("open failed.[%s] errno [%d]", conf_path, errno);
-                       ret = MM_ERROR_CAMCORDER_NOT_SUPPORTED;
+                       return MM_ERROR_CAMCORDER_NOT_SUPPORTED;
                }
        }
 
-       if (fp) {
-               ret = _mmcamcorder_conf_parse_info(handle, type, fp, configure_info);
-               fclose(fp);
-       }
+       ret = _mmcamcorder_conf_parse_info(handle, type, fp, configure_info);
+
+       fclose(fp);
 
        MMCAM_LOG_INFO("Leave [0x%x]", ret);
 
index 1867d85..c7e3f23 100644 (file)
@@ -420,10 +420,10 @@ static gint __mmcamcorder_init_configure_video_capture(mmf_camcorder_t *hcamcord
                "RecommendDisplayRotation",
                &rcmd_dpy_rotation);
 
-       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
-               CONFIGURE_CATEGORY_MAIN_CAPTURE,
-               "PlayCaptureSound",
-               &play_capture_sound);
+       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_ctrl,
+               CONFIGURE_CATEGORY_CTRL_CAMERA,
+               "SupportExtraPreview",
+               &hcamcorder->support_extra_preview);
 
        _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_ctrl,
                CONFIGURE_CATEGORY_CTRL_CAMERA,
@@ -440,10 +440,11 @@ static gint __mmcamcorder_init_configure_video_capture(mmf_camcorder_t *hcamcord
                "SupportZSL",
                &hcamcorder->support_zsl_capture);
 
-       MMCAM_LOG_INFO("Recommend fmt[cap:%d,rec:%d], dpy rot %d, cap snd %d, cam facing dir %d, step denom %d, support zsl %d",
-               rcmd_fmt_capture, rcmd_fmt_recording, rcmd_dpy_rotation,
-               play_capture_sound, camera_facing_direction,
-               hcamcorder->brightness_step_denominator, hcamcorder->support_zsl_capture);
+       MMCAM_LOG_INFO("Recommend format[capture:%d, recording:%d]", rcmd_fmt_capture, rcmd_fmt_recording);
+       MMCAM_LOG_INFO("Recommend display rotation[%d]", rcmd_dpy_rotation);
+       MMCAM_LOG_INFO("Camera facing direction[%d]", camera_facing_direction);
+       MMCAM_LOG_INFO("Brightness step denominator[%d]", hcamcorder->brightness_step_denominator);
+       MMCAM_LOG_INFO("Support ZSL capture[%d]", hcamcorder->support_zsl_capture);
 
        _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
                CONFIGURE_CATEGORY_MAIN_VIDEO_INPUT,
@@ -461,11 +462,6 @@ static gint __mmcamcorder_init_configure_video_capture(mmf_camcorder_t *hcamcord
                &hcamcorder->support_media_packet_preview_cb);
 
        _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
-               CONFIGURE_CATEGORY_MAIN_VIDEO_INPUT,
-               "SupportExtraPreview",
-               &hcamcorder->support_extra_preview);
-
-       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
                CONFIGURE_CATEGORY_MAIN_VIDEO_OUTPUT,
                "UseVideoconvert",
                &hcamcorder->use_videoconvert);
@@ -480,6 +476,20 @@ static gint __mmcamcorder_init_configure_video_capture(mmf_camcorder_t *hcamcord
                "DefaultEncodedPreviewBitrate",
                &hcamcorder->default_encoded_preview_bitrate);
 
+       _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main,
+               CONFIGURE_CATEGORY_MAIN_CAPTURE,
+               "PlayCaptureSound",
+               &play_capture_sound);
+
+       MMCAM_LOG_INFO("Support user buffer[%d]", hcamcorder->support_user_buffer);
+       MMCAM_LOG_INFO("Support media packet preview cb[%d]", hcamcorder->support_media_packet_preview_cb);
+       MMCAM_LOG_INFO("Support extra preview[%d]", hcamcorder->support_extra_preview);
+       MMCAM_LOG_INFO("Use zero copy format[%d]", hcamcorder->use_zero_copy_format);
+       MMCAM_LOG_INFO("Use video convert[%d]", hcamcorder->use_videoconvert);
+       MMCAM_LOG_INFO("Measure preview FPS[%d]", hcamcorder->measure_preview_fps);
+       MMCAM_LOG_INFO("Default encoded preview bitrate[%d]", hcamcorder->default_encoded_preview_bitrate);
+       MMCAM_LOG_INFO("Play capture sound[%d]", play_capture_sound);
+
        ret = mm_camcorder_get_attributes((MMHandleType)hcamcorder, NULL,
                MMCAM_CAMERA_WIDTH, &resolution_width,
                MMCAM_CAMERA_HEIGHT, &resolution_height,
@@ -495,12 +505,6 @@ static gint __mmcamcorder_init_configure_video_capture(mmf_camcorder_t *hcamcord
                return MM_ERROR_CAMCORDER_INTERNAL;
        }
 
-       MMCAM_LOG_INFO("ZC %d, UB %d, VC %d, MPPC %d, EP %d, MPFPS %d, DEPB %d",
-               hcamcorder->use_zero_copy_format, hcamcorder->support_user_buffer,
-               hcamcorder->use_videoconvert, hcamcorder->support_media_packet_preview_cb,
-               hcamcorder->support_extra_preview, hcamcorder->measure_preview_fps,
-               hcamcorder->default_encoded_preview_bitrate);
-
        MMCAM_LOG_INFO("res : %d X %d, Default FPS by resolution : %d",
                resolution_width, resolution_height, fps_info.int_array.def);