हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
camera2_jpeg_blob स्ट्रक्चर का रेफ़रंस
#include <
camera2.h
>
आउटपुट स्ट्रीम में, कंप्रेस किए गए JPEG बफ़र के लिए ट्रांसपोर्ट हेडर.
JPEG इमेज कैप्चर करने के लिए, पिक्सल फ़ॉर्मैट HAL_PIXEL_FORMAT_BLOB का इस्तेमाल करके एक स्ट्रीम बनाई जाती है. साथ ही, स्टैटिक मेटाडेटा फ़ील्ड android.jpeg.maxSize का इस्तेमाल बफ़र साइज़ के तौर पर किया जाता है. कंप्रेस की गई JPEG इमेज का साइज़ अलग-अलग होता है. इसलिए, HAL को आउटपुट स्ट्रीम बफ़र में इस स्ट्रक्चर का इस्तेमाल करके, कंप्रेस की गई इमेज का फ़ाइनल साइज़ शामिल करना होगा. JPEG ब्लॉब आईडी फ़ील्ड को CAMERA2_JPEG_BLOB_ID पर सेट करना होगा.
ट्रांसपोर्ट हेडर, JPEG आउटपुट स्ट्रीम बफ़र के आखिर में होना चाहिए. इसका मतलब है कि jpeg_blob_id, byte[android.jpeg.maxSize - sizeof(camera2_jpeg_blob)] से शुरू होना चाहिए. इस ट्रांसपोर्ट हेडर का इस्तेमाल करने वाले किसी भी एचएएल को, android.jpeg.maxSize में इसकी जानकारी देनी होगी. JPEG डेटा, byte[0] से शुरू होता है और यह jpeg_size बाइट का होना चाहिए.
परिभाषा,
camera2.h
फ़ाइल की लाइन
146
पर दी गई है.
इस स्ट्रक्चर का दस्तावेज़, इस फ़ाइल से जनरेट किया गया था:
-
hardware/libhardware/include/hardware/
camera2.h
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 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)"]]