החל מ-27 במרץ 2025, מומלץ להשתמש ב-android-latest-release
במקום ב-aosp-main
כדי ליצור תרומות ל-AOSP. מידע נוסף זמין במאמר שינויים ב-AOSP.
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מידע על המבנה camera2_frame_queue_dst_ops
#include <
camera2.h
>
פרוטוקול של תור פלט של פריימים:
המסגרת מכילה את התור ואת התוכן שלו. בהתחלה, התור ריק.
-
כשהמכשיר מוכן למלא מסגרת של מטא-נתונים של פלט, הוא צריך להסיר מהתור מאגר מטא-נתונים בגודל הנדרש.
-
לאחר מכן, הוא צריך למלא את מאגר המטא-נתונים ולהוסיף אותו לתור המסגרות באמצעות enqueue_frame. ה-framework מקבל בעלות על המסגרת.
-
במקרה של שגיאה, בקשה לריקון צינור עיבוד הנתונים או השבתה, המכשיר צריך להחזיר למסגרת את כל התמונות שהוסר מהן הסטטוס 'בתור' שהושפעו מהאירוע, על ידי קריאה ל-cancel_frame.
ההגדרה מופיעה בשורה
263
בקובץ
camera2.h
.
החזרת מאגר מטא-נתונים שהוצא מהתור למסגרת לשימוש חוזר. אין לסמן אותו כמאגר מלא. משתמשים באפשרות הזו כשנתקלים בשגיאות או כשמנקים את תור הבקשות הפנימי.
ההגדרה מופיעה בשורה
278
בקובץ
camera2.h
.
אחזור מאגר מטא-נתונים ריק שאפשר למלא מהמסגרת. במאגר המטא-נתונים החדש יהיה מקום לכמות entries של רשומות מטא-נתונים, ועוד נפח אחסון בשווי data_bytes. פריימים שהוסר מהתור כאן צריכים להוחזר למסגרת באמצעות cancel_frame או enqueue_frame.
ההגדרה מופיעה בשורה
270
בקובץ
camera2.h
.
הצבת מסגרת מטא-נתונים שהושלמו בתור הפלט של המסגרות.
ההגדרה מופיעה בשורה
284
בקובץ
camera2.h
.
התיעוד של המבנה הזה נוצר מהקובץ הבא:
-
hardware/libhardware/include/hardware/
camera2.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: 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)"]]