Class ExternalFrameSource
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
An external frame source represents a frame source not built-in by EasyAR Sense. It is used to support AR Engine, AR Foundation or headsets, 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 usually represents a new device or a new data input method.
When using trial products (personal license, trial XR license or trial Mega service etc.) on custom cameras or headsets, EasyAR Sense will stop responding within a fixed limited time after each startup.
public abstract class ExternalFrameSource : FrameSource
- Inheritance
-
ExternalFrameSource
- Derived
- Inherited Members
Properties
ReceivedFrameCount
Obtained frame count. Usually used in debug. If this value stops growing, it is usually a hardware issue; re-plugging some devices (such as Nreal) may solve 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)
Only provided when creating a new frame source. It will only be accessed during StartSession() process.
Handle session startup if this frame source has been assembled into Assembly. This method is designed for delayed initialization, and you can do AR-specific initialization work in this method.
protected override void OnSessionStart(ARSession session)
Parameters
session
OnSessionStop()
Only provided when creating a new frame source. It will be accessed during StopSession(bool) or other session stop/corruption processes.
Handle session stop if this frame source has been assembled into Assembly. You can use this method to destroy resources created by StartSession() and during session operation, and restore internal state. This method is guaranteed to be called before the session is destroyed. If the frame source is destroyed before the session, this method will not be called and the session will be corrupted.
protected override void OnSessionStop()
TryAcquireBuffer(int)
Attempt to acquire a memory block from the memory pool.
protected Optional<Buffer> TryAcquireBuffer(int size)
Parameters
size