A partir del 27 de marzo de 2025, te recomendamos que uses android-latest-release
en lugar de aosp-main
para compilar y contribuir a AOSP. Para obtener más información, consulta Cambios en AOSP.
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Referencia de la estructura camera2_jpeg_blob
#include <
camera2.h
>
Encabezado de transporte para búferes de JPEG comprimidos en flujos de salida.
Para capturar imágenes JPEG, se crea una transmisión con el formato de píxeles HAL_PIXEL_FORMAT_BLOB, y el campo de metadatos estáticos android.jpeg.maxSize se usa como el tamaño del búfer. Dado que las imágenes JPEG comprimidas tienen un tamaño variable, la HAL debe incluir el tamaño final de la imagen comprimida con esta estructura dentro del búfer de flujo de salida. El campo de ID de blob de JPEG debe establecerse en CAMERA2_JPEG_BLOB_ID.
El encabezado de transporte debe estar al final del búfer de flujo de salida de JPEG. Eso significa que jpeg_blob_id debe comenzar en byte[android.jpeg.maxSize - sizeof(camera2_jpeg_blob)]. Cualquier HAL que use este encabezado de transporte debe tenerlo en cuenta en android.jpeg.maxSize. Los datos JPEG comienzan en byte[0] y deben tener un tamaño de jpeg_size bytes.
Definición en la línea
146
del archivo
camera2.h
.
La documentación de esta struct se generó a partir del siguiente archivo:
-
hardware/libhardware/include/hardware/
camera2.h
El contenido y las muestras de código que aparecen en esta página están sujetas a las licencias que se describen en la Licencia de Contenido. Java y OpenJDK son marcas registradas de Oracle o sus afiliados.
Última actualización: 2025-07-27 (UTC)
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-27 (UTC)"],[],[],null,["# Android Hardware Abstraction Layer: camera2_jpeg_blob Struct Reference\n\ncamera2_jpeg_blob Struct Reference\n==================================\n\n[Data Fields](#pub-attribs) \ncamera2_jpeg_blob Struct Reference \n\n`\n#include \u003c\n`[camera2.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera2.h)`\n\u003e\n`\n\n|----------|--------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| uint16_t | [jpeg_blob_id](/reference/hal/structcamera2__jpeg__blob#a8eecd9b8a99477acdd51629ad25470fe) |\n| ||\n| uint32_t | [jpeg_size](/reference/hal/structcamera2__jpeg__blob#a2dcb603ff79e35e18e814e85f75c83e5) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nTransport header for compressed JPEG buffers in output streams.\n\n\nTo 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.\n\n\nTransport header should be at the end of the JPEG output stream buffer. That means the jpeg_blob_id must start at byte\\[android.jpeg.maxSize - sizeof(camera2_jpeg_blob)\\]. Any HAL using this transport header must account for it in android.jpeg.maxSize. The JPEG data itself starts at byte\\[0\\] and should be jpeg_size bytes long.\n\n\nDefinition at line\n[146](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera2.h)\nof file\n[camera2.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera2.h)\n.\n\nField Documentation\n-------------------\n\n\n|-----------------------|\n| uint16_t jpeg_blob_id |\n\n\nDefinition at line\n[147](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera2.h)\nof file\n[camera2.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera2.h)\n.\n\n|--------------------|\n| uint32_t jpeg_size |\n\n\nDefinition at line\n[148](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera2.h)\nof file\n[camera2.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera2.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [camera2.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera2.h)"]]