2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
camera2_stream_ops 구조체 참조
#include <
camera2.h
>
출력 이미지 스트림 대기열 인터페이스입니다. 이러한 메서드 세트는 allocate_stream()에서 HAL 기기에 제공되며 해당 스트림의 gralloc 버퍼 대기열과 상호작용하는 데 사용됩니다. allocate_stream이 반환될 때까지 호출되지 않을 수 있습니다.
camera2.h
파일의
73
번 행에 정의되어 있습니다.
버퍼를 채워진 것으로 표시하지 않고 대기열에 반환합니다.
camera2.h
파일의
102
행에 정의되어 있습니다.
대기열에서 채울 버퍼를 가져옵니다. 버퍼의 크기와 형식은 특정 스트림 (allocate_stream에 정의됨)에 대해 고정되며, 스트라이드는 플랫폼 gralloc 모듈에서 쿼리해야 합니다. gralloc 버퍼는 allocate_stream에서 제공한 사용 플래그를 기반으로 할당되며 사용하기 위해 잠깁니다.
camera2.h
파일의
81
번 줄에 정의되어 있습니다.
int(* enqueue_buffer)(const struct
camera2_stream_ops
*w, int64_t timestamp, buffer_handle_t *buffer)
|
소비자가 사용할 수 있도록 채워진 버퍼를 스트림에 푸시합니다.
타임스탬프는 이미지의 첫 번째 행 노출 시작 시간을 나타냅니다. 타임스탬프는 단조로운 시계에서 가져와야 하며 나노초 단위로 측정됩니다. 타임스탬프는 서로 다른 카메라 또는 동일한 카메라의 연속 인스턴스 간에 비교할 필요가 없습니다. 하지만 동일한 카메라의 스트림 간에 비교할 수 있어야 합니다. 하나의 캡처가 여러 스트림의 버퍼를 생성하는 경우 각 스트림은 해당 버퍼에 동일한 타임스탬프를 가져야 하며, 이 타임스탬프는 출력 프레임 메타데이터의 타임스탬프와 일치해야 합니다.
camera2.h
FILE의
96
라인에 정의되어 있습니다.
int(* set_crop)(const struct
camera2_stream_ops
*w, int left, int top, int right, int bottom)
|
나중에 큐에 추가된 버퍼의 자르기 창을 설정합니다. 이 매개변수는 버퍼 너비와 높이를 기준으로 픽셀 단위로 측정됩니다.
camera2.h
파일의
108
행에 정의되어 있습니다.
이 구조체에 관한 문서는 다음 파일에서 생성되었습니다.
-
hardware/libhardware/include/hardware/
camera2.h
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 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_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)"]]