Class ExternalFrameSource
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
An external frame source represents a frame source that is not built into 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 inherit directly from ExternalFrameSource. A custom camera usually represents a new device or a new data input method.
When using trial products, such as a Personal Edition license, trial XR license, or trial Mega service, on a custom camera or headset, EasyAR Sense will stop responding for a fixed limited time after each startup.
public abstract class ExternalFrameSource : FrameSource
- Inheritance
-
ExternalFrameSource
- Derived
- Inherited Members
Properties
ReceivedFrameCount
The count of frames obtained. Usually used for debug. If this value stops increasing, it is usually a hardware issue; replugging some devices, 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)
Provided only when creating a new frame source. It is accessed only during StartSession().
Handles session startup if this frame source has already been assembled into Assembly. This method is designed for lazy initialization, and you can perform AR-specific initialization work in it.
protected override void OnSessionStart(ARSession session)
Parameters
session
OnSessionStop()
Provided only when creating a new frame source. It will be accessed during StopSession(bool) or other session stop/corruption processes.
Handles session stop if this frame source has already been assembled into Assembly. You can use this method to destroy resources created by StartSession() and during session runtime, and to restore 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 become corrupted.
protected override void OnSessionStop()
TryAcquireBuffer(int)
Tries to obtain a memory block from the memory pool.
protected Optional<Buffer> TryAcquireBuffer(int size)
Parameters
size