हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
camera3_capture_request स्ट्रक्चर का रेफ़रंस
#include <
camera3.h
>
camera3_capture_request_t:
इमेज कैप्चर/बफ़र को फिर से प्रोसेस करने के लिए एक अनुरोध. इसे process_capture_request() फ़्रेमवर्क, Camera HAL डिवाइस पर भेजता है.
अनुरोध में, इस कैप्चर के लिए इस्तेमाल की जाने वाली सेटिंग और नतीजे वाली इमेज का डेटा लिखने के लिए आउटपुट बफ़र का सेट शामिल होता है. इसमें वैकल्पिक रूप से इनपुट बफ़र शामिल हो सकता है. ऐसे में, कैमरा सेंसर से नई इमेज कैप्चर करने के बजाय, उस इनपुट बफ़र को फिर से प्रोसेस करने का अनुरोध किया जाता है. कैप्चर की पहचान, frame_number से की जाती है.
इसके जवाब में, कैमरा एचएएल डिवाइस को प्रोसेस_कैप्चर_नतीजा() कॉलबैक का इस्तेमाल करके, फ़्रेमवर्क को एक साथ कई
camera3_capture_result
का स्ट्रक्चर भेजना होगा.
परिभाषा,
camera3.h
फ़ाइल की लाइन
2135
पर दी गई है.
फ़्रेम नंबर, फ़्रेम की यूनीक पहचान करने के लिए फ़्रेमवर्क से सेट किया जाने वाला एक बढ़ता हुआ पूर्णांक होता है. इसे नतीजे के कॉल में वापस लाया जाना चाहिए. साथ ही, इसका इस्तेमाल
camera3_callback_ops_t.notify()
पर भेजी गई असाइनोक्रोनस सूचनाओं में अनुरोध की पहचान करने के लिए भी किया जाता है.
परिभाषा, फ़ाइल
camera3.h
की लाइन
2142
पर दी गई है.
इस अनुरोध के लिए इस्तेमाल किया जाने वाला इनपुट स्ट्रीम बफ़र, अगर कोई हो.
अगर input_buffer शून्य है, तो इसका मतलब है कि इमेजर से नई इमेज कैप्चर करने का अनुरोध किया गया है. अगर input_buffer मान्य है, तो इसका मतलब है कि input_buffer में मौजूद इमेज को फिर से प्रोसेस करने का अनुरोध किया गया है.
बाद वाले मामले में, process_capture_request() के रिटर्न होने से पहले, एचएएल को input_buffer के release_fence को किसी मान्य सिंक फ़ेंस पर सेट करना होगा. अगर एचएएल सिंक के साथ काम नहीं करता है, तो उसे -1 पर सेट करना होगा.
इनपुट बफ़र को ऐक्सेस करने से पहले, एचएएल को 'ऐक्सेस करने के लिए सिंक फ़ेंस' पर इंतज़ार करना पड़ता है.
<= CAMERA_DEVICE_API_VERSION_3_1:
यहां शामिल किए गए किसी भी इनपुट बफ़र को अनुरोध में शामिल करने से पहले, register_stream_buffers() के ज़रिए HAL के साथ रजिस्टर किया जाएगा.
>= CAMERA_DEVICE_API_VERSION_3_2:
बफ़र, एचएएल के साथ पहले से रजिस्टर नहीं किए गए होंगे. इसके बाद के अनुरोधों के लिए, बफ़र का फिर से इस्तेमाल किया जा सकता है या नए बफ़र उपलब्ध कराए जा सकते हैं.
परिभाषा, फ़ाइल के
camera3.h
की लाइन
2177
पर दी गई है.
uint32_t num_output_buffers
|
इस कैप्चर अनुरोध के लिए आउटपुट बफ़र की संख्या. यह संख्या कम से कम एक होनी चाहिए.
परिभाषा,
camera3.h
फ़ाइल की लाइन
2183
पर दी गई है.
num_output_buffers स्ट्रीम बफ़र का कलेक्शन, जिसे इस कैप्चर/फिर से प्रोसेस करने से मिली इमेज के डेटा से भरा जाएगा. HAL को हर स्ट्रीम बफ़र में डेटा लिखने से पहले, उसके लिए 'फ़ेंस हासिल करें' निर्देश का इंतज़ार करना होगा.
एचएएल, output_buffers में मौजूद असल buffer_handle_t एंट्री का मालिकाना हक लेता है. फ़्रेमवर्क तब तक उन्हें ऐक्सेस नहीं करता, जब तक वे camera3_capture_result_t में वापस नहीं आ जाते.
<= CAMERA_DEVICE_API_VERSION_3_1:
यहां शामिल सभी बफ़र, अनुरोध में शामिल किए जाने से पहले, register_stream_buffers() के ज़रिए HAL के साथ रजिस्टर किए जा चुके होंगे.
>= CAMERA_DEVICE_API_VERSION_3_2:
इस अनुरोध में शामिल कोई भी या सभी बफ़र, नए हो सकते हैं. इसका मतलब है कि HAL ने उन्हें पहले कभी नहीं देखा है.
परिभाषा,
camera3.h
फ़ाइल की लाइन
2204
पर दी गई है
.
सेटिंग बफ़र में, अनुरोध के लिए कैप्चर और प्रोसेसिंग पैरामीटर शामिल होते हैं. किसी खास मामले में, सेटिंग बफ़र में NULL का दिखना इस बात का संकेत देता है कि सेटिंग, हाल ही में सबमिट किए गए कैप्चर अनुरोध से मेल खाती हैं. configure_streams() कॉल के बाद, सबमिट किए गए पहले अनुरोध के तौर पर NULL बफ़र का इस्तेमाल नहीं किया जा सकता.
परिभाषा, फ़ाइल
camera3.h
की लाइन
2151
पर दी गई है.
इस स्ट्रक्चर का दस्तावेज़, इस फ़ाइल से जनरेट किया गया था:
-
hardware/libhardware/include/hardware/
camera3.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: camera3_capture_request Struct Reference\n\ncamera3_capture_request Struct Reference\n========================================\n\n[Data Fields](#pub-attribs) \ncamera3_capture_request 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| uint32_t | [frame_number](/reference/hal/structcamera3__capture__request#a57cc7f4d579276167efca6cf047839b2) |\n| ||\n| const [camera_metadata_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h) \\* | [settings](/reference/hal/structcamera3__capture__request#adccd8702a549b9f5fb98afa0c4b44a62) |\n| ||\n| [camera3_stream_buffer_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h) \\* | [input_buffer](/reference/hal/structcamera3__capture__request#ac1c94bbde71f06911c6abe85f3a44593) |\n| ||\n| uint32_t | [num_output_buffers](/reference/hal/structcamera3__capture__request#a70d2093ddb1078b68c6688b6cf923380) |\n| ||\n| const [camera3_stream_buffer_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h) \\* | [output_buffers](/reference/hal/structcamera3__capture__request#ab1d50229b27a7cf28ff1374be6650fb6) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\ncamera3_capture_request_t:\n\n\nA single request for image capture/buffer reprocessing, sent to the Camera HAL device by the framework in process_capture_request().\n\n\nThe request contains the settings to be used for this capture, and the set of output buffers to write the resulting image data in. It may optionally contain an input buffer, in which case the request is for reprocessing that input buffer instead of capturing a new image with the camera sensor. The capture is identified by the frame_number.\n\n\nIn response, the camera HAL device must send a\n[camera3_capture_result](/reference/hal/structcamera3__capture__result)\nstructure asynchronously to the framework, using the process_capture_result() callback.\n\n\nDefinition at line\n[2135](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| uint32_t frame_number |\n\n\nThe frame number is an incrementing integer set by the framework to uniquely identify this capture. It needs to be returned in the result call, and is also used to identify the request in asynchronous notifications sent to\n[camera3_callback_ops_t.notify()](/reference/hal/structcamera3__callback__ops#a6d702d6e962f95105b984b17462619b3)\n.\n\n\nDefinition at line\n[2142](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| [camera3_stream_buffer_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h) \\* input_buffer |\n\n\nThe input stream buffer to use for this request, if any.\n\n\nIf input_buffer is NULL, then the request is for a new capture from the imager. If input_buffer is valid, the request is for reprocessing the image contained in input_buffer.\n\n\nIn the latter case, the HAL must set the release_fence of the input_buffer to a valid sync fence, or to -1 if the HAL does not support sync, before process_capture_request() returns.\n\n\nThe HAL is required to wait on the acquire sync fence of the input buffer before accessing it.\n\n\n\\\u003c= CAMERA_DEVICE_API_VERSION_3_1:\n\n\nAny input buffer included here will have been registered with the HAL through register_stream_buffers() before its inclusion in a request.\n\n\n\\\u003e= CAMERA_DEVICE_API_VERSION_3_2:\n\n\nThe buffers will not have been pre-registered with the HAL. Subsequent requests may reuse buffers, or provide entirely new buffers.\n\n\nDefinition at line\n[2177](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 num_output_buffers |\n\n\nThe number of output buffers for this capture request. Must be at least 1.\n\n\nDefinition at line\n[2183](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| const [camera3_stream_buffer_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h) \\* output_buffers |\n\n\nAn array of num_output_buffers stream buffers, to be filled with image data from this capture/reprocess. The HAL must wait on the acquire fences of each stream buffer before writing to them.\n\n\nThe HAL takes ownership of the actual buffer_handle_t entries in output_buffers; the framework does not access them until they are returned in a camera3_capture_result_t.\n\n\n\\\u003c= CAMERA_DEVICE_API_VERSION_3_1:\n\n\nAll the buffers included here will have been registered with the HAL through register_stream_buffers() before their inclusion in a request.\n\n\n\\\u003e= CAMERA_DEVICE_API_VERSION_3_2:\n\n\nAny or all of the buffers included here may be brand new in this request (having never before seen by the HAL).\n\n\nDefinition at line\n[2204](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| const [camera_metadata_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h) \\* settings |\n\n\nThe settings buffer contains the capture and processing parameters for the request. As a special case, a NULL settings buffer indicates that the settings are identical to the most-recently submitted capture request. A NULL buffer cannot be used as the first submitted request after a configure_streams() call.\n\n\nDefinition at line\n[2151](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)"]]