27 Mart 2025'ten itibaren AOSP'yi derlemek ve AOSP'ye katkıda bulunmak için aosp-main
yerine android-latest-release
kullanmanızı öneririz. Daha fazla bilgi için AOSP'de yapılan değişiklikler başlıklı makaleyi inceleyin.
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
camera2_request_queue_src_ops Yapı Referansı
#include <
camera2.h
>
Giriş sırası protokolü isteğinde bulunun:
Çerçeve, sırayı ve içeriğini tutar. Başlangıçta sıra boştur.
-
İlk meta veri arabelleği sıraya yerleştirildiğinde çerçeve, notify_request_queue_not_empty() işlevini çağırarak cihaza sinyal gönderir.
-
notify_request_queue_not_empty aldıktan sonra cihaz, bir sonraki arabelleği işlemeye hazır olduğunda dequeue() işlevini çağırmalıdır.
-
Cihaz bir arabelleği işledikten ve bir sonraki arabelleğe hazır olduktan sonra bildirim beklemek yerine dequeue() işlevini tekrar çağırmalıdır. Kullanılabilir başka arabelleğe sahip değilseniz dequeue() işlevi NULL değerini döndürür. Bu noktadan sonra, bir arabellek kullanılabilir hale geldiğinde çerçevenin notify_request_queue_not_empty() işlevini tekrar çağırması gerekir. Cihaz, dequeue işlevinden NULL döndürürse kaynaktan notify_request_queue_not_empty() çağrısı alınana kadar kuyruğu tekrar sorgulamasına gerek yoktur.
-
Cihaz, buffer_count() işlevini çağırır ve 0 değerini alırsa bu, çerçevenin notify_request_queue_not_empty() çağrısı sağlayacağı anlamına gelmez. Çerçeve yalnızca cihaz, sırayı kaldırma işleminden NULL aldıktan sonra veya ilk başlatmada böyle bir bildirim sağlar.
-
notify_request_queue_not_empty() çağrısına yanıt olarak gelen dequeue() çağrısı, notify_request_queue_not_empty() çağrısıyla aynı ileti dizisinde olabilir ve notify çağrısı içinden gerçekleştirilebilir.
-
Hata oluştuğunda, cihazın temizlenmesi istendiğinde veya cihaz kapanırken denetleme listesinden çıkarılan tüm istek arabellekleri, free_request çağrısı yapılarak çerçeveye döndürülmelidir.
Tanımı,
camera2.h
dosyasının
220
satırı
Çerçeveden bir meta veri arabelleği alın. Hata yoksa OK değerini döndürür. Sıra boşsa arabellekte NULL döndürülür. Bu durumda cihaz, sırayı tekrar kaldırmayı denemeden önce notify_request_queue_not_empty() mesajını beklemelidir. Bu şekilde elde edilen arabellekler,
free_request()
ile çerçeveye döndürülmelidir.
Tanımı,
camera2.h
dosyasının
237
satırı
Meta veri arabelleğini kullanıldıktan sonra veya hata ya da kapatma durumunda çerçeveye döndürme.
Tanımı,
camera2.h
dosyasının
243
satırndandır.
Kuyruğa alınan istek arabelleklerinin sayısını alın. Şu anda tekrarlanan bir istek (akış isteği) yapılandırılmışsa CAMERA2_REQUEST_QUEUE_IS_BOTTOMLESS değerini döndürebilir. Bu yöntemin çağrılmasının, notify_request_queue_not_empty() yönteminin çerçeve tarafından çağrılıp çağrılmayacağı üzerinde hiçbir etkisi yoktur.
Tanımı,
camera2.h
dosyasının
228. satırı
içindedir.
Bu yapının dokümanları aşağıdaki dosyadan oluşturulmuştur:
-
hardware/libhardware/include/hardware/
camera2.h
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],null,["# Android Hardware Abstraction Layer: camera2_request_queue_src_ops Struct Reference\n\ncamera2_request_queue_src_ops Struct Reference\n==============================================\n\n[Data Fields](#pub-attribs) \ncamera2_request_queue_src_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(\\* | [request_count](/reference/hal/structcamera2__request__queue__src__ops#a19ec09251038ee392fedcaeb68ede229) )(const struct [camera2_request_queue_src_ops](/reference/hal/structcamera2__request__queue__src__ops) \\*q) |\n| ||\n| int(\\* | [dequeue_request](/reference/hal/structcamera2__request__queue__src__ops#a79adee987dbd6a8ea0cfab81c89ae579) )(const struct [camera2_request_queue_src_ops](/reference/hal/structcamera2__request__queue__src__ops) \\*q, [camera_metadata_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h) \\*\\*buffer) |\n| ||\n| int(\\* | [free_request](/reference/hal/structcamera2__request__queue__src__ops#aa45ae2fd2aedf1843378e213e65a66f8) )(const struct [camera2_request_queue_src_ops](/reference/hal/structcamera2__request__queue__src__ops) \\*q, [camera_metadata_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h) \\*old_buffer) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nRequest input queue protocol:\n\n\nThe framework holds the queue and its contents. At start, the queue is empty.\n\n1. When the first metadata buffer is placed into the queue, the framework signals the device by calling notify_request_queue_not_empty().\n2. After receiving notify_request_queue_not_empty, the device must call dequeue() once it's ready to handle the next buffer.\n3. Once the device has processed a buffer, and is ready for the next buffer, it must call dequeue() again instead of waiting for a notification. If there are no more buffers available, dequeue() will return NULL. After this point, when a buffer becomes available, the framework must call notify_request_queue_not_empty() again. If the device receives a NULL return from dequeue, it does not need to query the queue again until a notify_request_queue_not_empty() call is received from the source.\n4. If the device calls buffer_count() and receives 0, this does not mean that the framework will provide a notify_request_queue_not_empty() call. The framework will only provide such a notification after the device has received a NULL from dequeue, or on initial startup.\n5. The dequeue() call in response to notify_request_queue_not_empty() may be on the same thread as the notify_request_queue_not_empty() call, and may be performed from within the notify call.\n6. All dequeued request buffers must be returned to the framework by calling free_request, including when errors occur, a device flush is requested, or when the device is shutting down.\n\n\nDefinition at line\n[220](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(\\* dequeue_request)(const struct [camera2_request_queue_src_ops](/reference/hal/structcamera2__request__queue__src__ops) \\*q, [camera_metadata_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h) \\*\\*buffer) |\n\n\nGet a metadata buffer from the framework. Returns OK if there is no error. If the queue is empty, returns NULL in buffer. In that case, the device must wait for a notify_request_queue_not_empty() message before attempting to dequeue again. Buffers obtained in this way must be returned to the framework with\n[free_request()](/reference/hal/structcamera2__request__queue__src__ops#aa45ae2fd2aedf1843378e213e65a66f8)\n.\n\n\nDefinition at line\n[237](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(\\* free_request)(const struct [camera2_request_queue_src_ops](/reference/hal/structcamera2__request__queue__src__ops) \\*q, [camera_metadata_t](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h) \\*old_buffer) |\n\n\nReturn a metadata buffer to the framework once it has been used, or if an error or shutdown occurs.\n\n\nDefinition at line\n[243](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(\\* request_count)(const struct [camera2_request_queue_src_ops](/reference/hal/structcamera2__request__queue__src__ops) \\*q) |\n\n\nGet the count of request buffers pending in the queue. May return CAMERA2_REQUEST_QUEUE_IS_BOTTOMLESS if a repeating request (stream request) is currently configured. Calling this method has no effect on whether the notify_request_queue_not_empty() method will be called by the framework.\n\n\nDefinition at line\n[228](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)"]]