diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2012-09-21 18:33:50 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-21 18:33:51 -0700 |
commit | 3a90d5964bc17ace1097e06a62d0410241c6c99c (patch) | |
tree | b167eba91637780f59b8d132888e9bffbbb089a9 /include | |
parent | 919e1c45b77b99c0215a53ab93d8032abb6d8c26 (diff) | |
parent | ada3a97820dd48d513350d1365a3040d570bab6e (diff) | |
download | hardware_libhardware-3a90d5964bc17ace1097e06a62d0410241c6c99c.zip hardware_libhardware-3a90d5964bc17ace1097e06a62d0410241c6c99c.tar.gz hardware_libhardware-3a90d5964bc17ace1097e06a62d0410241c6c99c.tar.bz2 |
Merge "Camera2: Add JPEG transport header" into jb-mr1-dev
Diffstat (limited to 'include')
-rw-r--r-- | include/hardware/camera2.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/hardware/camera2.h b/include/hardware/camera2.h index e6b99b7..8587fc5 100644 --- a/include/hardware/camera2.h +++ b/include/hardware/camera2.h @@ -114,6 +114,26 @@ enum { }; /** + * Transport header for compressed JPEG buffers in output streams. + * + * To capture JPEG images, a stream is created using the pixel format + * HAL_PIXEL_FORMAT_BLOB, and the static metadata field android.jpeg.maxSize is + * used as the buffer size. Since compressed JPEG images are of variable size, + * the HAL needs to include the final size of the compressed image using this + * structure inside the output stream buffer. The JPEG blob ID field must be set + * to CAMERA2_JPEG_BLOB_ID. + */ +typedef struct camera2_jpeg_blob { + uint16_t jpeg_blob_id; + uint32_t jpeg_size; + uint8_t jpeg_data[0]; +}; + +enum { + CAMERA2_JPEG_BLOB_ID = 0x00FF +}; + +/** * Input reprocess stream queue management. A set of these methods is provided * to the HAL device in allocate_reprocess_stream(); they are used to interact * with the reprocess stream's input gralloc buffer queue. |