summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2021-06-07 16:40:49 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2021-06-07 16:57:24 +0900
commit86555e4b0cddb9c6ffc412e742f6eaa1c103fc2c (patch)
treea0f354401b40b0fdbe7d1a680ae0c20a0b91eb16
parent3f62bcc8be0ec76c5a2394ea8fbc5c9f64b909e0 (diff)
downloadcamera-86555e4b0cddb9c6ffc412e742f6eaa1c103fc2c.tar.gz
camera-86555e4b0cddb9c6ffc412e742f6eaa1c103fc2c.tar.bz2
camera-86555e4b0cddb9c6ffc412e742f6eaa1c103fc2c.zip
[Version] 0.4.57 [Issue Type] New feature Change-Id: I9b1ad416b37f0b4e8aa5f67db531d6cf4e051ac9 Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r--include/camera.h4
-rw-r--r--packaging/capi-media-camera.spec2
-rw-r--r--test/camera_test.c22
3 files changed, 21 insertions, 7 deletions
diff --git a/include/camera.h b/include/camera.h
index d7dded2..a59999c 100644
--- a/include/camera.h
+++ b/include/camera.h
@@ -121,7 +121,9 @@ typedef enum {
CAMERA_PIXEL_FORMAT_JPEG, /**< Encoded pixel format */
CAMERA_PIXEL_FORMAT_H264 = 15, /**< Encoded pixel format : H264 (Since 3.0) */
CAMERA_PIXEL_FORMAT_INVZ, /**< Depth pixel format : INVZ (Since 5.0) */
- CAMERA_PIXEL_FORMAT_MJPEG /**< Encoded pixel format : Motion JPEG for preview (Since 6.0) */
+ CAMERA_PIXEL_FORMAT_MJPEG, /**< Encoded pixel format : Motion JPEG for preview (Since 6.0) */
+ CAMERA_PIXEL_FORMAT_VP8, /**< Encoded pixel format : VP8 (Since 6.5) */
+ CAMERA_PIXEL_FORMAT_VP9 /**< Encoded pixel format : VP9 (Since 6.5) */
} camera_pixel_format_e;
/**
diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec
index 144730f..75186ae 100644
--- a/packaging/capi-media-camera.spec
+++ b/packaging/capi-media-camera.spec
@@ -1,6 +1,6 @@
Name: capi-media-camera
Summary: A Camera API
-Version: 0.4.56
+Version: 0.4.57
Release: 0
Group: Multimedia/API
License: Apache-2.0
diff --git a/test/camera_test.c b/test/camera_test.c
index 181d885..3d061da 100644
--- a/test/camera_test.c
+++ b/test/camera_test.c
@@ -519,14 +519,25 @@ static void _dump_preview_data(camera_preview_data_s *frame, const char *file_na
return;
}
- if (frame->format == CAMERA_PIXEL_FORMAT_RGBA ||
- frame->format == CAMERA_PIXEL_FORMAT_ARGB) {
+ switch (frame->format) {
+ case CAMERA_PIXEL_FORMAT_RGBA:
+ /* fall through */
+ case CAMERA_PIXEL_FORMAT_ARGB:
fwrite(frame->data.rgb_plane.data, 1, frame->data.rgb_plane.size, fp);
- } else if (frame->format == CAMERA_PIXEL_FORMAT_INVZ) {
+ break;
+ case CAMERA_PIXEL_FORMAT_INVZ:
fwrite(frame->data.depth_plane.data, 1, frame->data.depth_plane.size, fp);
- } else if (frame->format == CAMERA_PIXEL_FORMAT_MJPEG) {
+ break;
+ case CAMERA_PIXEL_FORMAT_H264:
+ /* fall through */
+ case CAMERA_PIXEL_FORMAT_MJPEG:
+ /* fall through */
+ case CAMERA_PIXEL_FORMAT_VP8:
+ /* fall through */
+ case CAMERA_PIXEL_FORMAT_VP9:
fwrite(frame->data.encoded_plane.data, 1, frame->data.encoded_plane.size, fp);
- } else {
+ break;
+ default:
switch (frame->num_of_planes) {
case 1:
fwrite(frame->data.single_plane.yuv, 1, frame->data.single_plane.size, fp);
@@ -543,6 +554,7 @@ static void _dump_preview_data(camera_preview_data_s *frame, const char *file_na
default:
break;
}
+ break;
}
g_print("[DUMP_PREVIEW_DATA] file[%s] write done\n", dump_path);