From: Jeongmo Yang Date: Mon, 7 Jun 2021 07:40:49 +0000 (+0900) Subject: [ACR-1634] Add new pixel format - VP8, VP9 X-Git-Tag: accepted/tizen/unified/20210615.120241^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86555e4b0cddb9c6ffc412e742f6eaa1c103fc2c;p=platform%2Fcore%2Fapi%2Fcamera.git [ACR-1634] Add new pixel format - VP8, VP9 [Version] 0.4.57 [Issue Type] New feature Change-Id: I9b1ad416b37f0b4e8aa5f67db531d6cf4e051ac9 Signed-off-by: Jeongmo Yang --- 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);