اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release
بدلاً من aosp-main
لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
إتاحة استخدام كاميرات متعددة
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
في نظام "العرض الخارجي" (EVS) 1.1، يمكن استخدام جهاز الكاميرا المنطقي الذي يتألف من
أجهزة كاميرا فعلية متعددة. لاستخدام هذا الجهاز الافتراضي، يجب أن تكون عمليات تنفيذ الأجهزة متوافقة مع إطار عمل الربط.
إحصاء أجهزة الكاميرات المنطقية وفتحها وإغلاقها
يمكن للتطبيق استخدام طرق IEvsEnumerator
نفسها لاستخدام
أجهزة الكاميرا المنطقية المتاحة. يجب أن يحتوي عنصر EvsCamera
الذي تم إرجاعه، والذي يمثّل
جهاز كاميرا منطقيًا، على العناصر التالية في البيانات الوصفية:
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
إذا كان عنصر EvsCamera المعروض يمثّل كاميرا منطقية، يجب أن تحتوي بيانات تعريف الكاميرا
على مفتاح الإمكانية هذا في حقل ANDROID_REQUEST_AVAILABLE_CAPABILITIES
.
- يسرد الحقل
ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS
معرّفات أجهزة الكاميرا المادية.
- يمكن أن يحتوي الحقل
ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
على أيّ من القيم التالية:
ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE
هي مخصّصة لأجهزة الاستشعار في وضع "الرئيسي-الرئيسي"، ولا تتيح مزامنة الغالق/التثبيت في الأجهزة.
-
ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED
هي مخصّصة لأدوات الاستشعار في وضع "الجهاز الرئيسي/الجهاز التابع"، ومزامنتها مع الغالق/التعريض في الأجهزة.
يجب أن تحتوي كاميرات GMSL2 المتزامنة على هذه القيمة.
يمكن للتطبيق استرداد وصف لأجهزة الكاميرا المادية من خلال
IEvsCamera
في الطريقة الجديدة getPhysicalCameraInfo(stringcameraId)
.
/**
* Returns the description of the physical camera device that backs this
* logical camera.
*
* If a requested device does not either exist or back this logical device,
* this method returns a null camera descriptor. And, if this is called on
* a physical camera device, this method is the same as getCameraInfo_1_1()
* method if a given device ID is matched. Otherwise, this returns a
* null camera descriptor.
*
* @param deviceId Physical camera device identifier string.
* @return info The description of a member physical camera device.
* This must be the same value as reported by
* EvsEnumerator::getCameraList_1_1().
*/
getPhysicalCameraInfo(string deviceId) generates (CameraDesc info);
يجب تحديد جميع الكاميرات المنطقية بشكل ثابت ويجب
إحصاؤها من خلال تنفيذ مدير الإعدادات. بما أنّ EVS تسمح بضبط كل
جهاز في المجموعة بشكل مختلف، تقدّم EVS قائمة بالأجهزة
المشارِكة وتشير إلى ما إذا كانت عملية التقاط الصور متزامنة أم لا.
<!-- camera group 0 -->
<group id='group0' synchronized='CALIBRATED'>
<caps>
<!-- list of supported controls supported by all physical devices -->
<supported_controls>
<control name='BRIGHTNESS' min='0' max='255'/>
<control name='CONTRAST' min='0' max='255'/>
</supported_controls>
<!-- list of stream configuration supported by all physical devices -->
<stream id='0' width='640' height='480' format='RGBA_8888' framerate='30'/>
</caps>
<!-- list of parameters -->
<characteristics>
<parameter
name='REQUEST_AVAILABLE_CAPABILITIES'
type='enum'
size='1'
value='LOGICAL_MULTI_CAMERA'
/>
<parameter
name='LOGICAL_MULTI_CAMERA_PHYSICAL_IDS'
type='byte[]'
size='2'
value='/dev/video3,/dev/video4'
/>
</characteristics>
</group>
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Multi-camera support\n\nIn Exterior View System (EVS) 1.1, the logical camera device that consists of\nmultiple physical camera devices is supported. To use this virtual device, device\nimplementations must support the\n[Synchronization\nFramework](/devices/graphics/sync).\n\nEnumerate, open, and close logical camera device\n------------------------------------------------\n\nThe app can use the same `IEvsEnumerator` methods to use the\navailable logical camera devices. The returned `EvsCamera` object, which\nrepresents a logical camera device, must contain the following items in the metadata:\n\n- [ANDROID_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA) \n If a returned EvsCamera object represents a logical camera, its camera metadata must contain this capability key in its `ANDROID_REQUEST_AVAILABLE_CAPABILITIES` field.\n- `ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS` field lists physical camera device identifiers.\n- `ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE` field can have either of below enum values:\n - `ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE` is for sensors in master-master mode, no hardware shutter/exposure sync.\n - `ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED` is for sensors in master-slave mode, hardware shutter/exposure sync. Synchronized GMSL2 cameras must have this value.\n\nThe app can retrieve a descriptor of physical camera devices through\n`IEvsCamera` in the new `getPhysicalCameraInfo(stringcameraId)`\nmethod. \n\n```scilab\n/**\n * Returns the description of the physical camera device that backs this\n * logical camera.\n *\n * If a requested device does not either exist or back this logical device,\n * this method returns a null camera descriptor. And, if this is called on\n * a physical camera device, this method is the same as getCameraInfo_1_1()\n * method if a given device ID is matched. Otherwise, this returns a\n * null camera descriptor.\n *\n * @param deviceId Physical camera device identifier string.\n * @return info The description of a member physical camera device.\n * This must be the same value as reported by\n * EvsEnumerator::getCameraList_1_1().\n */\ngetPhysicalCameraInfo(string deviceId) generates (CameraDesc info);\n```\n\nConfigure multi-camera support\n------------------------------\n\nAll logical cameras are required to be defined statically and must be\nenumerated through a configuration manager implementation. As EVS allows each\ndevice in the group to be configured differently, EVS provides a list of member\ndevices and indicates whether or not the image capture is synchronized. \n\n```gdscript\n\u003c!-- camera group 0 --\u003e\n\u003cgroup id='group0' synchronized='CALIBRATED'\u003e\n \u003ccaps\u003e\n \u003c!-- list of supported controls supported by all physical devices --\u003e\n \u003csupported_controls\u003e\n \u003ccontrol name='BRIGHTNESS' min='0' max='255'/\u003e\n \u003ccontrol name='CONTRAST' min='0' max='255'/\u003e\n \u003c/supported_controls\u003e\n\n \u003c!-- list of stream configuration supported by all physical devices --\u003e\n \u003cstream id='0' width='640' height='480' format='RGBA_8888' framerate='30'/\u003e\n \u003c/caps\u003e\n\n \u003c!-- list of parameters --\u003e\n \u003ccharacteristics\u003e\n \u003cparameter\n name='REQUEST_AVAILABLE_CAPABILITIES'\n type='enum'\n size='1'\n value='LOGICAL_MULTI_CAMERA'\n /\u003e\n \u003cparameter\n name='LOGICAL_MULTI_CAMERA_PHYSICAL_IDS'\n type='byte[]'\n size='2'\n value='/dev/video3,/dev/video4'\n /\u003e\n \u003c/characteristics\u003e\n\u003c/group\u003e\n```"]]