From d3bfe05d0afa84b5b67180c60103a19f0afa502f Mon Sep 17 00:00:00 2001 From: Jeongmo Yang Date: Fri, 21 Aug 2020 09:46:17 +0900 Subject: [PATCH] Set missed data_type in stream data for normal buffer [Version] 0.10.210 [Issue Type] Bug fix Change-Id: Ifaa02746c2061498f290385023e5ed913253dfbb Signed-off-by: Jeongmo Yang --- packaging/libmm-camcorder.spec | 2 +- src/mm_camcorder_gstcommon.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packaging/libmm-camcorder.spec b/packaging/libmm-camcorder.spec index b86c340..96bfce7 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.209 +Version: 0.10.210 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_camcorder_gstcommon.c b/src/mm_camcorder_gstcommon.c index 411ed5d..1c75930 100644 --- a/src/mm_camcorder_gstcommon.c +++ b/src/mm_camcorder_gstcommon.c @@ -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; -- 2.34.1