CameraDeviceSelector Class

Description

用于在Android上选择Camera API(camera1或camera2)。camera1兼容性较好,但缺乏一些必要的信息,如时间戳。camera2在部分设备上存在兼容性问题。

不同选项会根据用途选择camera1或camera2。

getAndroidCameraApiType

以指定选项获取推荐的Android Camera API类型。

C

easyar_AndroidCameraApiType easyar_CameraDeviceSelector_getAndroidCameraApiType(easyar_CameraDevicePreference preference)

C++

static AndroidCameraApiType getAndroidCameraApiType(CameraDevicePreference preference)

Java

public static int getAndroidCameraApiType(int preference)

Kotlin

companion object fun getAndroidCameraApiType(preference: Int): Int

Objective-C

+ (easyar_AndroidCameraApiType)getAndroidCameraApiType:(easyar_CameraDevicePreference)preference

Swift

public static func getAndroidCameraApiType(_ preference: CameraDevicePreference) -> AndroidCameraApiType

C#

public static AndroidCameraApiType getAndroidCameraApiType(CameraDevicePreference preference)

createCameraDevice

以指定选项创建 CameraDevice

C

void easyar_CameraDeviceSelector_createCameraDevice(easyar_CameraDevicePreference preference, easyar_CameraDevice * * Return)

C++

static std::shared_ptr<CameraDevice> createCameraDevice(CameraDevicePreference preference)

Java

public static @Nonnull CameraDevice createCameraDevice(int preference)

Kotlin

companion object fun createCameraDevice(preference: Int): CameraDevice

Objective-C

+ (easyar_CameraDevice *)createCameraDevice:(easyar_CameraDevicePreference)preference

Swift

public static func createCameraDevice(_ preference: CameraDevicePreference) -> CameraDevice

C#

public static CameraDevice createCameraDevice(CameraDevicePreference preference)

getFocusMode

以指定选项获取推荐的Camera FocusMode类型。

C

easyar_CameraDeviceFocusMode easyar_CameraDeviceSelector_getFocusMode(easyar_CameraDevicePreference preference)

C++

static CameraDeviceFocusMode getFocusMode(CameraDevicePreference preference)

Java

public static int getFocusMode(int preference)

Kotlin

companion object fun getFocusMode(preference: Int): Int

Objective-C

+ (easyar_CameraDeviceFocusMode)getFocusMode:(easyar_CameraDevicePreference)preference

Swift

public static func getFocusMode(_ preference: CameraDevicePreference) -> CameraDeviceFocusMode

C#

public static CameraDeviceFocusMode getFocusMode(CameraDevicePreference preference)