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; }

Methods

Awake()

protected virtual void Awake()

OnApplicationPause(bool)

protected virtual void OnApplicationPause(bool pause)

Parameters

pause

OnDestroy()

protected virtual void OnDestroy()

OnSessionStart(ARSession)

Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheStartSessionprocessof.

Handlessessionstartupifthisframesourcehasbeenassembledinto.Thismethodisdesignedforlazyinitialization;youcanperformAR-specificinitializationworkinthismethod.

protected override void OnSessionStart(ARSession session)

Parameters

session

OnSessionStop()

Providedonlywhencreatinganewframesource.Itisaccessedduringorothersessionsessionstop/corruptionprocesses.

Handlessessionstopifthisframesourcehasbeenassembledinto.Youcanusethismethodtodestroyresourcescreatedduringandsessionoperationandrestoreinternalstate.Thismethodisguaranteedtobecalledbeforesessiondestruction.Iftheframesourceisdestroyedbeforethesession,itwillnotbecalled,andthesessionwillbecorrupted.

protected override void OnSessionStop()

TryAcquireBuffer(int)

Attempts to acquire a memory block from the memory pool.

protected Optional<Buffer> TryAcquireBuffer(int size)

Parameters

size