Set missed data_type in stream data for normal buffer 14/241914/2 accepted/tizen/unified/20200825.033203 submit/tizen/20200821.025149
authorJeongmo Yang <jm80.yang@samsung.com>
Fri, 21 Aug 2020 00:46:17 +0000 (09:46 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Fri, 21 Aug 2020 02:17:13 +0000 (11:17 +0900)
[Version] 0.10.210
[Issue Type] Bug fix

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

index b86c340a56973d15243c68aa663384c299ecd5fe..96bfce7ade1ccb5658f2aadff85c4425c4560f9e 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.209
+Version:    0.10.210
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 411ed5d64291b0dd24711fa53c26bed1330bd1c4..1c759307a600558f7d268e6c8a4e8dcd9cbfb6f7 100644 (file)
@@ -172,6 +172,7 @@ static gboolean __mmcamcorder_set_stream_data_normal(MMCamcorderVideoStreamDataT
        switch (stream->format) {
        case MM_PIXEL_FORMAT_NV12: /* fall through */
        case MM_PIXEL_FORMAT_NV21:
+               stream->data_type = MM_CAM_STREAM_DATA_YUV420SP;
                stream->data.yuv420sp.y = map_info->data;
                stream->data.yuv420sp.length_y = stream->width * stream->height;
                stream->data.yuv420sp.uv = stream->data.yuv420sp.y + stream->data.yuv420sp.length_y;
@@ -184,6 +185,7 @@ static gboolean __mmcamcorder_set_stream_data_normal(MMCamcorderVideoStreamDataT
                break;
 
        case MM_PIXEL_FORMAT_I420:
+               stream->data_type = MM_CAM_STREAM_DATA_YUV420P;
                stream->data.yuv420p.y = map_info->data;
                stream->data.yuv420p.length_y = stream->width * stream->height;
                stream->data.yuv420p.u = stream->data.yuv420p.y + stream->data.yuv420p.length_y;
@@ -197,9 +199,23 @@ static gboolean __mmcamcorder_set_stream_data_normal(MMCamcorderVideoStreamDataT
                stream->num_planes = 3;
                break;
 
+       case MM_PIXEL_FORMAT_422P:
+               stream->data_type = MM_CAM_STREAM_DATA_YUV422P;
+               stream->data.yuv422p.y = map_info->data;
+               stream->data.yuv422p.length_y = stream->width * stream->height;
+               stream->data.yuv422p.u = stream->data.yuv422p.y + stream->data.yuv422p.length_y;
+               stream->data.yuv422p.length_u = stream->data.yuv422p.length_y >> 1;
+               stream->data.yuv422p.v = stream->data.yuv422p.u + stream->data.yuv422p.length_u;
+               stream->data.yuv422p.length_v = stream->data.yuv422p.length_u;
+               stream->stride[0] = stream->width;
+               stream->elevation[0] = stream->height;
+               stream->stride[1] = stream->stride[2] = stream->width;
+               stream->elevation[1] = stream->elevation[2] = stream->height >> 1;
+               stream->num_planes = 3;
+               break;
+
        case MM_PIXEL_FORMAT_YUYV: /* fall through */
        case MM_PIXEL_FORMAT_UYVY: /* fall through */
-       case MM_PIXEL_FORMAT_422P: /* fall through */
        case MM_PIXEL_FORMAT_ITLV_JPEG_UYVY:
                stream->data_type = MM_CAM_STREAM_DATA_YUV422;
                stream->data.yuv422.yuv = map_info->data;