2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
camera_module_callbacks 구조체 참조
#include <
camera_common.h
>
카메라 HAL 모듈이 프레임워크에 카메라 하위 시스템의 변경사항을 알리는 데 사용하는 콜백 함수입니다.
버전 정보 (camera_module_t.common.module_api_version 기반):
각 콜백은 지정된 버전 이상의 HAL 모듈 API 인터페이스를 구현하는 HAL 모듈에서만 호출됩니다.
CAMERA_MODULE_API_VERSION_2_1:
camera_device_status_change()
CAMERA_MODULE_API_VERSION_2_4:
torch_mode_status_change()
camera_common.h
파일의
594
번 째 줄에 정의되어 있습니다.
camera_device_status_change:
특정 카메라 기기의 상태가 변경되었음을 나타내는 프레임워크 콜백입니다. 모듈 로드 시 프레임워크는 모든 카메라 기기가 CAMERA_DEVICE_STATUS_PRESENT 상태라고 가정합니다. HAL은 이 메서드를 호출하여 프레임워크에 처음에 NOT_PRESENT인 기기를 알립니다.
이 콜백은 CAMERA_MODULE_API_VERSION_2_1용으로 추가되었습니다.
camera_module_callbacks
: set_callbacks를 사용하여 모듈에 전달된 camera_module_callbacks_t의 인스턴스입니다.
camera_id: 새 상태가 있는 카메라 기기의 ID입니다.
new_status: 새 상태 코드, camera_device_status_t enum 중 하나 또는 플랫폼별 상태입니다.
camera_common.h
FILE의
616
행에 정의되어 있습니다.
torch_mode_status_change:
특정 카메라 기기와 연결된 플래시 장치의 토치 모드 상태가 변경되었음을 나타내는 프레임워크 콜백입니다. 모듈 로드 시 get_camera_info() 호출을 통해 android.flash.info.available가 true로 보고되면 프레임워크는 토치 모드가 TORCH_MODE_STATUS_AVAILABLE_OFF 상태라고 가정합니다.
이 콜백은 CAMERA_MODULE_API_VERSION_2_4용으로 추가되었습니다.
camera_module_callbacks
: set_callbacks를 사용하여 모듈에 전달된 camera_module_callbacks_t의 인스턴스입니다.
camera_id: 플래시 장치에 새 토치 모드 상태가 있는 카메라 기기의 ID입니다.
new_status: torch_mode_status_t enum 중 하나인 새 상태 코드입니다.
camera_common.h
파일의
639
행에 정의되어 있습니다.
이 구조체에 관한 문서는 다음 파일에서 생성되었습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 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: camera_module_callbacks Struct Reference\n\ncamera_module_callbacks Struct Reference\n========================================\n\n[Data Fields](#pub-attribs) \ncamera_module_callbacks Struct Reference \n\n`\n#include \u003c\n`[camera_common.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h)`\n\u003e\n`\n\n|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| void(\\* | [camera_device_status_change](/reference/hal/structcamera__module__callbacks#a79f12aab43e5c0ca75b127718f3144cf) )(const struct [camera_module_callbacks](/reference/hal/structcamera__module__callbacks) \\*, int camera_id, int new_status) |\n| ||\n| void(\\* | [torch_mode_status_change](/reference/hal/structcamera__module__callbacks#a70479d8b007a3a6b441437a3e584b2af) )(const struct [camera_module_callbacks](/reference/hal/structcamera__module__callbacks) \\*, const char \\*camera_id, int new_status) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nCallback functions for the camera HAL module to use to inform the framework of changes to the camera subsystem.\n\n\nVersion information (based on camera_module_t.common.module_api_version):\n\n\nEach callback is called only by HAL modules implementing the indicated version or higher of the HAL module API interface.\n\n\nCAMERA_MODULE_API_VERSION_2_1:\n[camera_device_status_change()](/reference/hal/structcamera__module__callbacks#a79f12aab43e5c0ca75b127718f3144cf)\n\n\nCAMERA_MODULE_API_VERSION_2_4:\n[torch_mode_status_change()](/reference/hal/structcamera__module__callbacks#a70479d8b007a3a6b441437a3e584b2af)\n\n\nDefinition at line\n[594](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h)\nof file\n[camera_common.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h)\n.\n\nField Documentation\n-------------------\n\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| void(\\* camera_device_status_change)(const struct [camera_module_callbacks](/reference/hal/structcamera__module__callbacks) \\*, int camera_id, int new_status) |\n\n\ncamera_device_status_change:\n\n\nCallback to the framework to indicate that the state of a specific camera device has changed. At module load time, the framework will assume all camera devices are in the CAMERA_DEVICE_STATUS_PRESENT state. The HAL must call this method to inform the framework of any initially NOT_PRESENT devices.\n\n\nThis callback is added for CAMERA_MODULE_API_VERSION_2_1.\n\n\n[camera_module_callbacks](/reference/hal/structcamera__module__callbacks)\n: The instance of camera_module_callbacks_t passed to the module with set_callbacks.\n\n\ncamera_id: The ID of the camera device that has a new status.\n\n\nnew_status: The new status code, one of the camera_device_status_t enums, or a platform-specific status.\n\n\nDefinition at line\n[616](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h)\nof file\n[camera_common.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h)\n.\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| void(\\* torch_mode_status_change)(const struct [camera_module_callbacks](/reference/hal/structcamera__module__callbacks) \\*, const char \\*camera_id, int new_status) |\n\n\ntorch_mode_status_change:\n\n\nCallback to the framework to indicate that the state of the torch mode of the flash unit associated with a specific camera device has changed. At module load time, the framework will assume the torch modes are in the TORCH_MODE_STATUS_AVAILABLE_OFF state if android.flash.info.available is reported as true via get_camera_info() call.\n\n\nThis callback is added for CAMERA_MODULE_API_VERSION_2_4.\n\n\n[camera_module_callbacks](/reference/hal/structcamera__module__callbacks)\n: The instance of camera_module_callbacks_t passed to the module with set_callbacks.\n\n\ncamera_id: The ID of camera device whose flash unit has a new torch mode status.\n\n\nnew_status: The new status code, one of the torch_mode_status_t enums.\n\n\nDefinition at line\n[639](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h)\nof file\n[camera_common.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [camera_common.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/camera_common.h)"]]