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 camera3_jpeg_blob
#include <
camera3.h
>
camera3_jpeg_blob
:
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. El framework calcula el tamaño del búfer para la transmisión en función del campo de metadatos estático android.jpeg.maxSize. 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 CAMERA3_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[buffer_size - sizeof(camera3_jpeg_blob)], donde buffer_size es el tamaño del búfer de gralloc. Cualquier HAL que use este encabezado de transporte debe tenerlo en cuenta en android.jpeg.maxSize. Los datos JPEG comienzan al principio del búfer y deben tener un tamaño de jpeg_size bytes.
Definición en la línea
1885
del archivo
camera3.h
.
La documentación de esta struct se generó a partir del siguiente archivo:
-
hardware/libhardware/include/hardware/
camera3.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: camera3_jpeg_blob Struct Reference\n\ncamera3_jpeg_blob Struct Reference\n==================================\n\n[Data Fields](#pub-attribs) \ncamera3_jpeg_blob Struct Reference \n\n`\n#include \u003c\n`[camera3.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h)`\n\u003e\n`\n\n|----------|--------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| uint16_t | [jpeg_blob_id](/reference/hal/structcamera3__jpeg__blob#a8eecd9b8a99477acdd51629ad25470fe) |\n| ||\n| uint32_t | [jpeg_size](/reference/hal/structcamera3__jpeg__blob#a2dcb603ff79e35e18e814e85f75c83e5) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\n[camera3_jpeg_blob](/reference/hal/structcamera3__jpeg__blob)\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. The buffer size for the stream is calculated by the framework, based on the static metadata field android.jpeg.maxSize. 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 CAMERA3_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\\[buffer_size - sizeof(camera3_jpeg_blob)\\], where the buffer_size is the size of gralloc buffer. Any HAL using this transport header must account for it in android.jpeg.maxSize The JPEG data itself starts at the beginning of the buffer and should be jpeg_size bytes long.\n\n\nDefinition at line\n[1885](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h)\nof file\n[camera3.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h)\n.\n\nField Documentation\n-------------------\n\n\n|-----------------------|\n| uint16_t jpeg_blob_id |\n\n\nDefinition at line\n[1886](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h)\nof file\n[camera3.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h)\n.\n\n|--------------------|\n| uint32_t jpeg_size |\n\n\nDefinition at line\n[1887](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h)\nof file\n[camera3.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [camera3.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h)"]]