Od 27 marca 2025 r. zalecamy używanie android-latest-release
zamiast aosp-main
do kompilowania i wspołtworzenia AOSP. Więcej informacji znajdziesz w artykule o zmianach w AOSP.
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Informacje o strukturze camera2_jpeg_blob
#include <
camera2.h
>
Nagłówek transportu dla skompresowanych buforów JPEG w strumieniu wyjściowym.
Aby przechwytywać obrazy JPEG, tworzy się strumień za pomocą formatu pikseli HAL_PIXEL_FORMAT_BLOB, a jako rozmiar bufora używane jest pole statycznych metadanych android.jpeg.maxSize. Ponieważ skompresowane obrazy JPEG mają zmienny rozmiar, HAL musi uwzględnić ostateczny rozmiar skompresowanego obrazu, używając tej struktury w buforze strumienia wyjściowego. Pole identyfikatora bloba JPEG musi mieć wartość CAMERA2_JPEG_BLOB_ID.
Nagłówek transportu powinien znajdować się na końcu bufora strumienia wyjściowego JPEG. Oznacza to, że identyfikator jpeg_blob_id musi zaczynać się od bajtu [android.jpeg.maxSize – sizeof(camera2_jpeg_blob)]. Każdy HAL, który używa tego nagłówka transportowego, musi uwzględnić go w android.jpeg.maxSize. Dane JPEG zaczynają się w bajcie [0] i powinny mieć długość określoną przez parametr jpeg_size.
Definicja w wierszu
146
pliku
camera2.h
.
Dokumentacja tego typu danych została wygenerowana z tego pliku:
-
hardware/libhardware/include/hardware/
camera2.h
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-27 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 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)"]]