از 27 مارس 2025، توصیه می کنیم از android-latest-release
به جای aosp-main
برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
مرجع ساختار camera3_capture_request
#include < camera3.h >
camera3_capture_request_t:
یک درخواست واحد برای ضبط تصویر/پردازش مجدد بافر، که توسط فریمورک موجود در process_capture_request () به دستگاه Camera HAL ارسال شده است.
درخواست شامل تنظیماتی است که برای این عکسبرداری استفاده میشود، و مجموعه بافرهای خروجی برای نوشتن دادههای تصویر حاصله. ممکن است به صورت اختیاری حاوی یک بافر ورودی باشد، در این صورت درخواست برای پردازش مجدد آن بافر ورودی به جای گرفتن یک بافر جدید است. تصویر با سنسور دوربین ضبط با فریم_شماره شناسایی می شود.
در پاسخ، دستگاه دوربین HAL باید یک ساختار camera3_capture_result را به صورت ناهمزمان به چارچوب ارسال کند، با استفاده از فراخوانی ()process_capture_result.
تعریف در خط 2135 فایل camera3.h .
شماره فریم یک عدد صحیح افزایشی است که توسط فریم ورک برای شناسایی منحصر به فرد این تصویر تنظیم شده است. باید در فراخوانی نتیجه برگردانده شود، و همچنین برای شناسایی درخواست در اعلانهای ناهمزمان ارسال شده به camera3_callback_ops_t.notify () استفاده میشود.
تعریف در خط 2142 فایل camera3.h .
بافر جریان ورودی برای استفاده برای این درخواست، در صورت وجود.
اگر input_buffer NULL باشد، در این صورت درخواست عکسبرداری جدید از تصویرگر است. اگر input_buffer معتبر باشد، درخواست برای پردازش مجدد تصویر موجود در input_buffer است.
در حالت دوم، قبل از بازگشت ()process_capture_request، HAL باید release_fence از input_buffer را روی یک حصار همگامسازی معتبر، یا اگر HAL از sync پشتیبانی نمیکند، روی -1 تنظیم کند.
قبل از دسترسی به HAL باید روی حصار همگامسازی بافر ورودی منتظر بماند.
<= CAMERA_DEVICE_API_VERSION_3_1:
هر بافر ورودی موجود در اینجا قبل از گنجاندن آن در یک درخواست، از طریق register_stream_buffers() با HAL ثبت شده است.
>= CAMERA_DEVICE_API_VERSION_3_2:
بافرها از قبل در HAL ثبت نشده اند. درخواستهای بعدی ممکن است از بافرها استفاده مجدد کنند یا بافرهای کاملاً جدیدی ارائه کنند.
تعریف در خط 2177 فایل camera3.h .
uint32_t num_output_buffers |
تعداد بافرهای خروجی برای این درخواست ضبط. باید حداقل 1 باشد.
تعریف در خط 2183 فایل camera3.h .
آرایهای از بافرهای جریانی num_output_buffers که باید با دادههای تصویر از این ضبط/پردازش مجدد پر شود. HAL باید روی حصارهای به دست آوردن هر بافر جریان قبل از نوشتن برای آنها منتظر بماند.
HAL مالکیت ورودی های buffer_handle_t واقعی در output_buffers را در اختیار می گیرد. تا زمانی که در یک camera3_capture_result_t برگردانده نشوند، چارچوب به آنها دسترسی ندارد.
<= CAMERA_DEVICE_API_VERSION_3_1:
تمام بافرهای موجود در اینجا از طریق register_stream_buffers() قبل از گنجاندن آنها در یک درخواست، با HAL ثبت میشوند.
>= CAMERA_DEVICE_API_VERSION_3_2:
هر یک یا همه بافرهای موجود در اینجا ممکن است در این درخواست کاملاً جدید باشند (که قبلاً توسط HAL دیده نشده است).
تعریف در خط 2204 فایل camera3.h .
بافر تنظیمات حاوی پارامترهای ضبط و پردازش درخواست است. به عنوان یک مورد خاص، یک بافر تنظیمات NULL نشان می دهد که تنظیمات با درخواست ضبط اخیر ارائه شده یکسان است. بافر NULL نمی تواند به عنوان اولین درخواست ارسال شده پس از فراخوانی configure_streams () استفاده شود.
تعریف در خط 2151 فایل camera3.h .
مستندات این ساختار از فایل زیر تولید شده است:
- hardware/libhardware/include/hardware/ camera3.h
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-29 بهوقت ساعت هماهنگ جهانی."],[],[],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)"]]