27 মার্চ, 2025 থেকে, আমরা AOSP তৈরি করতে এবং অবদান রাখতে aosp-main
এর পরিবর্তে android-latest-release
ব্যবহার করার পরামর্শ দিচ্ছি। আরও তথ্যের জন্য, AOSP-তে পরিবর্তনগুলি দেখুন।
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
camera3_stream_buffer স্ট্রাকট রেফারেন্স
#include < camera3.h >
ক্যামেরা3_স্ট্রিম_বাফার_টি:
ক্যামেরা3 স্ট্রিম থেকে একটি একক বাফার। এটির মূল স্ট্রিমের একটি হ্যান্ডেল, গ্র্যালোক বাফারের হ্যান্ডেল এবং সিঙ্ক বেড়া অন্তর্ভুক্ত করে
বাফারটি ইনপুট বা আউটপুটের জন্য ব্যবহার করা হবে কিনা তা নির্দিষ্ট করে না; যেটি তার মূল স্ট্রিমের ধরন দ্বারা নির্ধারিত হয় এবং কীভাবে বাফারটি HAL ডিভাইসে প্রেরণ করা হয়।
ফাইল camera3.h এর 1755 লাইনে সংজ্ঞা।
এই বাফার জন্য সিঙ্ক বেড়া অর্জন. এই বাফার থেকে পড়ার বা লেখার চেষ্টা করার আগে HAL-কে অবশ্যই এই বেড়া fd-এ অপেক্ষা করতে হবে।
এই বাফারের জন্য কোন অপেক্ষার প্রয়োজন নেই তা নির্দেশ করার জন্য ফ্রেমওয়ার্ক -1 সেট করা হতে পারে।
HAL যখন process_capture_result() দিয়ে ফ্রেমওয়ার্কে একটি আউটপুট বাফার ফেরত দেয়, তখন acquire_fence অবশ্যই -1 সেট করতে হবে। যদি HAL কখনই acquire_fence-এর জন্য অপেক্ষা না করে একটি বাফার পূরণের ত্রুটির কারণে, process_capture_result() কল করার সময় HAL-কে অবশ্যই বাফারের মুক্তি_ফেন সেট করতে হবে যাতে ফ্রেমওয়ার্ক দ্বারা এটিকে পাস করা acquire_fence হতে পারে। এটি বাফার পুনরায় ব্যবহার করার আগে ফ্রেমওয়ার্কটিকে বেড়ার উপর অপেক্ষা করার অনুমতি দেবে।
ইনপুট বাফারের জন্য, HAL অবশ্যই process_capture_request() কলের সময় acquire_fence ক্ষেত্র পরিবর্তন করবে না।
>= CAMERA_DEVICE_API_VERSION_3_2:
HAL যখন process_capture_result() দিয়ে ফ্রেমওয়ার্কে একটি ইনপুট বাফার ফেরত দেয়, তখন acquire_fence অবশ্যই -1 সেট করতে হবে। যদি HAL কখনও একটি ত্রুটির কারণে ইনপুট বাফার অর্জনের বেড়ার জন্য অপেক্ষা না করে, তবে সিঙ্ক বেড়াগুলিকে আউটপুট বাফারগুলির জন্য যেভাবে পরিচালনা করা হয় একইভাবে পরিচালনা করা উচিত।
ফাইল camera3.h এর 1800 লাইনে সংজ্ঞা।
এই বাফারের জন্য রিলিজ সিঙ্ক বেড়া। ফ্রেমওয়ার্কে বাফার ফেরত দেওয়ার সময় HAL-কে অবশ্যই এই বেড়া সেট করতে হবে, অথবা এই বাফারের জন্য কোন অপেক্ষার প্রয়োজন নেই তা নির্দেশ করতে -1 লিখতে হবে।
আউটপুট বাফারগুলির জন্য, বেড়াগুলিকে অবশ্যই প্রসেস_ক্যাপচার_রেজাল্ট() এ পাস করা output_buffers অ্যারেতে সেট করতে হবে।
<= CAMERA_DEVICE_API_VERSION_3_1:
ইনপুট বাফারের জন্য, প্রসেস_ক্যাপচার_রিকোয়েস্ট() কলের মাধ্যমে রিলিজের বেড়া সেট করতে হবে।
>= CAMERA_DEVICE_API_VERSION_3_2:
ইনপুট বাফারের জন্য, বেড়াগুলি অবশ্যই প্রক্রিয়া_ক্যাপচার_রেজাল্ট() এ পাস করা ইনপুট_বাফারে সেট করতে হবে।
এই বাফারের জন্য release_fence সংকেত দেওয়ার পরে, HAL-এর এই বাফার অ্যাক্সেস করার জন্য আর কোনো প্রচেষ্টা করা উচিত নয় কারণ মালিকানা সম্পূর্ণরূপে ফ্রেমওয়ার্কে হস্তান্তর করা হয়েছে।
যদি -1-এর একটি বেড়া নির্দিষ্ট করা হয় তবে প্রক্রিয়া_ক্যাপচার_রজাল্টের কলের সাথে সাথেই এই বাফারটির মালিকানা হস্তান্তর করা হয়।
ফাইল camera3.h এর 1827 লাইনে সংজ্ঞা।
বাফারের বর্তমান অবস্থা, camera3_buffer_status_t মানগুলির মধ্যে একটি৷ ফ্রেমওয়ার্কটি HAL-এর কাছে বাফার পাঠাবে না যেগুলি একটি ত্রুটির অবস্থায় রয়েছে। HAL দ্বারা একটি বাফার পূরণ করা না গেলে, প্রক্রিয়া_ক্যাপচার_রেজাল্ট() এর সাথে ফ্রেমওয়ার্কে ফিরে আসার সময় এটির স্থিতি CAMERA3_BUFFER_STATUS_ERROR এ সেট করা আবশ্যক।
ফাইল camera3.h এর 1773 লাইনে সংজ্ঞা।
এই বাফারটির সাথে যুক্ত স্ট্রিমটির হ্যান্ডেল৷
ফাইল camera3.h এর 1759 লাইনে সংজ্ঞা।
এই কাঠামোর জন্য ডকুমেন্টেশন নিম্নলিখিত ফাইল থেকে তৈরি করা হয়েছিল:
- hardware/libhardware/include/hardware/ camera3.h
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 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-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Android Hardware Abstraction Layer: camera3_stream_buffer Struct Reference\n\ncamera3_stream_buffer Struct Reference\n======================================\n\n[Data Fields](#pub-attribs) \ncamera3_stream_buffer 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| [camera3_stream_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h) \\* | [stream](/reference/hal/structcamera3__stream__buffer#afaf6c85f165b4180fe63affae0232dad) |\n| ||\n| buffer_handle_t \\* | [buffer](/reference/hal/structcamera3__stream__buffer#ab87cddef201db642e7972d124d741dc2) |\n| ||\n| int | [status](/reference/hal/structcamera3__stream__buffer#a6e27f49150e9a14580fb313cc2777e00) |\n| ||\n| int | [acquire_fence](/reference/hal/structcamera3__stream__buffer#a5d59e0770b54af97a9fe151da5688719) |\n| ||\n| int | [release_fence](/reference/hal/structcamera3__stream__buffer#a248e5f7856e4c2877715fc9fda8d8ba8) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\ncamera3_stream_buffer_t:\n\n\nA single buffer from a camera3 stream. It includes a handle to its parent stream, the handle to the gralloc buffer itself, and sync fences\n\n\nThe buffer does not specify whether it is to be used for input or output; that is determined by its parent stream type and how the buffer is passed to the HAL device.\n\n\nDefinition at line\n[1755](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| int acquire_fence |\n\n\nThe acquire sync fence for this buffer. The HAL must wait on this fence fd before attempting to read from or write to this buffer.\n\n\nThe framework may be set to -1 to indicate that no waiting is necessary for this buffer.\n\n\nWhen the HAL returns an output buffer to the framework with process_capture_result(), the acquire_fence must be set to -1. If the HAL never waits on the acquire_fence due to an error in filling a buffer, when calling process_capture_result() the HAL must set the release_fence of the buffer to be the acquire_fence passed to it by the framework. This will allow the framework to wait on the fence before reusing the buffer.\n\n\nFor input buffers, the HAL must not change the acquire_fence field during the process_capture_request() call.\n\n\n\\\u003e= CAMERA_DEVICE_API_VERSION_3_2:\n\n\nWhen the HAL returns an input buffer to the framework with process_capture_result(), the acquire_fence must be set to -1. If the HAL never waits on input buffer acquire fence due to an error, the sync fences should be handled similarly to the way they are handled for output buffers.\n\n\nDefinition at line\n[1800](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| buffer_handle_t\\* buffer |\n\n\nThe native handle to the buffer\n\n\nDefinition at line\n[1764](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| int release_fence |\n\n\nThe release sync fence for this buffer. The HAL must set this fence when returning buffers to the framework, or write -1 to indicate that no waiting is required for this buffer.\n\n\nFor the output buffers, the fences must be set in the output_buffers array passed to process_capture_result().\n\n\n\\\u003c= CAMERA_DEVICE_API_VERSION_3_1:\n\n\nFor the input buffer, the release fence must be set by the process_capture_request() call.\n\n\n\\\u003e= CAMERA_DEVICE_API_VERSION_3_2:\n\n\nFor the input buffer, the fences must be set in the input_buffer passed to process_capture_result().\n\n\nAfter signaling the release_fence for this buffer, the HAL should not make any further attempts to access this buffer as the ownership has been fully transferred back to the framework.\n\n\nIf a fence of -1 was specified then the ownership of this buffer is transferred back immediately upon the call of process_capture_result.\n\n\nDefinition at line\n[1827](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| int status |\n\n\nCurrent state of the buffer, one of the camera3_buffer_status_t values. The framework will not pass buffers to the HAL that are in an error state. In case a buffer could not be filled by the HAL, it must have its status set to CAMERA3_BUFFER_STATUS_ERROR when returned to the framework with process_capture_result().\n\n\nDefinition at line\n[1773](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_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h) \\* stream |\n\n\nThe handle of the stream this buffer is associated with\n\n\nDefinition at line\n[1759](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)"]]