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_stream_ops
#include <
camera2.h
>
Interfaccia della coda dello stream di immagini di output. Un insieme di questi metodi viene fornito al dispositivo HAL in allocate_stream() e viene utilizzato per interagire con la coda del buffer gralloc per lo stream. Non possono essere chiamati fino al ritorno di allocate_stream.
Definizione nella riga
73
del file
camera2.h
.
Restituire un buffer alla coda senza contrassegnarlo come completato.
Definizione nella riga
102
del file
camera2.h
.
Ricevi un buffer da compilare dalla coda. Le dimensioni e il formato del buffer sono fissi per un determinato stream (definito in allocate_stream) e lo stride deve essere sottoposto a query dal modulo gralloc della piattaforma. Il buffer gralloc sarà stato allocato in base ai flag di utilizzo forniti da allocate_stream e verrà bloccato per l'utilizzo.
Definizione nella riga
81
del file
camera2.h
.
int(* enqueue_buffer)(const struct
camera2_stream_ops
*w, int64_t timestamp, buffer_handle_t *buffer)
|
Invia allo stream un buffer completo da utilizzare dal consumatore.
Il timestamp rappresenta il momento di inizio dell'esposizione della prima riga dell'immagine. Deve provenire da un orologio monotono e viene misurato in nanosecondi. I timestamp non devono essere confrontabili tra fotocamere diverse o istanze consecutive della stessa fotocamera. Tuttavia, devono essere paragonabili tra gli stream della stessa videocamera. Se una cattura produce buffer per più stream, ogni stream deve avere lo stesso timestamp per quel buffer e questo timestamp deve corrispondere a quello nei metadati dei frame di output.
Definizione alla riga
96
del file
camera2.h
.
int(* set_crop)(const struct
camera2_stream_ops
*w, int left, int top, int right, int bottom)
|
Imposta la finestra di ritaglio per i buffer inseriti in coda successivamente. I parametri vengono misurati in pixel rispetto alla larghezza e all'altezza del buffer.
Definizione nella riga
108
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_stream_ops Struct Reference\n\ncamera2_stream_ops Struct Reference\n===================================\n\n[Data Fields](#pub-attribs) \ncamera2_stream_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_buffer](/reference/hal/structcamera2__stream__ops#ad51917100a74cf70e552c51e24407cbb) )(const struct [camera2_stream_ops](/reference/hal/structcamera2__stream__ops) \\*w, buffer_handle_t \\*\\*buffer) |\n| ||\n| int(\\* | [enqueue_buffer](/reference/hal/structcamera2__stream__ops#a724a4193411f3278ad9ad3f04ab983f1) )(const struct [camera2_stream_ops](/reference/hal/structcamera2__stream__ops) \\*w, int64_t timestamp, buffer_handle_t \\*buffer) |\n| ||\n| int(\\* | [cancel_buffer](/reference/hal/structcamera2__stream__ops#ae3aa87ba699c53b8960b6529eb01ba83) )(const struct [camera2_stream_ops](/reference/hal/structcamera2__stream__ops) \\*w, buffer_handle_t \\*buffer) |\n| ||\n| int(\\* | [set_crop](/reference/hal/structcamera2__stream__ops#a3c2102f917bfe992de1967f9f8abc1d6) )(const struct [camera2_stream_ops](/reference/hal/structcamera2__stream__ops) \\*w, int left, int top, int right, int bottom) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nOutput image stream queue interface. A set of these methods is provided to the HAL device in allocate_stream(), and are used to interact with the gralloc buffer queue for that stream. They may not be called until after allocate_stream returns.\n\n\nDefinition at line\n[73](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_buffer)(const struct [camera2_stream_ops](/reference/hal/structcamera2__stream__ops) \\*w, buffer_handle_t \\*buffer) |\n\n\nReturn a buffer to the queue without marking it as filled.\n\n\nDefinition at line\n[102](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_buffer)(const struct [camera2_stream_ops](/reference/hal/structcamera2__stream__ops) \\*w, buffer_handle_t \\*\\*buffer) |\n\n\nGet a buffer to fill from the queue. The size and format of the buffer are fixed for a given stream (defined in allocate_stream), and the stride should be queried from the platform gralloc module. The gralloc buffer will have been allocated based on the usage flags provided by allocate_stream, and will be locked for use.\n\n\nDefinition at line\n[81](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_buffer)(const struct [camera2_stream_ops](/reference/hal/structcamera2__stream__ops) \\*w, int64_t timestamp, buffer_handle_t \\*buffer) |\n\n\nPush a filled buffer to the stream to be used by the consumer.\n\n\nThe timestamp represents the time at start of exposure of the first row of the image; it must be from a monotonic clock, and is measured in nanoseconds. The timestamps do not need to be comparable between different cameras, or consecutive instances of the same camera. However, they must be comparable between streams from the same camera. If one capture produces buffers for multiple streams, each stream must have the same timestamp for that buffer, and that timestamp must match the timestamp in the output frame metadata.\n\n\nDefinition at line\n[96](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(\\* set_crop)(const struct [camera2_stream_ops](/reference/hal/structcamera2__stream__ops) \\*w, int left, int top, int right, int bottom) |\n\n\nSet the crop window for subsequently enqueued buffers. The parameters are measured in pixels relative to the buffer width and height.\n\n\nDefinition at line\n[108](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)"]]