From: Jeongmo Yang Date: Wed, 19 Aug 2020 11:33:14 +0000 (+0900) Subject: Fix missed preview resolution setting when start preview X-Git-Tag: submit/tizen/20200819.121427^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c87e3b8c2ec50bd75d5dfb37396667dad1867529;p=platform%2Fcore%2Fmultimedia%2Flibmm-camcorder.git Fix missed preview resolution setting when start preview - It causes 0x0 resolution in preview stream callback [Version] 0.10.209 [Issue Type] Bug fix Change-Id: I765fee04abb5a6d41f450f717ea0cafdbe188898 Signed-off-by: Jeongmo Yang --- diff --git a/packaging/libmm-camcorder.spec b/packaging/libmm-camcorder.spec index 6330607..b86c340 100644 --- a/packaging/libmm-camcorder.spec +++ b/packaging/libmm-camcorder.spec @@ -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 diff --git a/src/mm_camcorder_gstcommon.c b/src/mm_camcorder_gstcommon.c index 9dc9b47..411ed5d 100644 --- a/src/mm_camcorder_gstcommon.c +++ b/src/mm_camcorder_gstcommon.c @@ -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); }