UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FFrameGrabber Class Reference

#include <FrameGrabber.h>

Public Member Functions

MOVIESCENECAPTURE_API FFrameGrabber (TSharedRef< FSceneViewport > Viewport, FIntPoint DesiredBufferSize, EPixelFormat InPixelFormat=PF_B8G8R8A8, uint32 NumSurfaces=3)
 
MOVIESCENECAPTURE_API ~FFrameGrabber ()
 
MOVIESCENECAPTURE_API void StartCapturingFrames ()
 
MOVIESCENECAPTURE_API bool IsCapturingFrames () const
 
MOVIESCENECAPTURE_API void CaptureThisFrame (FFramePayloadPtr Payload)
 
MOVIESCENECAPTURE_API void StopCapturingFrames ()
 
MOVIESCENECAPTURE_API void Shutdown ()
 
MOVIESCENECAPTURE_API bool HasOutstandingFrames () const
 
MOVIESCENECAPTURE_API TArray< FCapturedFrameDataGetCapturedFrames ()
 

Protected Member Functions

MOVIESCENECAPTURE_API void OnBackBufferReadyToPresentCallback (SWindow &SlateWindow, const FTextureRHIRef &BackBuffer)
 
MOVIESCENECAPTURE_API void OnFrameReady (int32 SurfaceIndex, FColor *ColorBuffer, int32 Width, int32 Height)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FFrameGrabber()

FFrameGrabber::FFrameGrabber ( TSharedRef< FSceneViewport Viewport,
FIntPoint  DesiredBufferSize,
EPixelFormat  InPixelFormat = PF_B8G8R8A8,
uint32  NumSurfaces = 3 
)

Construct this frame grabber

Parameters
InViewportThe viewport we are to grab frames for
DesiredBufferSizeThe desired size of captured frames
InPixelFormatThe desired pixel format to store captured frames as
InNumSurfacesThe number of destination surfaces contained in our buffer

◆ ~FFrameGrabber()

FFrameGrabber::~FFrameGrabber ( )

Destructor

Member Function Documentation

◆ CaptureThisFrame()

void FFrameGrabber::CaptureThisFrame ( FFramePayloadPtr  Payload)

Instruct the frame grabber capture this frame, when it receives an event from slate

◆ GetCapturedFrames()

TArray< FCapturedFrameData > FFrameGrabber::GetCapturedFrames ( )

Retrieve any frames we may have captured

◆ HasOutstandingFrames()

bool FFrameGrabber::HasOutstandingFrames ( ) const

Check whether we have any outstanding frames or not

◆ IsCapturingFrames()

bool FFrameGrabber::IsCapturingFrames ( ) const

Check whether we're capturing frames or not

◆ OnBackBufferReadyToPresentCallback()

void FFrameGrabber::OnBackBufferReadyToPresentCallback ( SWindow SlateWindow,
const FTextureRHIRef BackBuffer 
)
protected

Callback for when a backbuffer is ready for reading (called on render thread)

◆ OnFrameReady()

void FFrameGrabber::OnFrameReady ( int32  SurfaceIndex,
FColor ColorBuffer,
int32  Width,
int32  Height 
)
protected

Called when the specified surface index has been locked for reading with the render target data (called on render thread)

◆ Shutdown()

void FFrameGrabber::Shutdown ( )

Shut down this grabber, ensuring that any threaded operations are finished

◆ StartCapturingFrames()

void FFrameGrabber::StartCapturingFrames ( )

Instruct the frame grabber to start capturing frames

◆ StopCapturingFrames()

void FFrameGrabber::StopCapturingFrames ( )

Stop capturing frames


The documentation for this class was generated from the following files: