ARKitCameraDevice Class

Description

ARKitCameraDevice实现了一个基于ARKit的camera设备,输出 InputFrame (包含图像、摄像机参数、时间戳、6DOF位置信息和跟踪状态)。

创建之后,可以调用start/stop来开始和停止采集视频流数据。

当不再需要该设备时,可以调用close对其进行关闭。close之后不应继续使用。

ARKitCameraDevice通过inputFrameSource输出 InputFrame ,应将inputFrameSource连接到 InputFrameSink 上进行使用。参考 概览 _ 。

bufferCapacity表示 InputFrame 缓冲的容量,如果有超过此数量的 InputFrame 从该设备中输出并且没有被释放,该设备将不再输出新的 InputFrame ,直到之前的 InputFrame 被释放。这可能造成画面卡住等问题。参考 概览 _ 。

Constructor

C

void easyar_ARKitCameraDevice__ctor(easyar_ARKitCameraDevice * * Return)

C++17

ARKitCameraDevice()

C++03

ARKitCameraDevice()

Java

public ARKitCameraDevice()

Kotlin

constructor()

Objective-C

+ (easyar_ARKitCameraDevice *) create

Swift

public convenience init()

C#

public ARKitCameraDevice()

isAvailable

检查是否可用。只在iOS 11或更高版本的系统上且在支持ARKit的硬件上时返回true。

C

bool easyar_ARKitCameraDevice_isAvailable(void)

C++17

static bool isAvailable()

C++03

static bool isAvailable()

Java

public static boolean isAvailable()

Kotlin

companion object fun isAvailable(): Boolean

Objective-C

+ (bool)isAvailable

Swift

public static func isAvailable() -> Bool

C#

public static bool isAvailable()

bufferCapacity

InputFrame 缓冲的容量,默认值为8。

C

int easyar_ARKitCameraDevice_bufferCapacity(const easyar_ARKitCameraDevice * This)

C++17

int bufferCapacity()

C++03

int bufferCapacity()

Java

public int bufferCapacity()

Kotlin

fun bufferCapacity(): Int

Objective-C

- (int)bufferCapacity

Swift

public func bufferCapacity() -> Int32

C#

public virtual int bufferCapacity()

setBufferCapacity

设置 InputFrame 缓冲的容量。

C

void easyar_ARKitCameraDevice_setBufferCapacity(easyar_ARKitCameraDevice * This, int capacity)

C++17

void setBufferCapacity(int capacity)

C++03

void setBufferCapacity(int capacity)

Java

public void setBufferCapacity(int capacity)

Kotlin

fun setBufferCapacity(capacity: Int): Unit

Objective-C

- (void)setBufferCapacity:(int)capacity

Swift

public func setBufferCapacity(_ capacity: Int32) -> Void

C#

public virtual void setBufferCapacity(int capacity)

inputFrameSource

InputFrame 输出端口。

C

void easyar_ARKitCameraDevice_inputFrameSource(easyar_ARKitCameraDevice * This, easyar_InputFrameSource * * Return)

C++17

std::shared_ptr<InputFrameSource> inputFrameSource()

C++03

void inputFrameSource(InputFrameSource * * Return)

Java

public @Nonnull InputFrameSource inputFrameSource()

Kotlin

fun inputFrameSource(): InputFrameSource

Objective-C

- (easyar_InputFrameSource *)inputFrameSource

Swift

public func inputFrameSource() -> InputFrameSource

C#

public virtual InputFrameSource inputFrameSource()

start

开始采集视频流数据。

C

bool easyar_ARKitCameraDevice_start(easyar_ARKitCameraDevice * This)

C++17

bool start()

C++03

bool start()

Java

public boolean start()

Kotlin

fun start(): Boolean

Objective-C

- (bool)start

Swift

public func start() -> Bool

C#

public virtual bool start()

stop

停止采集视频流数据。

C

void easyar_ARKitCameraDevice_stop(easyar_ARKitCameraDevice * This)

C++17

void stop()

C++03

void stop()

Java

public void stop()

Kotlin

fun stop(): Unit

Objective-C

- (void)stop

Swift

public func stop() -> Void

C#

public virtual void stop()

close

关闭。close之后不应继续使用。

C

void easyar_ARKitCameraDevice_close(easyar_ARKitCameraDevice * This)

C++17

void close()

C++03

void close()

Java

public void close()

Kotlin

fun close(): Unit

Objective-C

- (void)close

Swift

public func close() -> Void

C#

public virtual void close()