Class CameraTrackingDevice
A type of LiveStreamCaptureDevice that provides the common functionality required to implement support for third-party camera tracking devices.
Inheritance
Inherited Members
Namespace: Unity.LiveCapture.Cameras
Syntax
public abstract class CameraTrackingDevice : LiveStreamCaptureDevice
Properties
Camera
The camera currently assigned to this device.
Declaration
public Camera Camera { get; set; }
Property Value
| Type | Description |
|---|---|
| Camera |
Methods
AddFrame<T>(T, Nullable<FrameTimeWithRate>)
Process a new frame of data.
Declaration
protected void AddFrame<T>(T frame, FrameTimeWithRate? frameTime = null)
Parameters
| Type | Name | Description |
|---|---|---|
| T | frame | The frame to add. |
| Nullable<FrameTimeWithRate> | frameTime | The timecode of the frame. When null, a timecode will be generated. |
Type Parameters
| Name | Description |
|---|---|
| T | The datatype of the samples. |
CreateTimedDataBuffer()
Creates a new ITimedDataBuffer.
Declaration
protected abstract ITimedDataBuffer CreateTimedDataBuffer()
Returns
| Type | Description |
|---|---|
| ITimedDataBuffer | The new ITimedDataBuffer. |
GetCurrentFrame<T>()
Gets the sample at the specified frame time.
Declaration
protected T GetCurrentFrame<T>()
Returns
| Type | Description |
|---|---|
| T | The sample at the specified frame time. |
Type Parameters
| Name | Description |
|---|---|
| T | The datatype of the samples. |
OnDisable()
The device calls this method when the device is about to get disabled.
Declaration
protected override void OnDisable()
Overrides
Remarks
If you override this method, call the base method in your implementation.
OnEnable()
The device calls this method when the device is about to get enabled.
Declaration
protected override void OnEnable()
Overrides
Remarks
If you override this method, call the base method in your implementation.
OnValidate()
Editor-only function that Unity calls when the script is loaded or a value changes in the Inspector.
Declaration
protected virtual void OnValidate()
Remarks
You would usually use this to perform an action after a value changes in the Inspector; for example, making sure that data stays within a certain range.
ResetSyncBuffer()
Clears all frames in the synchronization buffer.
Declaration
protected void ResetSyncBuffer()
Write(ITakeBuilder)
Stores the recording into a take using a ITakeBuilder.
Declaration
public override void Write(ITakeBuilder takeBuilder)
Parameters
| Type | Name | Description |
|---|---|---|
| ITakeBuilder | takeBuilder | The take builder object. |