Navigation
Unreal Engine C++ API Reference > Plugins > MediaIOCore
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UMediaCapture
- UAjaMediaCapture
- UBlackmagicMediaCapture
- UFileMediaCapture
- URemoteSessionMediaCapture
- URivermaxMediaCapture
- USharedMemoryMediaCapture
References
Module | MediaIOCore |
Header | /Engine/Plugins/Media/MediaIOFramework/Source/MediaIOCore/Public/MediaCapture.h |
Include | #include "MediaCapture.h" |
Syntax
UCLASS&40;Abstract, EditInlineNew, BlueprintType, HideCategories&61;&40;Object&41;&41;
class UMediaCapture : public UObject
Remarks
Abstract base class for media capture.
MediaCapture capture the texture of the Render target or the SceneViewport and sends it to an external media device. MediaCapture should be created by a MediaOutput.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
FAudioDeviceHandle | AudioDeviceHandle | Audio device to be captured. If none, main engine's audio device is captured. |
![]() |
EMediaCaptureSourceType | CaptureSourceType | Type of capture currently being done. i.e Viewport, RT, RHI Resource |
![]() |
FIntPoint | DesiredOutputSize | Output size of the media capture. |
![]() ![]() ![]() |
TObjectPtr< UMediaOutput > | MediaOutput | MediaOutput associated with this capture |
![]() |
FMediaCaptureOutputSynchronization | OnOutputSynchronization | Called when output data is ready to be sent out. |
![]() ![]() ![]() ![]() |
FMediaCaptureStateChangedSignature | OnStateChanged | Called when the state of the capture changed. |
![]() |
FMediaCaptureStateChangedSignatureNative | OnStateChangedNative | Called when the state of the capture changed. |
![]() |
std::atomic< FRHIGPUMask > | ValidSourceGPUMask | Valid source gpu mask of the source. |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Default constructor / destructor to use forward declared uniqueptr |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | BeforeFrameCaptured_RenderingThread
(
const FCaptureBaseData& InBaseData, |
Called at the beginning of the Capture_RenderThread call if output resource type is Buffer |
![]() ![]() |
void | BeforeFrameCaptured_RenderingThread
(
const FCaptureBaseData& InBaseData, |
Called at the beginning of the Capture_RenderThread call if output resource type is Texture |
![]() ![]() ![]() |
bool | CaptureActiveSceneViewport
(
FMediaCaptureOptions CaptureOptions |
Stop the current capture if there is one. |
![]() |
void | CaptureImmediate_RenderThread
(
FRDGBuilder& GraphBuilder, |
|
![]() |
void | CaptureImmediate_RenderThread
(
FRDGBuilder& GraphBuilder, |
Captures a resource immediately from the render thread. Used in RHI_RESOURCE capture mode |
![]() |
bool | CaptureRHITexture
(
const FRHICaptureResourceDescription& ResourceDescription, |
Stop the actual capture if there is one. |
![]() |
bool | CaptureSceneViewport
(
TSharedPtr< FSceneViewport >& SceneViewport, |
Stop the actual capture if there is one. |
![]() ![]() ![]() |
bool | CaptureTextureRenderTarget2D
(
UTextureRenderTarget2D* RenderTarget, |
Stop the actual capture if there is one. |
![]() ![]() |
const FAudioDeviceHandle & | Get the audio device to capture. | |
![]() ![]() |
TSharedPtr< FMediaCaptureUserData, ESPMode::ThreadSafe > | Capture the data that will pass along to the callback. | |
![]() ![]() |
FString | ||
![]() ![]() |
TSharedPtr< FSceneViewport > | ||
![]() ![]() |
EMediaCaptureConversionOperation | ||
![]() ![]() ![]() |
FRDGBufferDesc | GetCustomBufferDescription
(
const FIntPoint& InDesiredSize |
Get the desired output buffer description when the conversion is custom and operating in buffer resource type |
![]() ![]() ![]() |
EPixelFormat | GetCustomOutputPixelFormat
(
const EPixelFormat& InPixelFormat |
Get the pixel format of the buffer when the conversion operation is custom. |
![]() ![]() ![]() |
EMediaCaptureResourceType | Get the desired output resource type when the conversion is custom. | |
![]() ![]() ![]() |
FIntPoint | GetCustomOutputSize
(
const FIntPoint& InSize |
Get the size of the buffer when the conversion operation is custom. |
![]() ![]() |
const FMediaCaptureOptions & | Get the capture options specified by the user. | |
![]() ![]() ![]() ![]() |
EPixelFormat | Get the desired pixel format of the current capture. | |
![]() ![]() ![]() ![]() |
FIntPoint | Get the desired size of the current capture. | |
![]() ![]() |
FString | Get the name of the media output that created this capture. | |
![]() ![]() ![]() |
const FMatrix & | Get the RGB to YUV Conversion Matrix, should be overriden for media outputs that support different color gamuts (ie. BT 2020). | |
![]() ![]() ![]() ![]() ![]() |
EMediaCaptureState | GetState () |
Get the current state of the capture. |
![]() ![]() |
const TSet< EPixelFormat > & | ||
![]() ![]() |
UTextureRenderTarget2D * | ||
![]() ![]() ![]() |
bool | Check whether this capture has any processing left to do. | |
![]() ![]() |
bool | Initialization method to prepare implementation for capture | |
![]() ![]() ![]() |
bool | Returns true if media capture implementation supports synchronization logic. | |
![]() ![]() |
void | LockDMATexture_RenderThread
(
FTextureRHIRef InTexture |
|
![]() ![]() |
void | OnCustomCapture_RenderingThread
(
FRDGBuilder& GraphBuilder, |
Callback when the source texture is ready to be copied on the GPU. |
![]() ![]() |
void | OnCustomCapture_RenderingThread
(
FRDGBuilder& GraphBuilder, |
Callback when the source texture is ready to be copied on the GPU. |
![]() ![]() |
void | OnFrameCaptured_AnyThread
(
const FCaptureBaseData& InBaseData, |
Callback when the buffer was successfully copied to CPU ram. |
![]() ![]() |
void | OnFrameCaptured_RenderingThread
(
const FCaptureBaseData& InBaseData, |
Callback when the buffer was successfully copied to CPU ram. |
![]() ![]() |
void | OnRHIResourceCaptured_AnyThread
(
const FCaptureBaseData& InBaseData, |
|
![]() ![]() |
void | OnRHIResourceCaptured_AnyThread
(
const FCaptureBaseData& InBaseData, |
AnyThread version of the above callbacks. |
![]() ![]() |
void | OnRHIResourceCaptured_RenderingThread
(
const FCaptureBaseData& InBaseData, |
|
![]() ![]() |
void | OnRHIResourceCaptured_RenderingThread
(
const FCaptureBaseData& InBaseData, |
Callbacks when the buffer was successfully copied on the GPU ram. |
![]() ![]() |
bool | PostInitializeCaptureRenderTarget
(
UTextureRenderTarget2D* InRenderTarget |
Called after initialize for render target capture type |
![]() ![]() |
bool | PostInitializeCaptureRHIResource
(
const FRHICaptureResourceDescription& InResourceDescription |
Called after initialize for rhi resource capture type |
![]() ![]() |
bool | PostInitializeCaptureViewport
(
TSharedPtr< FSceneViewport >& InSceneViewport |
Called after initialize for viewport capture type |
![]() |
void | ResetFixedViewportSize
(
TSharedPtr< FSceneViewport > InViewport, |
|
![]() |
void | ||
![]() |
bool | SetCaptureAudioDevice
(
const FAudioDeviceHandle& InAudioDeviceHandle |
Set the audio device to capture. |
![]() |
void | SetFixedViewportSize
(
TSharedPtr< FSceneViewport > InSceneViewport, |
|
![]() ![]() ![]() |
void | SetMediaOutput
(
UMediaOutput* InMediaOutput |
Set the media output. Can only be set when the capture is stopped. |
![]() |
void | SetState
(
EMediaCaptureState InNewState |
|
![]() ![]() |
void | SetValidSourceGPUMask
(
FRHIGPUMask GPUMask |
Set the valid GPU mask of the source buffer/texture being captured. Can be called from any thread. |
![]() ![]() ![]() |
bool | Should we call OnFrameCaptured_RenderingThread() with a RHI resource -or- readback the memory to CPU ram and call OnFrameCaptured_RenderingThread(). | |
![]() ![]() ![]() |
void | StopCapture
(
bool bAllowPendingFrameToBeProcess |
Stop the previous requested capture. |
![]() ![]() |
void | StopCaptureImpl
(
bool bAllowPendingFrameToBeProcess |
|
![]() ![]() ![]() |
bool | Whether the capture callbacks can be called on any thread. | |
![]() ![]() ![]() |
bool | Whether the capture implementation supports restarting on input format change. | |
![]() ![]() |
void | UnlockDMATexture_RenderThread
(
FTextureRHIRef InTexture |
|
![]() ![]() |
bool | UpdateAudioDeviceImpl
(
const FAudioDeviceHandle& InAudioDeviceHandle |
|
![]() ![]() |
bool | UpdateRenderTargetImpl
(
UTextureRenderTarget2D* InRenderTarget |
|
![]() |
bool | UpdateSceneViewport
(
TSharedPtr< FSceneViewport >& SceneViewport |
Update the current capture with a SceneViewport. |
![]() ![]() |
bool | UpdateSceneViewportImpl
(
TSharedPtr< FSceneViewport >& InSceneViewport |
|
![]() ![]() ![]() |
bool | UpdateTextureRenderTarget2D
(
UTextureRenderTarget2D* RenderTarget |
Update the current capture with every frame for a TextureRenderTarget2D. |
![]() ![]() ![]() |
bool |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | BeginDestroy () |
Called before destroying the object. |
![]() ![]() |
FString | GetDesc () |
Return a one line description of an object for viewing in the thumbnail view of the generic browser |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FCaptureBaseData | ||
![]() |
FMediaCaptureResourceData | Args passed to OnFrameCaptured |
Constants
Name | Description |
---|---|
MaxCaptureDataAgeInFrames |
Deprecated Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
bool | CaptureRenderTargetImpl
(
UTextureRenderTarget2D* InRenderTarget |
This method has been deprecated. Please override InitializeCapture() and PostInitializeCapture variants if needed instead. |
![]() ![]() |
bool | CaptureSceneViewportImpl
(
TSharedPtr< FSceneViewport >& InSceneViewport |
This method has been deprecated. Please override InitializeCapture() and PostInitializeCapture variants if needed instead. |
![]() ![]() |
void | OnRHITextureCaptured_RenderingThread
(
const FCaptureBaseData& InBaseData, |
OnRHITextureCaptured_RenderingThread has been deprecated to support texture and buffer output resource. Please use OnRHIResourceCaptured_RenderingThread instead. |
![]() ![]() ![]() |
bool | ShouldCaptureRHITexture has been deprecated to support both texture and buffer output resource. Please use the ShouldCaptureRHIResource instead. |