27 মার্চ, 2025 থেকে, আমরা AOSP তৈরি করতে এবং অবদান রাখতে aosp-main
এর পরিবর্তে android-latest-release
ব্যবহার করার পরামর্শ দিচ্ছি। আরও তথ্যের জন্য, AOSP-তে পরিবর্তনগুলি দেখুন।
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
camera3_callback_ops স্ট্রাকট রেফারেন্স
#include < camera3.h >
ফাইল camera3.h এর 2397 লাইনে সংজ্ঞা।
অবহিত:
HAL থেকে অ্যাসিঙ্ক্রোনাস নোটিফিকেশন কলব্যাক, বিভিন্ন কারণে বহিস্কার করা হয়েছে। শুধুমাত্র ফ্রেম ক্যাপচার থেকে মুক্ত তথ্যের জন্য, অথবা যার জন্য নির্দিষ্ট সময় প্রয়োজন। মেসেজ স্ট্রাকচারের মালিকানা এইচএএল-এর কাছে থেকে যায়, এবং বার্তাটি শুধুমাত্র এই কলের সময়কালের জন্য বৈধ হতে হবে।
একাধিক থ্রেড একই সাথে notify() কে কল করতে পারে।
<= CAMERA_DEVICE_API_VERSION_3_1:
একটি প্রদত্ত অনুরোধের জন্য এক্সপোজার শুরুর বিজ্ঞপ্তি HAL দ্বারা প্রেরণ করা আবশ্যক সেই অনুরোধের জন্য process_capture_result() এ প্রথম কল করার আগে।
>= CAMERA_DEVICE_API_VERSION_3_2:
একটি SHUTTER notify() কলের মাধ্যমে এক্সপোজার টাইমস্ট্যাম্প (অথবা পুনঃপ্রক্রিয়ার অনুরোধের জন্য ইনপুট চিত্রের এক্সপোজার টাইমস্ট্যাম্পের শুরু) শুরু না হওয়া পর্যন্ত ফ্রেমওয়ার্কে বিতরণ করা বাফারগুলিকে অ্যাপ্লিকেশন স্তরে প্রেরণ করা হবে না৷ এই কলটি যত তাড়াতাড়ি সম্ভব পাঠানোর জন্য অত্যন্ত সুপারিশ করা হয়।
কর্মক্ষমতা প্রয়োজনীয়তা:
এটি একটি নন-ব্লকিং কল। ফ্রেমওয়ার্ক এই কলটি 5ms এ ফেরত দেবে।
ফাইল camera3.h এর লাইন 2499 এ সংজ্ঞা।
প্রক্রিয়া_ক্যাপচার_ফলাফল:
একটি সম্পূর্ণ ক্যাপচার থেকে ফ্রেমওয়ার্কে ফলাফল পাঠান। process_capture_result() একটি একক ক্যাপচার অনুরোধের প্রতিক্রিয়া হিসাবে HAL দ্বারা একাধিকবার আহ্বান করা হতে পারে। এটি, উদাহরণস্বরূপ, মেটাডেটা এবং কম-রেজোলিউশন বাফারগুলিকে একটি কলে ফেরত দেওয়ার অনুমতি দেয় এবং এটি উপলব্ধ হলে পরবর্তী কলে পোস্ট-প্রসেসড JPEG বাফারগুলি। প্রতিটি কলে অবশ্যই সেই অনুরোধের ফ্রেম নম্বর অন্তর্ভুক্ত করতে হবে যার জন্য এটি মেটাডেটা বা বাফার ফেরত দিচ্ছে৷
সম্পূর্ণ ফলাফলের একটি উপাদান (বাফার বা মেটাডেটা) শুধুমাত্র একটি process_capture_result কলে অন্তর্ভুক্ত করা যেতে পারে। প্রতিটি স্ট্রীমের জন্য একটি বাফার, এবং ফলাফলের মেটাডেটা, প্রতিটি অনুরোধের জন্য HAL দ্বারা অবশ্যই প্রসেস_ক্যাপচার_রিসাল্ট কলগুলির একটিতে ফেরত দিতে হবে, এমনকি কিছু আউটপুট তৈরিতে ত্রুটির ক্ষেত্রেও। কোনো আউটপুট বাফার বা ফলাফল মেটাডেটা সহ process_capture_result()- এ একটি কল অনুমোদিত নয়।
একটি একক ফলাফলের জন্য মেটাডেটা এবং বাফার ফেরত দেওয়ার ক্রম কোন ব্যাপার নয়, তবে একটি প্রদত্ত স্ট্রিমের জন্য বাফারগুলি অবশ্যই FIFO ক্রমে ফেরত দিতে হবে৷ তাই স্ট্রীম A-এর জন্য অনুরোধ 5-এর বাফারটি অবশ্যই স্ট্রিম A-এর জন্য অনুরোধ 6-এর বাফারের আগে অবশ্যই ফেরত দিতে হবে। এটি ফলাফলের মেটাডেটার ক্ষেত্রেও প্রযোজ্য; অনুরোধ 5-এর মেটাডেটা অবশ্যই রিকোয়েস্ট 6-এর মেটাডেটার আগে ফেরত দিতে হবে।
যাইহোক, বিভিন্ন স্ট্রীম একে অপরের থেকে স্বতন্ত্র, তাই এটি গ্রহণযোগ্য এবং প্রত্যাশিত যে স্ট্রীম A-এর জন্য অনুরোধ 5-এর বাফারটি B স্ট্রীমের জন্য অনুরোধ 6-এর বাফারের পরে ফেরত দেওয়া হতে পারে। এবং এটি গ্রহণযোগ্য যে স্ট্রীম B-এর জন্য অনুরোধ 6-এর ফলাফলের মেটাডেটা স্ট্রীম A-এর জন্য অনুরোধ 5-এর বাফারের আগে ফেরত দেওয়া হয়।
HAL ফলাফল কাঠামোর মালিকানা ধরে রাখে, যা শুধুমাত্র এই কলের সময় অ্যাক্সেস করার জন্য বৈধ হতে হবে। এই কল রিটার্ন করার আগে ফ্রেমওয়ার্ক যা প্রয়োজন তা কপি করবে।
আউটপুট বাফারগুলি এখনও পূরণ করার প্রয়োজন নেই; ফ্রেমওয়ার্ক বাফার ডেটা পড়ার আগে স্ট্রীম বাফার রিলিজ সিঙ্ক বেড়াতে অপেক্ষা করবে। তাই, এই পদ্ধতিটি যত তাড়াতাড়ি সম্ভব HAL দ্বারা ডাকা উচিত, এমনকি যদি কিছু বা সমস্ত আউটপুট বাফার এখনও পূরণ করা হয়। প্রতিটি আউটপুট_বাফার স্ট্রিম বাফার এন্ট্রিতে HAL-কে অবশ্যই বৈধ রিলিজ সিঙ্ক বেড়া অন্তর্ভুক্ত করতে হবে, অথবা যদি সেই স্ট্রিম বাফারটি ইতিমধ্যেই পূর্ণ হয়ে থাকে তাহলে -1।
যদি অনুরোধের জন্য ফলাফলের বাফার তৈরি করা না যায়, তাহলে HAL-এর উচিত একটি খালি মেটাডেটা বাফার ফেরত দেওয়া, কিন্তু তারপরও আউটপুট বাফার এবং তাদের সিঙ্ক বেড়া প্রদান করা। উপরন্তু, notify() একটি ERROR_RESULT বার্তা সহ কল করতে হবে।
যদি একটি আউটপুট বাফার পূরণ করা না যায়, তবে এর স্থিতি ক্ষেত্রটি STATUS_ERROR এ সেট করা আবশ্যক৷ উপরন্তু, notify() একটি ERROR_BUFFER বার্তা সহ কল করতে হবে।
যদি সম্পূর্ণ ক্যাপচার ব্যর্থ হয়, তবে আউটপুট বাফারগুলিকে ফ্রেমওয়ার্কে ফিরিয়ে দেওয়ার জন্য এই পদ্ধতিটি এখনও কল করা দরকার। সমস্ত বাফার স্থিতি STATUS_ERROR হওয়া উচিত এবং ফলাফলের মেটাডেটা একটি খালি বাফার হওয়া উচিত৷ উপরন্তু, notify() কে একটি ERROR_REQUEST বার্তা সহ কল করতে হবে। এই ক্ষেত্রে, পৃথক ERROR_RESULT/ERROR_BUFFER বার্তা পাঠানো উচিত নয়৷
কর্মক্ষমতা প্রয়োজনীয়তা:
এটি একটি নন-ব্লকিং কল। ফ্রেমওয়ার্ক এই কলটি 5ms এ ফেরত দেবে।
পাইপলাইনের লেটেন্সি (সংজ্ঞার জন্য S7 দেখুন) 4 ফ্রেমের ব্যবধানের কম বা সমান হওয়া উচিত এবং অবশ্যই 8 ফ্রেমের ব্যবধানের কম বা সমান হতে হবে।
ফাইল camera3.h এর লাইন 2466 এ সংজ্ঞা।
এই কাঠামোর জন্য ডকুমেন্টেশন নিম্নলিখিত ফাইল থেকে তৈরি করা হয়েছিল:
- 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_callback_ops Struct Reference\n\ncamera3_callback_ops Struct Reference\n=====================================\n\n[Data Fields](#pub-attribs) \ncamera3_callback_ops 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| void(\\* | [process_capture_result](/reference/hal/structcamera3__callback__ops#a2f7cf688a195532999b8498d6ef15e45) )(const struct [camera3_callback_ops](/reference/hal/structcamera3__callback__ops) \\*, const [camera3_capture_result_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h) \\*result) |\n| ||\n| void(\\* | [notify](/reference/hal/structcamera3__callback__ops#a6d702d6e962f95105b984b17462619b3) )(const struct [camera3_callback_ops](/reference/hal/structcamera3__callback__ops) \\*, const [camera3_notify_msg_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h) \\*msg) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nDefinition at line\n[2397](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| void(\\* notify)(const struct [camera3_callback_ops](/reference/hal/structcamera3__callback__ops) \\*, const [camera3_notify_msg_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h) \\*msg) |\n\n\nnotify:\n\n\nAsynchronous notification callback from the HAL, fired for various reasons. Only for information independent of frame capture, or that require specific timing. The ownership of the message structure remains with the HAL, and the msg only needs to be valid for the duration of this call.\n\n\nMultiple threads may call\n[notify()](/reference/hal/structcamera3__callback__ops#a6d702d6e962f95105b984b17462619b3)\nsimultaneously.\n\n\n\\\u003c= CAMERA_DEVICE_API_VERSION_3_1:\n\n\nThe notification for the start of exposure for a given request must be sent by the HAL before the first call to\n[process_capture_result()](/reference/hal/structcamera3__callback__ops#a2f7cf688a195532999b8498d6ef15e45)\nfor that request is made.\n\n\n\\\u003e= CAMERA_DEVICE_API_VERSION_3_2:\n\n\nBuffers delivered to the framework will not be dispatched to the application layer until a start of exposure timestamp (or input image's start of exposure timestamp for a reprocess request) has been received via a SHUTTER\n[notify()](/reference/hal/structcamera3__callback__ops#a6d702d6e962f95105b984b17462619b3)\ncall. It is highly recommended to dispatch this call as early as possible.\n\n*** ** * ** ***\n\n\nPerformance requirements:\n\n\nThis is a non-blocking call. The framework will return this call in 5ms.\n\n\nDefinition at line\n[2499](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| void(\\* process_capture_result)(const struct [camera3_callback_ops](/reference/hal/structcamera3__callback__ops) \\*, const [camera3_capture_result_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera3.h) \\*result) |\n\n\nprocess_capture_result:\n\n\nSend results from a completed capture to the framework.\n[process_capture_result()](/reference/hal/structcamera3__callback__ops#a2f7cf688a195532999b8498d6ef15e45)\nmay be invoked multiple times by the HAL in response to a single capture request. This allows, for example, the metadata and low-resolution buffers to be returned in one call, and post-processed JPEG buffers in a later call, once it is available. Each call must include the frame number of the request it is returning metadata or buffers for.\n\n\nA component (buffer or metadata) of the complete result may only be included in one process_capture_result call. A buffer for each stream, and the result metadata, must be returned by the HAL for each request in one of the process_capture_result calls, even in case of errors producing some of the output. A call to\n[process_capture_result()](/reference/hal/structcamera3__callback__ops#a2f7cf688a195532999b8498d6ef15e45)\nwith neither output buffers or result metadata is not allowed.\n\n\nThe order of returning metadata and buffers for a single result does not matter, but buffers for a given stream must be returned in FIFO order. So the buffer for request 5 for stream A must always be returned before the buffer for request 6 for stream A. This also applies to the result metadata; the metadata for request 5 must be returned before the metadata for request 6.\n\n\nHowever, different streams are independent of each other, so it is acceptable and expected that the buffer for request 5 for stream A may be returned after the buffer for request 6 for stream B is. And it is acceptable that the result metadata for request 6 for stream B is returned before the buffer for request 5 for stream A is.\n\n\nThe HAL retains ownership of result structure, which only needs to be valid to access during this call. The framework will copy whatever it needs before this call returns.\n\n\nThe output buffers do not need to be filled yet; the framework will wait on the stream buffer release sync fence before reading the buffer data. Therefore, this method should be called by the HAL as soon as possible, even if some or all of the output buffers are still in being filled. The HAL must include valid release sync fences into each output_buffers stream buffer entry, or -1 if that stream buffer is already filled.\n\n\nIf the result buffer cannot be constructed for a request, the HAL should return an empty metadata buffer, but still provide the output buffers and their sync fences. In addition,\n[notify()](/reference/hal/structcamera3__callback__ops#a6d702d6e962f95105b984b17462619b3)\nmust be called with an ERROR_RESULT message.\n\n\nIf an output buffer cannot be filled, its status field must be set to STATUS_ERROR. In addition,\n[notify()](/reference/hal/structcamera3__callback__ops#a6d702d6e962f95105b984b17462619b3)\nmust be called with a ERROR_BUFFER message.\n\n\nIf the entire capture has failed, then this method still needs to be called to return the output buffers to the framework. All the buffer statuses should be STATUS_ERROR, and the result metadata should be an empty buffer. In addition,\n[notify()](/reference/hal/structcamera3__callback__ops#a6d702d6e962f95105b984b17462619b3)\nmust be called with a ERROR_REQUEST message. In this case, individual ERROR_RESULT/ERROR_BUFFER messages should not be sent.\n\n\nPerformance requirements:\n\n\nThis is a non-blocking call. The framework will return this call in 5ms.\n\n\nThe pipeline latency (see S7 for definition) should be less than or equal to 4 frame intervals, and must be less than or equal to 8 frame intervals.\n\n\nDefinition at line\n[2466](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)"]]