Fix missed preview resolution setting when start preview 69/241369/1 accepted/tizen/unified/20200820.034814 submit/tizen/20200819.121427
authorJeongmo Yang <jm80.yang@samsung.com>
Wed, 19 Aug 2020 11:33:14 +0000 (20:33 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Wed, 19 Aug 2020 11:34:41 +0000 (20:34 +0900)
- It causes 0x0 resolution in preview stream callback

[Version] 0.10.209
[Issue Type] Bug fix

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

index 6330607..b86c340 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.208
+Version:    0.10.209
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 9dc9b47..411ed5d 100644 (file)
@@ -402,8 +402,6 @@ int _mmcamcorder_create_preview_elements(MMHandleType handle)
 {
        int err = MM_ERROR_NONE;
        int i = 0;
-       int camera_width = 0;
-       int camera_height = 0;
        int camera_rotate = 0;
        int camera_flip = 0;
        int fps = 0;
@@ -466,8 +464,6 @@ int _mmcamcorder_create_preview_elements(MMHandleType handle)
        }
 
        err = mm_camcorder_get_attributes(handle, &err_name,
-               MMCAM_CAMERA_WIDTH, &camera_width,
-               MMCAM_CAMERA_HEIGHT, &camera_height,
                MMCAM_CAMERA_FORMAT, &sc->info_image->preview_format,
                MMCAM_CAMERA_FPS, &fps,
                MMCAM_CAMERA_ROTATION, &camera_rotate,
@@ -2423,8 +2419,6 @@ bool _mmcamcorder_set_display_flip(MMHandleType handle, int display_flip, int vi
 
 bool _mmcamcorder_set_videosrc_rotation(MMHandleType handle, int videosrc_rotate)
 {
-       int width = 0;
-       int height = 0;
        int fps = 0;
        _MMCamcorderSubContext *sc = NULL;
 
@@ -2440,14 +2434,16 @@ bool _mmcamcorder_set_videosrc_rotation(MMHandleType handle, int videosrc_rotate
        }
 
        mm_camcorder_get_attributes(handle, NULL,
-               MMCAM_CAMERA_WIDTH, &width,
-               MMCAM_CAMERA_HEIGHT, &height,
+               MMCAM_CAMERA_WIDTH, &sc->info_video->preview_width,
+               MMCAM_CAMERA_HEIGHT, &sc->info_video->preview_height,
                MMCAM_CAMERA_FPS, &fps,
                NULL);
 
        _mmcam_dbg_log("set rotate %d", videosrc_rotate);
 
-       return _mmcamcorder_set_videosrc_caps(handle, sc->fourcc, width, height, fps, videosrc_rotate);
+       return _mmcamcorder_set_videosrc_caps(handle, sc->fourcc,
+               sc->info_video->preview_width, sc->info_video->preview_height,
+               fps, videosrc_rotate);
 }