Class FrameSource
- Namespace
- easyar
- Assembly
- EasyAR.Sense.dll
A frame-source represents the data source for frame input data, providing image data or both image and motion data.
You can implement custom cameras by inheriting from some subtypes of FrameSource, but you cannot directly inherit from FrameSource. Custom cameras typically represent a new device or a new way of inputting data.
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 upon each startup.
[DisallowMultipleComponent]
public abstract class FrameSource : MonoBehaviour
- Inheritance
-
FrameSource
- Derived
Properties
AvailableCenterMode
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
Allcentermodesthatcanbeused.
protected virtual IReadOnlyList<ARSession.ARCenterMode> AvailableCenterMode { get; }
Camera
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
Ondesktopdevicesorphones,thiscameracorrespondstothe
protected abstract Camera Camera { get; }
CameraFrameStarted
Providedonlywhencreatinganewframesource.Itisaccessedthroughouttheentirelifecycleof
Whetherthecameraframehasstartedinput.
protected abstract bool CameraFrameStarted { get; }
DeviceCameras
Providedonlywhencreatinganewframesource.Itisaccessedwhen
Thedevicecamerathatprovidesthecameraframedata.Ifthecameraframedataisprovidedbymultiplecameras,thelistshouldincludeallofthem.
Ensurethatthevalueiscorrectwhen
protected abstract List<FrameSourceCamera> DeviceCameras { get; }
Display
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
Providesdisplaysysteminformation.Youcanuse
protected abstract IDisplay Display { get; }
IsAvailable
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
Whetherthecurrentframesourceisavailable.
Ifthevalueisnull,
protected abstract Optional<bool> IsAvailable { get; }
IsCameraUnderControl
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
Whenthevalueistrue,thesessionwillupdatethecamera'stransformandrenderthecameraimage.
Whencreatingaheadsetextension,itshouldbefalse.Youshouldhavefullcontroloverthe3Dcamerainthescene.Youshouldhandlecamerarendering,especiallyinVSTmode.
protected abstract bool IsCameraUnderControl { get; }
IsHMD
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
Whetherthecurrentframesourceisaheadset.Ifitisaheadset,diagnosticinformationwillbedisplayedona3Dboardinfrontofthecamera.
Someframefiltersmayoperatedifferentlyonthedevice.
protected abstract bool IsHMD { get; }
Methods
CheckAvailability()
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheAssembleprocessof
A
protected virtual IEnumerator CheckAvailability()
OnSessionStart(ARSession)
Providedonlywhencreatinganewframesource.ItisaccessedonlyduringtheStartSessionprocessof
Handlessessionstartupifthisframesourcehasbeenassembledinto
protected abstract void OnSessionStart(ARSession session)
Parameters
session
OnSessionStop()
Providedonlywhencreatinganewframesource.Itisaccessedduring
Handlessessionstopifthisframesourcehasbeenassembledinto
protected abstract void OnSessionStop()