اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release
بدلاً من aosp-main
لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
مرجع بنية camera_module_callbacks
#include <
camera_common.h
>
دوالّ ردّ الاتصال التي تستخدمها وحدة HAL للكاميرا لإعلام إطار العمل بالتغييرات التي تطرأ على النظام الفرعي للكاميرا
معلومات الإصدار (استنادًا إلى camera_module_t.common.module_api_version):
لا يتم استدعاء كل وظيفة استدعاء إلا من خلال وحدات HAL التي تنفِّذ الإصدار المحدَّد أو إصدارًا أحدث من واجهة برمجة التطبيقات لوحدة HAL.
CAMERA_MODULE_API_VERSION_2_1:
camera_device_status_change()
CAMERA_MODULE_API_VERSION_2_4:
torch_mode_status_change()
التعريف في السطر
594
من الملف
camera_common.h
.
camera_device_status_change:
طلب إعادة الاتصال بالإطار الأساسي للإشارة إلى أنّه تم تغيير حالة جهاز كاميرا معيّن في وقت تحميل الوحدة، سيفترض إطار العمل أنّ جميع أجهزة الكاميرا في حالة CAMERA_DEVICE_STATUS_PRESENT. يجب أن يستدعي HAL هذه الطريقة لإعلام إطار العمل بأي أجهزة في البداية تكون الحالة فيها NOT_PRESENT.
تمت إضافة هذا المرجع لـ CAMERA_MODULE_API_VERSION_2_1.
camera_module_callbacks
: مثيل camera_module_callbacks_t تم تمريره إلى الوحدة باستخدام set_callbacks.
camera_id: رقم تعريف جهاز الكاميرا الذي يتضمّن حالة جديدة.
new_status: رمز الحالة الجديد، أو أحد القيم المحدَّدة في camera_device_status_t، أو حالة خاصة بالنظام الأساسي
التعريف في السطر
616
من الملف
camera_common.h
.
torch_mode_status_change:
طلب إعادة الاتصال بالإطار الأساسي للإشارة إلى أنّه تم تغيير حالة وضع مصباح يدوي لوحدة الفلاش المرتبطة بجهاز كاميرا معيّن. في وقت تحميل الوحدة، سيفترض إطار العمل أنّ أوضاع ضوء الفلاش في حالة TORCH_MODE_STATUS_AVAILABLE_OFF إذا تم الإبلاغ عن android.flash.info.available على أنّه صحيح من خلال طلب get_camera_info().
تمت إضافة هذا المرجع لـ CAMERA_MODULE_API_VERSION_2_4.
camera_module_callbacks
: مثيل camera_module_callbacks_t تم تمريره إلى الوحدة باستخدام set_callbacks.
camera_id: رقم تعريف جهاز الكاميرا التي تتضمّن وحدة فلاش لها حالة جديدة في وضع مصباح يدوي.
new_status: رمز الحالة الجديد، وهو أحد القيم المحدَّدة مسبقًا لعنصر torch_mode_status_t.
التعريف في السطر
639
من الملف
camera_common.h
.
تم إنشاء مستندات هذه البنية من الملف التالي:
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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)"]]