Interface for media players. 更多...
#include <IMediaPlayer.h>
Public 类型 | |
| enum class | EFeatureFlag { AllowShutdownOnClose = 0 , UsePlaybackTimingV2 , UseRealtimeWithVideoOnly , AlwaysPullNewestVideoFrame } |
Public 成员函数 | |
| virtual void | Close ()=0 |
| Close a previously opened media source. 更多... | |
| virtual bool | FlushOnSeekCompleted () const |
| Flush sinks when seek ends 更多... | |
| virtual bool | FlushOnSeekStarted () const |
| Flush sinks when seek begins 更多... | |
| virtual IMediaCache & | GetCache ()=0 |
| Get the player's cache controls. 更多... | |
| virtual IMediaControls & | GetControls ()=0 |
| Get the player's playback controls. 更多... | |
| virtual FString | GetInfo () const =0 |
| Get debug information about the player and currently opened media. 更多... | |
| virtual FText | GetMediaName () const |
| Get the human readable name of the currently loaded media source. 更多... | |
| virtual FGuid | GetPlayerPluginGUID () const =0 |
| Get the GUID for this player plugin. 更多... | |
| virtual IMediaSamples & | GetSamples ()=0 |
| Get the player's sample queue. 更多... | |
| virtual FString | GetStats () const =0 |
| Get playback statistics information. 更多... | |
| virtual IMediaTracks & | GetTracks ()=0 |
| Get the player's track collection. 更多... | |
| virtual FString | GetUrl () const =0 |
| Get the URL of the currently loaded media. 更多... | |
| virtual IMediaView & | GetView ()=0 |
| Get the player's view settings. 更多... | |
| virtual bool | Open (const FString &Url, const IMediaOptions *Options)=0 |
| Open a media source from a URL with optional parameters. 更多... | |
| virtual bool | Open (const FString &Url, const IMediaOptions *Options, const FMediaPlayerOptions *PlayerOptions) |
| Open a media source from a URL with optional asset and player parameters. | |
| virtual bool | Open (const TSharedRef< FArchive, ESPMode::ThreadSafe > &Archive, const FString &OriginalUrl, const IMediaOptions *Options)=0 |
| Open a media source from a file or memory archive with optional parameters. 更多... | |
| virtual void | ProcessVideoSamples () |
| Any extra processing that the player should do when FMediaPlayerFacade::ProcessVideoSamples is run should be put here. | |
| virtual void | SetGuid (const FGuid &Guid) |
| Set the player's globally unique identifier. 更多... | |
| virtual void | SetLastAudioRenderedSampleTime (FTimespan SampleTime) |
| Notify player of last sample time of audio used. 更多... | |
| virtual bool | SetNativeVolume (float Volume) |
| Set the player's native volume if supported. 更多... | |
| virtual void | TickAudio () |
| Tick the player's audio related code. 更多... | |
| virtual void | TickFetch (FTimespan DeltaTime, FTimespan Timecode) |
| Tick the player in the Fetch phase. 更多... | |
| virtual void | TickInput (FTimespan DeltaTime, FTimespan Timecode) |
| Tick the player in the Input phase. 更多... | |
| virtual | ~IMediaPlayer () |
| Virtual destructor. | |
Interface for media players.
|
strong |
|
pure virtual |
Close a previously opened media source.
Call this method to free up all resources associated with an opened media source. If no media is open, this function has no effect.
The media may not necessarily be closed after this function succeeds, because closing may happen asynchronously. Subscribe to the MediaClosed event to detect when the media finished closing. This events is only triggered if Close returns true.
|
inlinevirtual |
Flush sinks when seek ends
|
inlinevirtual |
Flush sinks when seek begins
|
pure virtual |
Get the player's cache controls.
The interface returned by this method must remain valid for the player's life time.
|
pure virtual |
Get the player's playback controls.
The interface returned by this method must remain valid for the player's life time.
|
pure virtual |
|
inlinevirtual |
Get the human readable name of the currently loaded media source.
Depending on the type of media source, this might be the name of a file, the display name of a capture device, or some other identifying string. If the player does not provide a specialized implementation for this method, the media name will be derived from the current media URL.
|
pure virtual |
Get the GUID for this player plugin.
|
pure virtual |
Get the player's sample queue.
The interface returned by this method must remain valid for the player's life time.
|
pure virtual |
|
pure virtual |
Get the player's track collection.
The interface returned by this method must remain valid for the player's life time.
|
pure virtual |
Get the URL of the currently loaded media.
|
pure virtual |
Get the player's view settings.
The interface returned by this method must remain valid for the player's life time.
|
pure virtual |
Open a media source from a URL with optional parameters.
The media may not necessarily be opened after this function succeeds, because opening may happen asynchronously. Subscribe to the MediaOpened and MediaOpenFailed events to detect when the media finished or failed to open. These events are only triggered if Open returns true.
The optional parameters can be used to configure aspects of media playback and are specific to the type of media source and the underlying player. Check their documentation for available keys and values.
| Url | The URL of the media to open (file name or web address). |
| Options | Optional media parameters. |
|
pure virtual |
Open a media source from a file or memory archive with optional parameters.
The media may not necessarily be opened after this function succeeds, because opening may happen asynchronously. Subscribe to the MediaOpened and MediaOpenFailed events to detect when the media finished or failed to open. These events are only triggered if Open returns true.
The optional parameters can be used to configure aspects of media playback and are specific to the type of media source and the underlying player. Check their documentation for available keys and values.
| Archive | The archive holding the media data. |
| OriginalUrl | The original URL of the media that was loaded into the buffer. |
| Options | Optional media parameters. |
|
inlinevirtual |
Set the player's globally unique identifier.
| Guid | The GUID to set. |
|
inlinevirtual |
Notify player of last sample time of audio used.
| SampleTime | The last audio sample dequeued by one of the audio sinks. |
|
inlinevirtual |
Set the player's native volume if supported.
| Volume | The volume to set. |
|
inlinevirtual |