自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
camera2_frame_queue_dst_ops 結構體參考資料
#include <
camera2.h
>
影格輸出佇列通訊協定:
此架構會保留佇列及其內容。在開始時,佇列為空。
-
當裝置準備好填入輸出中繼資料影格時,必須從佇列中取出中繼資料緩衝區,並確保其大小符合要求。
-
接著,它應填入中繼資料緩衝區,並使用 enqueue_frame 將其放入影格佇列。架構會取得影格擁有權。
-
如果發生錯誤、要求清除管道或關閉,裝置必須透過呼叫 cancel_frame 將任何受影響的已從佇列中移除的影格傳回至架構。
定義位於檔案
camera2.h
的第
263
行。
將已從佇列中移除的中繼資料緩衝區傳回至架構,以便重複使用;請勿將其標示為已填滿。遇到錯誤或清除內部要求佇列時使用。
定義位於檔案
camera2.h
的
278
行。
取得要從架構填入的空白中繼資料緩衝區。新的中繼資料緩衝區將有足夠空間容納項目數量的中繼資料項目,以及 data_bytes 的額外儲存空間。在此處從佇列中移除的影格,必須透過 cancel_frame 或 enqueue_frame 傳回至架構。
定義位於檔案
camera2.h
的
270
行。
這個結構體的說明文件是由下列檔案產生:
-
hardware/libhardware/include/hardware/
camera2.h
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","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 (世界標準時間)。"],[],[],null,["# Android Hardware Abstraction Layer: camera2_frame_queue_dst_ops Struct Reference\n\ncamera2_frame_queue_dst_ops Struct Reference\n============================================\n\n[Data Fields](#pub-attribs) \ncamera2_frame_queue_dst_ops 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| int(\\* | [dequeue_frame](/reference/hal/structcamera2__frame__queue__dst__ops#a878d3091ff5be219e3812242928a28ea) )(const struct [camera2_frame_queue_dst_ops](/reference/hal/structcamera2__frame__queue__dst__ops) \\*q, size_t entries, size_t data_bytes, [camera_metadata_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h) \\*\\*buffer) |\n| ||\n| int(\\* | [cancel_frame](/reference/hal/structcamera2__frame__queue__dst__ops#a742d35d2b70e74c60e430ca9b08ae7b4) )(const struct [camera2_frame_queue_dst_ops](/reference/hal/structcamera2__frame__queue__dst__ops) \\*q, [camera_metadata_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h) \\*buffer) |\n| ||\n| int(\\* | [enqueue_frame](/reference/hal/structcamera2__frame__queue__dst__ops#a75baa7e999cc35f9908638c582833fc2) )(const struct [camera2_frame_queue_dst_ops](/reference/hal/structcamera2__frame__queue__dst__ops) \\*q, [camera_metadata_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h) \\*buffer) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nFrame output queue protocol:\n\n\nThe framework holds the queue and its contents. At start, the queue is empty.\n\n1. When the device is ready to fill an output metadata frame, it must dequeue a metadata buffer of the required size.\n2. It should then fill the metadata buffer, and place it on the frame queue using enqueue_frame. The framework takes ownership of the frame.\n3. In case of an error, a request to flush the pipeline, or shutdown, the device must return any affected dequeued frames to the framework by calling cancel_frame.\n\n\nDefinition at line\n[263](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| int(\\* cancel_frame)(const struct [camera2_frame_queue_dst_ops](/reference/hal/structcamera2__frame__queue__dst__ops) \\*q, [camera_metadata_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h) \\*buffer) |\n\n\nReturn a dequeued metadata buffer to the framework for reuse; do not mark it as filled. Use when encountering errors, or flushing the internal request queue.\n\n\nDefinition at line\n[278](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| int(\\* dequeue_frame)(const struct [camera2_frame_queue_dst_ops](/reference/hal/structcamera2__frame__queue__dst__ops) \\*q, size_t entries, size_t data_bytes, [camera_metadata_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h) \\*\\*buffer) |\n\n\nGet an empty metadata buffer to fill from the framework. The new metadata buffer will have room for entries number of metadata entries, plus data_bytes worth of extra storage. Frames dequeued here must be returned to the framework with either cancel_frame or enqueue_frame.\n\n\nDefinition at line\n[270](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| int(\\* enqueue_frame)(const struct [camera2_frame_queue_dst_ops](/reference/hal/structcamera2__frame__queue__dst__ops) \\*q, [camera_metadata_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h) \\*buffer) |\n\n\nPlace a completed metadata frame on the frame output queue.\n\n\nDefinition at line\n[284](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)"]]