A partire dal 27 marzo 2025, ti consigliamo di utilizzare android-latest-release
anziché aosp-main
per compilare e contribuire ad AOSP. Per ulteriori informazioni, vedi Modifiche ad AOSP.
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Riferimento alla struttura camera2_frame_queue_dst_ops
#include <
camera2.h
>
Protocollo della coda di output dei fotogrammi:
Il framework contiene la coda e i relativi contenuti. All'inizio la coda è vuota.
-
Quando il dispositivo è pronto a compilare un frame dei metadati di output, deve rimuovere dalla coda un buffer dei metadati delle dimensioni richieste.
-
Dovrebbe quindi riempire il buffer dei metadati e inserirlo nella coda dei frame utilizzando enqueue_frame. Il framework acquisisce la proprietà del frame.
-
In caso di errore, di una richiesta di svuotamento della pipeline o di arresto, il dispositivo deve restituire al framework gli eventuali frame dequeued interessati chiamando cancel_frame.
Definizione nella riga
263
del file
camera2.h
.
Restituire un buffer di metadati rimosso dalla coda al framework per il riutilizzo; non contrassegnarlo come compilato. Da utilizzare in caso di errori o per svuotare la coda delle richieste interna.
Definizione nella riga
278
del file
camera2.h
.
Recupera un buffer di metadati vuoto da compilare dal framework. Il nuovo buffer dei metadati avrà spazio per il numero di voci di metadati, oltre a uno spazio di archiviazione aggiuntivo pari a data_bytes. I frame dequeued qui devono essere restituiti al framework con cancel_frame o enqueue_frame.
Definizione nella riga
270
del file
camera2.h
.
Inserisci un frame dei metadati completato nella coda di output dei frame.
Definizione alla riga
284
del file
camera2.h
.
La documentazione di questa struttura è stata generata dal seguente file:
-
hardware/libhardware/include/hardware/
camera2.h
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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)"]]