summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;