summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKwanghoon Son <k.son@samsung.com>2024-06-05 15:16:22 +0900
committerKwanghoon Son <k.son@samsung.com>2024-06-05 15:18:57 +0900
commit1f5c3aec0c541c1eeb41e2913c1ee298a33c9420 (patch)
treed1eab29354175a67ded9e91d3d3418e683b91650
parent2e00bae635ae920f3470b46464607ec1fb4de972 (diff)
downloadvision-source-v4l2-accepted/tizen_unified_toolchain.tar.gz
vision-source-v4l2-accepted/tizen_unified_toolchain.tar.bz2
vision-source-v4l2-accepted/tizen_unified_toolchain.zip
Change-Id: I586c672b5b37a62e0fc148a893bf51efd9220b87 Signed-off-by: Kwanghoon Son <k.son@samsung.com>
-rw-r--r--packaging/vision-source-v4l2.spec2
-rw-r--r--src/vision_source_v4l2.cpp12
2 files changed, 13 insertions, 1 deletions
diff --git a/packaging/vision-source-v4l2.spec b/packaging/vision-source-v4l2.spec
index 702e777..e165de3 100644
--- a/packaging/vision-source-v4l2.spec
+++ b/packaging/vision-source-v4l2.spec
@@ -3,7 +3,7 @@
Name: vision-source-v4l2
Summary: vision source-v4l2
-Version: 1.0.1
+Version: 1.1.0
Release: 0
Group: Multimedia/Framework
License: Apache-2.0
diff --git a/src/vision_source_v4l2.cpp b/src/vision_source_v4l2.cpp
index 9d7e075..d4c8151 100644
--- a/src/vision_source_v4l2.cpp
+++ b/src/vision_source_v4l2.cpp
@@ -147,6 +147,12 @@ static int __vision_source_get_format(uint32_t fourcc, int *pixel_format)
case V4L2_PIX_FMT_NV21:
*pixel_format = MEDIA_FORMAT_NV21;
break;
+ case V4L2_PIX_FMT_YUV420:
+ *pixel_format = MEDIA_FORMAT_I420;
+ break;
+ case V4L2_PIX_FMT_MJPEG:
+ *pixel_format = MEDIA_FORMAT_MJPEG;
+ break;
default:
LOGW("unknown fourcc " FOURCC_FORMAT, FOURCC_CONVERT(fourcc));
return VISION_SOURCE_ERROR_NOT_SUPPORTED_FORMAT;
@@ -172,6 +178,12 @@ static int __vision_source_get_fourcc_plane_num(media_format_mimetype_e pixel_fo
case MEDIA_FORMAT_NV21:
*fourcc = V4L2_PIX_FMT_NV21;
break;
+ case MEDIA_FORMAT_I420:
+ *fourcc = V4L2_PIX_FMT_YUV420;
+ break;
+ case MEDIA_FORMAT_MJPEG:
+ *fourcc = V4L2_PIX_FMT_MJPEG;
+ break;
default:
LOGE("unknown format %d", pixel_format);
return VISION_SOURCE_ERROR_INTERNAL;