Navigation
API > API/Plugins > API/Plugins/MediaIOCore
Implements a base player for hardware IO cards.
The processing of metadata and video frames is delayed until the fetch stage (TickFetch) in order to increase the window of opportunity for receiving frames for the current render frame time code.
Depending on whether the media source enables time code synchronization, the player's current play time (CurrentTime) is derived either from the time codes embedded in frames or from the Engine's global time code.
| Name | FMediaIOCorePlayerBase |
| Type | class |
| Header File | /Engine/Plugins/Media/MediaIOFramework/Source/MediaIOCore/Public/MediaIOCorePlayerBase.h |
| Include Path | #include "MediaIOCorePlayerBase.h" |
Syntax
class FMediaIOCorePlayerBase :
public IMediaPlayer ,
protected IMediaCache ,
protected IMediaControls ,
protected IMediaTracks ,
protected IMediaView ,
public ITimedDataInput ,
public TSharedFromThis< FMediaIOCorePlayerBase >
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FMediaIOCorePlayerBase
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMediaIOCorePlayerBase
(
IMediaEventSink& InEventSink |
Create and initialize a new instance. | MediaIOCorePlayerBase.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMediaIOCorePlayerBase() |
Virtual destructor. | MediaIOCorePlayerBase.h |
Classes
| Name | Remarks |
|---|---|
| FFrameInfo | Class used to pass information about current frame for sample picking. |
| FJITRMediaTextureSamples | Special JITR sample container, overrides FetchVideo to return a ProxySample that will be populated by JustInTimeSampleRender_RenderThread. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bJustInTimeRender | bool | Is Just-In-Time Rendering enabled | MediaIOCorePlayerBase.h | |
| Deinterlacer | TSharedPtr< UE::MediaIOCore::FDeinterlacer > | Utility object to handle deinterlacing. | MediaIOCorePlayerBase.h | |
| GPUTextureTransfer | UE::GPUTextureTransfer::TextureTransferPtr | GPU Texture transfer object | MediaIOCorePlayerBase.h | |
| JITRSamples | const TUniquePtr< FJITRMediaTextureSamples > | JITR samples proxy | MediaIOCorePlayerBase.h | |
| RegisteredBuffers | TSet< void * > | Buffers Registered with GPU Texture Transfer | MediaIOCorePlayerBase.h | |
| RegisteredTextures | TSet< TRefCountPtr< FRHITexture > > | Textures registerd with GPU Texture transfer. | MediaIOCorePlayerBase.h | |
| Textures | TArray< TRefCountPtr< FRHITexture > > | Pool of textures available for GPU Texture transfer. | MediaIOCorePlayerBase.h | |
| TexturesCriticalSection | FCriticalSection | Critical section to control access to the pool. | MediaIOCorePlayerBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const FMediaIOCoreSamples & GetSamples () |
MediaIOCorePlayerBase.h | ||
virtual bool JustInTimeSampleRender_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Just in time sample rendering. | MediaIOCorePlayerBase.h | |
bool JustInTimeSampleRender_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
Deprecated in UE5.5. | MediaIOCorePlayerBase.h | |
virtual void TickTimeManagement() |
MediaIOCorePlayerBase.h |
Overridden from IMediaPlayer
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Close() |
MediaIOCorePlayerBase.h | ||
virtual IMediaCache & GetCache() |
MediaIOCorePlayerBase.h | ||
virtual IMediaControls & GetControls() |
MediaIOCorePlayerBase.h | ||
virtual FString GetInfo() |
MediaIOCorePlayerBase.h | ||
virtual IMediaSamples & GetSamples () |
MediaIOCorePlayerBase.h | ||
virtual FString GetStats() |
MediaIOCorePlayerBase.h | ||
virtual IMediaTracks & GetTracks() |
MediaIOCorePlayerBase.h | ||
virtual FString GetUrl() |
MediaIOCorePlayerBase.h | ||
virtual IMediaView & GetView() |
MediaIOCorePlayerBase.h | ||
virtual bool Open
(
const FString& Url, |
MediaIOCorePlayerBase.h | ||
virtual bool Open
(
const TSharedRef< FArchive, ESPMode::ThreadSafe >& Archive, |
MediaIOCorePlayerBase.h | ||
| MediaIOCorePlayerBase.h |
Overridden from IMediaCache
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual int32 GetSampleCount
(
EMediaCacheState State |
MediaIOCorePlayerBase.h | ||
virtual bool QueryCacheState
(
EMediaCacheState State, |
MediaIOCorePlayerBase.h |
Overridden from ITimedDataInput
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddChannel
(
ITimedDataInputChannel* Channel |
MediaIOCorePlayerBase.h | ||
virtual TArray< ITimedDataInputChannel * > GetChannels() |
MediaIOCorePlayerBase.h | ||
virtual FText GetDisplayName() |
MediaIOCorePlayerBase.h | ||
virtual double GetEvaluationOffsetInSeconds() |
MediaIOCorePlayerBase.h | ||
virtual ETimedDataInputEvaluationType GetEvaluationType() |
MediaIOCorePlayerBase.h | ||
virtual FFrameRate GetFrameRate() |
MediaIOCorePlayerBase.h | ||
virtual bool IsDataBufferSizeControlledByInput() |
MediaIOCorePlayerBase.h | ||
virtual void RemoveChannel
(
ITimedDataInputChannel* Channel |
MediaIOCorePlayerBase.h | ||
virtual void SetEvaluationOffsetInSeconds
(
double Offset |
MediaIOCorePlayerBase.h | ||
virtual void SetEvaluationType
(
ETimedDataInputEvaluationType Evaluation |
MediaIOCorePlayerBase.h | ||
virtual bool SupportsSubFrames() |
MediaIOCorePlayerBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedPtr< FMediaIOCoreTextureSampleBase > AcquireJITRProxySampleInitialized() |
Acquire a proxy sample for JITR. That sample must be initialized for JITR. | MediaIOCorePlayerBase.h | |
TSharedPtr< FMediaIOCoreTextureSampleBase > AcquireTextureSample_AnyThread() |
Factory method to generate texture samples. | MediaIOCorePlayerBase.h | |
void AddAudioSample
(
const TSharedRef< FMediaIOCoreAudioSampleBase >& Sample |
Internal API to push an audio sample to the internal samples pool | MediaIOCorePlayerBase.h | |
void AddCaptionSample
(
const TSharedRef< FMediaIOCoreCaptionSampleBase >& Sample |
Internal API to push a caption sample to the internal samples pool | MediaIOCorePlayerBase.h | |
void AddMetadataSample
(
const TSharedRef< FMediaIOCoreBinarySampleBase >& Sample |
Internal API to push a metadata sample to the internal samples pool | MediaIOCorePlayerBase.h | |
void AddSubtitleSample
(
const TSharedRef< FMediaIOCoreSubtitleSampleBase >& Sample |
Internal API to push a subtitle sample to the internal samples pool | MediaIOCorePlayerBase.h | |
void AddVideoSample
(
const TSharedRef< FMediaIOCoreTextureSampleBase >& Sample |
Internal API to push a video sample to the internal samples pool | MediaIOCorePlayerBase.h | |
virtual void AddVideoSampleAfterGPUTransfer_RenderThread
(
const TSharedRef< FMediaIOCoreTextureSampleBase >& Sample |
Called after fast GPUDirect texture transferring is finished | MediaIOCorePlayerBase.h | |
virtual bool CanUseGPUTextureTransfer() |
Whether fast GPU transferring is available | MediaIOCorePlayerBase.h | |
virtual TSharedPtr< FMediaIOCoreTextureSampleConverter > CreateTextureSampleConverter() |
Factory method to create sample converters. | MediaIOCorePlayerBase.h | |
TArray< TSharedRef< FMediaIOCoreTextureSampleBase > > Deinterlace
(
const UE::MediaIOCore::FVideoFrame& InVideoFrame |
Deinterlace a video frame. Only valid to call when the video stream is open. | MediaIOCorePlayerBase.h | |
virtual EMediaIOCoreColorFormat GetColorFormat() |
MediaIOCorePlayerBase.h | ||
virtual uint32 GetNumVideoFrameBuffers() |
Get the number of video frames to buffer. | MediaIOCorePlayerBase.h | |
bool HasTextureAvailableForGPUTransfer() |
Whether a texture availabled for GPU transfer | MediaIOCorePlayerBase.h | |
bool IsHardwareReady() |
Is the IO hardware/device ready to be used. | MediaIOCorePlayerBase.h | |
virtual bool IsJustInTimeRenderingEnabled() |
Whether JITR is available and active | MediaIOCorePlayerBase.h | |
void NotifyVideoFormatDetected () |
Allows children to notify when video format is known after auto-detection. | MediaIOCorePlayerBase.h | |
virtual TSharedPtr< FMediaIOCoreTextureSampleBase > PickSampleToRender_RenderThread
(
const FFrameInfo& InFrameInformation |
Pick a sample to render | MediaIOCorePlayerBase.h | |
virtual TSharedPtr< FMediaIOCoreTextureSampleBase > PickSampleToRenderForLatest_RenderThread
(
const FFrameInfo& InFrameInformation |
MediaIOCorePlayerBase.h | ||
virtual TSharedPtr< FMediaIOCoreTextureSampleBase > PickSampleToRenderForTimeSynchronized_RenderThread
(
const FFrameInfo& InFrameInformation |
MediaIOCorePlayerBase.h | ||
virtual TSharedPtr< FMediaIOCoreTextureSampleBase > PickSampleToRenderFramelocked_RenderThread
(
const FFrameInfo& InFrameInformation |
MediaIOCorePlayerBase.h | ||
virtual bool ReadMediaOptions
(
const IMediaOptions* Options |
Return true if the options combination are valid. | MediaIOCorePlayerBase.h | |
void SetupSampleChannels () |
Setup settings for the different kind of supported data channels. | MediaIOCorePlayerBase.h | |
void TransferTexture_RenderThread
(
FRHICommandListImmediate& RHICmdList, |
A wrapper method responsible for transferring of the sample textures into GPU memory based on the current settings and hardware capabilities. | MediaIOCorePlayerBase.h |
Overridden from IMediaControls
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanControl
(
EMediaControl Control |
MediaIOCorePlayerBase.h | ||
virtual FTimespan GetDuration() |
MediaIOCorePlayerBase.h | ||
virtual float GetRate() |
MediaIOCorePlayerBase.h | ||
virtual EMediaState GetState() |
MediaIOCorePlayerBase.h | ||
virtual EMediaStatus GetStatus() |
MediaIOCorePlayerBase.h | ||
virtual TRangeSet< float > GetSupportedRates
(
EMediaRateThinning Thinning |
MediaIOCorePlayerBase.h | ||
virtual FTimespan GetTime() |
MediaIOCorePlayerBase.h | ||
virtual bool IsLooping() |
MediaIOCorePlayerBase.h | ||
virtual bool Seek
(
const FTimespan& Time |
MediaIOCorePlayerBase.h | ||
virtual bool SetLooping
(
bool Looping |
MediaIOCorePlayerBase.h | ||
virtual bool SetRate
(
float Rate |
MediaIOCorePlayerBase.h |
Overridden from IMediaTracks
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool GetAudioTrackFormat
(
int32 TrackIndex, |
MediaIOCorePlayerBase.h | ||
virtual int32 GetNumTrackFormats
(
EMediaTrackType TrackType, |
MediaIOCorePlayerBase.h | ||
virtual int32 GetNumTracks
(
EMediaTrackType TrackType |
MediaIOCorePlayerBase.h | ||
virtual int32 GetSelectedTrack
(
EMediaTrackType TrackType |
MediaIOCorePlayerBase.h | ||
virtual FText GetTrackDisplayName
(
EMediaTrackType TrackType, |
MediaIOCorePlayerBase.h | ||
virtual int32 GetTrackFormat
(
EMediaTrackType TrackType, |
MediaIOCorePlayerBase.h | ||
virtual FString GetTrackLanguage
(
EMediaTrackType TrackType, |
MediaIOCorePlayerBase.h | ||
virtual FString GetTrackName
(
EMediaTrackType TrackType, |
MediaIOCorePlayerBase.h | ||
virtual bool GetVideoTrackFormat
(
int32 TrackIndex, |
MediaIOCorePlayerBase.h | ||
virtual bool SelectTrack
(
EMediaTrackType TrackType, |
MediaIOCorePlayerBase.h | ||
virtual bool SetTrackFormat
(
EMediaTrackType TrackType, |
MediaIOCorePlayerBase.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static double GetApplicationSeconds () |
Get the application time with a delta to represent the actual system time. | MediaIOCorePlayerBase.h | |
static double GetPlatformSeconds () |
Get the platform time with a delta to represent the actual system time. | MediaIOCorePlayerBase.h | |
static bool IsTimecodeLogEnabled() |
Log the timecode when a frame is received. | MediaIOCorePlayerBase.h |