Table of Contents

Class ExternalFrameSource

Namespace
easyar
Assembly
EasyAR.Sense.dll

An external frame source represents a frame source not built into EasyAR Sense. It is used to support AR Engine, AR Foundation, or head-mounted displays, and can also be used to define your own frame source.

You can implement a custom camera by inheriting from some subtypes of ExternalFrameSource, but you cannot directly inherit from ExternalFrameSource. A custom camera typically represents a new device or a new way of data input.

When using trial products (Personal Edition license, Trial XR license, or Trial Mega service, etc.) with a custom camera or head-mounted display, EasyAR Sense will stop responding after a fixed, limited time following each startup.

public abstract class ExternalFrameSource : FrameSource
Inheritance
ExternalFrameSource
Derived
Inherited Members

Properties

ReceivedFrameCount

The number of frames acquired. Typically used in debugging. If this number stops increasing, it is usually a hardware issue; replugging the device (such as Nreal) may resolve it.

public int ReceivedFrameCount { get; }

Property Value

Methods

Awake()

protected virtual void Awake()

OnApplicationPause(bool)

protected virtual void OnApplicationPause(bool pause)

Parameters

pause

OnDestroy()

protected virtual void OnDestroy()

OnSessionStart(ARSession)

Provided only when creating a new frame source. It is accessed only during the StartSession() process.

Handles session startup if this frame source has been assembled into Assembly. This method is designed for lazy initialization; you can perform AR-specific initialization work within this method.

protected override void OnSessionStart(ARSession session)

Parameters

session

OnSessionStop()

Provided only when creating a new frame source. It is accessed during StopSession(bool) or other session stop/corruption processes.

Handles session stop if this frame source has been assembled into Assembly. You can use this method to destroy resources created during StartSession() and session runtime, and restore the internal state. This method is guaranteed to be called before the session is destroyed. If the frame source is destroyed before the session, it will not be called, and the session will be corrupted.

protected override void OnSessionStop()

TryAcquireBuffer(int)

Attempts to acquire a memory block from the memory pool.

protected Optional<Buffer> TryAcquireBuffer(int size)

Parameters

size

Returns