Navigation
API > API/Plugins > API/Plugins/LiveLink
Control the Engine TimeStep via a live link source
Philosophy:
- Quantized time steps based on live link expected data rate.
- Made for Live Link sources can receive data asynchronously, and therefore trigger the waiting game thread.
- FApp::GetDeltaTime
- Forced to a multiple of the desired FrameTime.
- This multiple will depend on Frame Id increment and user settings.
- FApp::GetCurrentTime
- Incremented in multiples of the desired FrameTime.
| Name | ULiveLinkCustomTimeStep |
| Type | class |
| Header File | /Engine/Plugins/Animation/LiveLink/Source/LiveLink/Public/LiveLinkCustomTimeStep.h |
| Include Path | #include "LiveLinkCustomTimeStep.h" |
Syntax
UCLASS (Blueprintable, EditInlineNew, MinimalAPI)
class ULiveLinkCustomTimeStep : public UGenlockedCustomTimeStep
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UEngineCustomTimeStep → UFixedFrameRateCustomTimeStep → UGenlockedCustomTimeStep → ULiveLinkCustomTimeStep
Derived Classes
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bLockStepMode | bool | Lockstep mode means that we only allow FrameRateDivider data frames of the selected subject per engine loop. | LiveLinkCustomTimeStep.h |
|
| FrameRateDivider | uint32 | Allows genlock to period to be a multiple of the live link data period. | LiveLinkCustomTimeStep.h |
|
| LiveLinkDataRate | FFrameRate | Expected Live Link data rate. | LiveLinkCustomTimeStep.h |
|
| SubjectKey | FLiveLinkSubjectKey | The specific subject that we listen to. | LiveLinkCustomTimeStep.h |
|
| TimeoutInSeconds | double | Determines how long it should wait for live link data before deciding that it is not in synchronized state anymore | LiveLinkCustomTimeStep.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bLockStepModeAnyThread | std::atomic< bool > | Shadow of bLockStepMode property | LiveLinkCustomTimeStep.h | |
| EventLiveLink | FEventRef | Helps trigger the wait for sync function from an asynchronous thread | LiveLinkCustomTimeStep.h | |
| EventWaitForSync | FEventRef | Used in lockstep mode, where we only allow one live link subject data frame per engine tick | LiveLinkCustomTimeStep.h | |
| FrameRateDividerAnyThread | std::atomic< uint32 > | Shadow of FrameRateDivider property | LiveLinkCustomTimeStep.h | |
| LastFrameId | std::atomic< FLiveLinkFrameIdentifier > | Keeps track of the last frame id received for a given subject, and used to calcualte delta time based on source data rate. | LiveLinkCustomTimeStep.h | |
| LastSyncCountDelta | uint32 | Cache of the last sync count delta, used for functions in the game thread that need it. | LiveLinkCustomTimeStep.h | |
| LiveLinkClient | ILiveLinkClient * | This is how we access live link objects. It is obtained using modular features. | LiveLinkCustomTimeStep.h | |
| RegisteredSubjectKey | FLiveLinkSubjectKey | Identifies the Live Link subject that we are genlocking to. | LiveLinkCustomTimeStep.h | |
| RegisterForFrameDataReceivedHandle | FDelegateHandle | Gets called when the subject gets new data. This is the basis for the genlock. | LiveLinkCustomTimeStep.h | |
| State | std::atomic< ECustomTimeStepSynchronizationState > | Keeps track of the current state. | LiveLinkCustomTimeStep.h | |
| SyncCount | std::atomic< uint32 > | Incremented based on frame id when live link data is received. Reset when internally read. | LiveLinkCustomTimeStep.h | |
| TimeoutInSecondsAnyThread | std::atomic< double > | Shadow of TimeoutInSeconds property | LiveLinkCustomTimeStep.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
LiveLinkCustomTimeStep.h | ||
virtual FString GetDisplayName() |
LiveLinkCustomTimeStep.h | ||
virtual uint32 GetExpectedSyncCountDelta() |
LiveLinkCustomTimeStep.h | ||
virtual FFrameRate GetFixedFrameRate() |
LiveLinkCustomTimeStep.h | ||
virtual uint32 GetLastSyncCountDelta() |
LiveLinkCustomTimeStep.h | ||
virtual ECustomTimeStepSynchronizationState GetSynchronizationState() |
LiveLinkCustomTimeStep.h | ||
virtual FFrameRate GetSyncRate() |
LiveLinkCustomTimeStep.h | ||
virtual bool Initialize
(
UEngine* InEngine |
LiveLinkCustomTimeStep.h | ||
virtual bool IsLastSyncDataValid() |
LiveLinkCustomTimeStep.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
LiveLinkCustomTimeStep.h | ||
virtual void Shutdown
(
UEngine* InEngine |
LiveLinkCustomTimeStep.h | ||
virtual bool UpdateTimeStep
(
UEngine* InEngine |
LiveLinkCustomTimeStep.h | ||
virtual bool WaitForSync() |
LiveLinkCustomTimeStep.h |