Navigation
API > API/Runtime > API/Runtime/MovieSceneCapture
Class responsible for resolving render target data for a specific viewport in an efficient manner Internally, the class uses a fixed array of resolution surfaces, and dispatches rendering commands to resolve the viewport render target into a specific index into this array. This means we can resolve the render target data without having to wait, or flush rendering commands.
| Name | FFrameGrabber |
| Type | class |
| Header File | /Engine/Source/Runtime/MovieSceneCapture/Public/FrameGrabber.h |
| Include Path | #include "FrameGrabber.h" |
Syntax
class FFrameGrabber
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FFrameGrabber
(
const FFrameGrabber& |
Non-copyable | FrameGrabber.h | |
FFrameGrabber
(
TSharedRef< FSceneViewport > Viewport, |
Construct this frame grabber | FrameGrabber.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FFrameGrabber() |
Destructor | FrameGrabber.h |
Structs
| Name | Remarks |
|---|---|
| FResolveSurface | Array of surfaces that we resolve the viewport RHI to. Fixed allocation - should never be resized |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CapturedFrames | TArray< FCapturedFrameData > | Array of captured frames | FrameGrabber.h | |
| CapturedFramesMutex | FCriticalSection | Lock to protect the above array | FrameGrabber.h | |
| CurrentFrameIndex | int32 | Index into the above array to the next surface that we should use - only accessed on main thread | FrameGrabber.h | |
| FrameGrabLatency | int32 | FrameGrabber.h | ||
| OnBackBufferReadyToPresent | FDelegateHandle | Delegate handle for the OnBackBufferReadyToPresent event | FrameGrabber.h | |
| OutstandingFrameCount | FThreadSafeCounter | The total number of frames we are currently waiting on | FrameGrabber.h | |
| RenderThread_PendingFramePayloads | TArray< FFramePayloadPtr > | Only to be accessed from the render thread - array of frame payloads to be captured from the rendered slate window sorted first to last. | FrameGrabber.h | |
| SlateRenderIndex | int32 | The index that we should capture the next rendered slate window into | FrameGrabber.h | |
| State | EFrameGrabberState | FrameGrabber.h | ||
| Surfaces | TArray< FResolveSurface > | FrameGrabber.h | ||
| TargetSize | FIntPoint | The desired target size to resolve frames to | FrameGrabber.h | |
| TargetWindowPtr | void * | Pointer to the window we want to capture. | FrameGrabber.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CaptureThisFrame
(
FFramePayloadPtr Payload |
Instruct the frame grabber capture this frame, when it receives an event from slate | FrameGrabber.h | |
TArray< FCapturedFrameData > GetCapturedFrames() |
Retrieve any frames we may have captured | FrameGrabber.h | |
bool HasOutstandingFrames() |
Check whether we have any outstanding frames or not | FrameGrabber.h | |
bool IsCapturingFrames() |
Check whether we're capturing frames or not | FrameGrabber.h | |
void Shutdown() |
Shut down this grabber, ensuring that any threaded operations are finished | FrameGrabber.h | |
void StartCapturingFrames() |
Instruct the frame grabber to start capturing frames | FrameGrabber.h | |
void StopCapturingFrames() |
Stop capturing frames | FrameGrabber.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void OnBackBufferReadyToPresentCallback
(
SWindow& SlateWindow, |
Callback for when a backbuffer is ready for reading (called on render thread) | FrameGrabber.h | |
void OnFrameReady
(
int32 SurfaceIndex, |
Called when the specified surface index has been locked for reading with the render target data (called on render thread) | FrameGrabber.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FFrameGrabber & operator=
(
const FFrameGrabber& |
FrameGrabber.h |