CameraDeviceSelector Class

Description

It is used for selecting camera API (camera1 or camera2) on Android. camera1 is better for compatibility, but lacks some necessary information such as timestamp. camera2 has compatibility issues on some devices.

Different preferences will choose camera1 or camera2 based on usage.

getAndroidCameraApiType

Gets recommended Android Camera API type by a specified preference.

C

easyar_AndroidCameraApiType easyar_CameraDeviceSelector_getAndroidCameraApiType(easyar_CameraDevicePreference preference)

C++17

static AndroidCameraApiType getAndroidCameraApiType(CameraDevicePreference preference)

C++03

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

Creates CameraDevice by a specified preference.

C

void easyar_CameraDeviceSelector_createCameraDevice(easyar_CameraDevicePreference preference, easyar_CameraDevice * * Return)

C++17

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

C++03

static void createCameraDevice(CameraDevicePreference preference, CameraDevice * * Return)

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

Gets recommended Camera FocusMode type by a specified preference.

C

easyar_CameraDeviceFocusMode easyar_CameraDeviceSelector_getFocusMode(easyar_CameraDevicePreference preference)

C++17

static CameraDeviceFocusMode getFocusMode(CameraDevicePreference preference)

C++03

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)