Interface ITimedDataSource
An interface for a collection of timecoded data samples that can be synchronized.
Namespace: Unity.LiveCapture
Assembly: Unity.LiveCapture.dll
Syntax
public interface ITimedDataSource : IRegistrable
Properties
BufferSize
The current buffer size.
Declaration
int BufferSize { get; set; }
Property Value
Type | Description |
---|---|
int |
FrameRate
The number of data samples per second.
Declaration
FrameRate FrameRate { get; }
Property Value
Type | Description |
---|---|
Frame |
IsSynchronized
Signal to the data source whether it is being synchronized via Present
Declaration
bool IsSynchronized { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
When true, the data source should disable its own update mechanism.
MaxBufferSize
The maximum size of the sample buffer, if limited.
Declaration
int? MaxBufferSize { get; }
Property Value
Type | Description |
---|---|
int? |
MinBufferSize
The minimum size of the sample buffer, if limited.
Declaration
int? MinBufferSize { get; }
Property Value
Type | Description |
---|---|
int? |
Offset
The time offset applied to sample timecodes, in frames.
Declaration
FrameTime Offset { get; set; }
Property Value
Type | Description |
---|---|
Frame |
Remarks
The frame duration corresponds to the Frame
Synchronizer
The ISynchronizer controlling this source.
Declaration
ISynchronizer Synchronizer { get; set; }
Property Value
Type | Description |
---|---|
ISynchronizer |
Remarks
In most cases you can simply implement this as an auto-property. The default synchronizer implementation
automatically assigns this property when you call Add
UndoTarget
The object to record to the undo stack when the user modifies the properties of this data source.
Declaration
Object UndoTarget { get; }
Property Value
Type | Description |
---|---|
Object |
Remarks
To enable undo when using the synchronization windows, this must be the object that stores the serialized state for this data source. When null, this data source will not support undo operations.
Methods
PresentAt(FrameTimeWithRate)
Applies the data for a given timecode to the scene.
Declaration
TimedSampleStatus PresentAt(FrameTimeWithRate presentTime)
Parameters
Type | Name | Description |
---|---|---|
Frame |
presentTime | The timecode to present. |
Returns
Type | Description |
---|---|
Timed |
A status representing the ability of the source to present at the requested timecode. |
TryGetBufferRange(out FrameTime, out FrameTime)
Gets the frame time of the newest and oldest samples buffered by the data source.
Declaration
bool TryGetBufferRange(out FrameTime oldestSample, out FrameTime newestSample)
Parameters
Type | Name | Description |
---|---|---|
Frame |
oldestSample | The frame time of the oldest buffered sample, or default if there are no buffered samples. |
Frame |
newestSample | The frame time of the newest buffered sample, or default if there are no buffered samples. |
Returns
Remarks
The frame duration corresponds to the Frame