FMediaIOCorePlayerBase

Inheritance Hierarchy

Syntax

class FMediaIOCorePlayerBase :
    public IMediaPlayer ,
    protected IMediaCache ,
    protected IMediaControls ,
    protected IMediaTracks ,
    protected IMediaView ,
    public FSelfRegisteringExec

Remarks

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.

Variables

Name Description

Protected variable

FMediaAudioTrac ...

 

AudioTrackFormat

Format of the audio

Protected variable

bool

 

bIsTimecodeLogEnable

Enable timecode logging

Protected variable

bool

 

bUseTimeSynchronization

Whether to use the Synchronization Time module as time source.

Protected variable

FCriticalSectio ...

 

CriticalSection

Critical section for synchronizing access to receiver and sinks.

Protected variable

EMediaState

 

CurrentState

Current state of the media player.

Protected variable

FTimespan

 

CurrentTime

Current playback time.

Protected variable

IMediaEventSink ...

 

EventSink

The media event handler.

Protected variable

FString

 

OpenUrl

Url used to open the media player

Protected variable

FTimespan

 

PreviousFrameTimespan

Previous frame Timespan

Protected variable

FMediaIOCoreSam ...

 

Samples

The media sample cache.

Protected variable

FFrameRate

 

VideoFrameRate

Video frame rate in the last received sample.

Protected variable

FMediaVideoTrac ...

 

VideoTrackFormat

Format of the video

Constructors

Name Description

Public function

FMediaIOCorePlayerBase

(
    IMediaEventSink & InEventSink
)

Create and initialize a new instance.

Destructors

Name Description

Public function Virtual

~FMediaIOCorePlayerBase()

Virtual destructor.

Functions

Name Description

Public function

const FMedia ...

 

GetSamples()

Protected function

bool

 

IsHardwareReady()

Protected function Virtual

bool

 

ReadMediaOptions

(
    const IMediaOptions * Options
)

Return true if the options combination are valid

Public function Virtual

void

 

TickTimeManagement()

Overridden from IMediaPlayer

Name Description

Public function Virtual

void

 

Close()

Close a previously opened media source.

Public function Virtual

IMediaCache ...

 

GetCache()

Get the player's cache controls.

Public function Virtual

IMediaContro ...

 

GetControls()

Get the player's playback controls.

Public function Virtual

FString

 

GetInfo()

Get debug information about the player and currently opened media.

Public function Virtual

IMediaSample ...

 

GetSamples()

Get the player's sample queue.

Public function Virtual

FString

 

GetStats()

Get playback statistics information.

Public function Virtual

IMediaTracks ...

 

GetTracks()

Get the player's track collection.

Public function Virtual

FString

 

GetUrl()

Get the URL of the currently loaded media.

Public function Virtual

IMediaView &

 

GetView()

Get the player's view settings.

Public function Virtual

bool

 

Open

(
    const FString & Url,
    const IMediaOptions * Options
)

Open a media source from a URL with optional parameters.

Public function Virtual

bool

 

Open

(
    const TSharedRef < FArchive , ESPMode ...,
    const FString & OriginalUrl,
    const IMediaOptions * Options
)

Open a media source from a file or memory archive with optional parameters.

Overridden from IMediaCache

Name Description

Public function Virtual

int32

 

GetSampleCount

(
    EMediaCacheState State
)

Query the number of samples for the specified caching state.

Public function Virtual

bool

 

QueryCacheState

(
    EMediaCacheState State,
    TRangeSet < FTimespan >& OutTimeRan...
)

Query the time ranges of cached media samples for the specified caching state.

Overridden from IMediaControls

Name Description

Protected function Virtual

bool

 

CanControl

(
    EMediaControl Control
)

Whether the specified control is currently available.

Protected function Virtual

FTimespan

 

GetDuration()

Get the media's duration.

Protected function Virtual

float

 

GetRate()

Get the nominal playback rate, i.e. 1.0 for real time.

Protected function Virtual

EMediaState

 

GetState()

Get the state of the media.

Protected function Virtual

EMediaStatus

 

GetStatus()

Get media player status flags.

Protected function Virtual

TRangeSet < f...

 

GetSupportedRates

(
    EMediaRateThinning Thinning
)

Get the supported playback rates.

Protected function Virtual

FTimespan

 

GetTime()

Get the player's current playback time.

Protected function Virtual

bool

 

IsLooping()

Check whether playback is currently looping.

Protected function Virtual

bool

 

Seek

(
    const FTimespan & Time
)

Change the media's playback time.

Protected function Virtual

bool

 

SetLooping

(
    bool Looping
)

Set whether playback should be looping.

Protected function Virtual

bool

 

SetRate

(
    float Rate
)

Set the current playback rate.

Overridden from IMediaTracks

Name Description

Protected function Virtual

bool

 

GetAudioTrackFormat

(
    int32 TrackIndex,
    int32 FormatIndex,
    FMediaAudioTrackFormat & OutFormat
)

Get details about the specified audio track format.

Protected function Virtual

int32

 

GetNumTrackFormats

(
    EMediaTrackType TrackType,
    int32 TrackIndex
)

Get the number of formats of the specified track.

Protected function Virtual

int32

 

GetNumTracks

(
    EMediaTrackType TrackType
)

Get the number of media tracks of the given type.

Protected function Virtual

int32

 

GetSelectedTrack

(
    EMediaTrackType TrackType
)

Get the index of the currently selected track of the given type.

Protected function Virtual

FText

 

GetTrackDisplayName

(
    EMediaTrackType TrackType,
    int32 TrackIndex
)

Get the human readable name of the specified track.

Protected function Virtual

int32

 

GetTrackFormat

(
    EMediaTrackType TrackType,
    int32 TrackIndex
)

Get the index of the currently selected format of the given track type.

Protected function Virtual

FString

 

GetTrackLanguage

(
    EMediaTrackType TrackType,
    int32 TrackIndex
)

Get the language tag of the specified track.

Protected function Virtual

FString

 

GetTrackName

(
    EMediaTrackType TrackType,
    int32 TrackIndex
)

Get the internal name of the specified track.

Protected function Virtual

bool

 

GetVideoTrackFormat

(
    int32 TrackIndex,
    int32 FormatIndex,
    FMediaVideoTrackFormat & OutFormat
)

Get details about the specified video track format.

Protected function Virtual

bool

 

SelectTrack

(
    EMediaTrackType TrackType,
    int32 TrackIndex
)

Select the active track of the given type.

Protected function Virtual

bool

 

SetTrackFormat

(
    EMediaTrackType TrackType,
    int32 TrackIndex,
    int32 FormatIndex
)

Select the active format on the specified track.

Overridden from FExec

Name Description

Protected function Virtual

bool

 

Exec

(
    UWorld * InWorld,
    const TCHAR * Cmd,
    FOutputDevice & Ar
)

Exec handler

References

Module

MediaIOCore