Class TimecodeSource
A base class that includes functionality suitable for most ITimecode
Inherited Members
Namespace: Unity.LiveCapture
Assembly: Unity.LiveCapture.dll
Syntax
public abstract class TimecodeSource : MonoBehaviour, ITimecodeSource, IRegistrable
Properties
CurrentTime
The frame time and frame rate to use for the current frame, if available.
Declaration
public FrameTimeWithRate? CurrentTime { get; }
Property Value
Type | Description |
---|---|
Frame |
Remarks
This value is only changed at the beginning of each frame.
FrameRate
The frame rate of the timecode source.
Declaration
public abstract FrameRate FrameRate { get; }
Property Value
Type | Description |
---|---|
Frame |
Remarks
This value may change during a frame.
FriendlyName
Get a human-readable name for the instance.
Declaration
public virtual string FriendlyName { get; }
Property Value
Type | Description |
---|---|
string |
Id
Get the unique identifier for this instance.
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
The ID should not be null or empty, and is expected to remain constant for the life of the instance.
Methods
OnDisable()
This method is called by Unity when the component becomes disabled.
Declaration
protected virtual void OnDisable()
OnEnable()
This method is called by Unity when the component becomes enabled and active.
Declaration
protected virtual void OnEnable()
TryPollTimecode(out FrameRate, out Timecode)
Gets the latest timecode from the timecode source.
Declaration
protected abstract bool TryPollTimecode(out FrameRate frameRate, out Timecode timecode)
Parameters
Type | Name | Description |
---|---|---|
Frame |
frameRate | The rate at which the timecode is incremented. |
Timecode | timecode | The most recent timecode. |