Interface ITimedDataBuffer
Represents a buffer of data samples ordered by the Frame
Namespace: Unity.LiveCapture
Assembly: Unity.LiveCapture.dll
Syntax
public interface ITimedDataBuffer
Properties
Capacity
The maximum number of elements which can be stored in the collection.
Declaration
int Capacity { get; set; }
Property Value
Type | Description |
---|---|
int |
Remarks
If the new size is smaller than the current Count, elements will be truncated from the front.
Exceptions
Type | Condition |
---|---|
Argument |
Thrown if the capacity is not greater than zero. |
Count
The number of elements stored in the buffer.
Declaration
int Count { get; }
Property Value
Type | Description |
---|---|
int |
FrameRate
The frame rate of the buffered samples.
Declaration
FrameRate FrameRate { get; set; }
Property Value
Type | Description |
---|---|
Frame |
Remarks
This will remap the frame time of all samples in the buffer to match the new frame rate.
Exceptions
Type | Condition |
---|---|
Argument |
Thrown if attempting to set an invalid value. |
Methods
Clear()
Removes all samples in the buffer.
Declaration
void Clear()
GetStatus(FrameTime)
Retrieves the status of the buffer at the specified time.
Declaration
TimedSampleStatus GetStatus(FrameTime frameTime)
Parameters
Type | Name | Description |
---|---|---|
Frame |
frameTime | The time to retrieve the status for, expressed relative to the Frame |
Returns
Type | Description |
---|---|
Timed |
The status of the retrieved sample. |
TryGetBufferRange(out FrameTime, out FrameTime)
Gets the frame time of the newest and oldest samples in the buffer.
Declaration
bool TryGetBufferRange(out FrameTime oldestSample, out FrameTime newestSample)
Parameters
Type | Name | Description |
---|---|---|
Frame |
oldestSample | The frame time of the oldest sample in the buffer, or default if there are no samples in the buffer. |
Frame |
newestSample | The frame time of the newest sample in the buffer, or default if there are no samples in the buffer. |