हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
camera_module_callbacks स्ट्रक्चर का रेफ़रंस
#include <
camera_common.h
>
कैमरा एचएएल मॉड्यूल के लिए कॉलबैक फ़ंक्शन, ताकि कैमरा सबसिस्टम में हुए बदलावों के बारे में फ़्रेमवर्क को सूचना दी जा सके.
वर्शन की जानकारी (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()
परिभाषा,
camera_common.h
फ़ाइल की लाइन
594
पर दी गई है.
camera_device_status_change:
किसी खास कैमरा डिवाइस की स्थिति में बदलाव होने की जानकारी देने के लिए, फ़्रेमवर्क को कॉलबैक करें. मॉड्यूल लोड होने के समय, फ़्रेमवर्क यह मान लेगा कि सभी कैमरा डिवाइस, CAMERA_DEVICE_STATUS_PRESENT स्थिति में हैं. शुरुआत में NOT_PRESENT डिवाइसों के बारे में फ़्रेमवर्क को बताने के लिए, एचएएल को इस तरीके को कॉल करना होगा.
यह कॉलबैक, CAMERA_MODULE_API_VERSION_2_1 के लिए जोड़ा गया है.
camera_module_callbacks
: set_callbacks की मदद से मॉड्यूल को पास किया गया camera_module_callbacks_t का इंस्टेंस.
camera_id: उस कैमरा डिवाइस का आईडी जिसका स्टेटस बदला है.
new_status: नई स्थिति का कोड, camera_device_status_t enums में से कोई एक या प्लैटफ़ॉर्म के हिसाब से स्थिति.
परिभाषा,
camera_common.h
फ़ाइल की लाइन
616
पर दी गई है.
torch_mode_status_change:
फ़्रेमवर्क को कॉलबैक करके यह बताना कि किसी खास कैमरा डिवाइस से जुड़ी फ़्लैश यूनिट के टॉर्च मोड की स्थिति बदल गई है. अगर get_camera_info() कॉल के ज़रिए android.flash.info.available को 'सही है' के तौर पर रिपोर्ट किया जाता है, तो मॉड्यूल लोड होने के समय फ़्रेमवर्क यह मान लेगा कि टॉर्च मोड, TORCH_MODE_STATUS_AVAILABLE_OFF स्थिति में हैं.
यह कॉलबैक, CAMERA_MODULE_API_VERSION_2_4 के लिए जोड़ा गया है.
camera_module_callbacks
: set_callbacks की मदद से मॉड्यूल को पास किया गया camera_module_callbacks_t का इंस्टेंस.
camera_id: उस कैमरा डिवाइस का आईडी जिसकी फ़्लैश यूनिट का टॉर्च मोड का स्टेटस नया है.
new_status: नया स्टेटस कोड, torch_mode_status_t enums में से एक.
परिभाषा,
camera_common.h
फ़ाइल की लाइन
639
पर दी गई है.
इस स्ट्रक्चर का दस्तावेज़, इस फ़ाइल से जनरेट किया गया था:
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, 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)"]]