![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <IMediaPlayer.h>
Classes | |
| class | IAsyncResourceReleaseNotification |
Interface for media players.
| typedef TSharedRef<IAsyncResourceReleaseNotification, ESPMode::ThreadSafe> IMediaPlayer::IAsyncResourceReleaseNotificationRef |
|
strong |
| Enumerator | |
|---|---|
| AllowShutdownOnClose | Allow player to be shutdown right after 'close' event is received from it. |
| UsePlaybackTimingV2 | Use v2 playback timing and AV sync. |
| UseRealtimeWithVideoOnly | Use realtime rather then game deltatime to control video playback if no audio is present. |
| AlwaysPullNewestVideoFrame | Mediaframework will not gate video frame output with its own timing, but assumes "ASAP" as output time for every sample. |
| PlayerUsesInternalFlushOnSeek | The player implements an internal flush logic on seeks and Mediaframework will not issue an explicit Flush() call to it on seeks. |
| IsTrackSwitchSeamless | If track switching is seamless then a flush of sinks is not necessary. |
| PlayerSelectsDefaultTracks | Whether or not the player selects suitable track defaults. |
|
inlinevirtual |
Virtual destructor.
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.
Flush sinks when seek ends
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 |
Get debug information about the player and currently opened media.
Get information about the media that is playing.
| InfoName | Name of the information we want. |
|
inlinevirtual |
Gets the current metadata of the media source.
Metadata is optional and if present is typically a collection of key/value items without a well defined meaning. It may contain information on copyright, album name, artist and such, but the availability of any item is not mandatory and the representation will vary with the type of media. Interpretation therefor requires the application to be aware of the type of media being loaded and the possible metadata it may carry.
Metadata may change over time. Its presence or change is reported by a MetadataChanged event.
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.
|
inlinevirtual |
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. |
|
inlinevirtual |
Open a media source from a URL with optional asset and player 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 async resource release notification for use with IMediaPlayerLifecycleManagerDelegate
Set the player's globally unique identifier.
| Guid | The GUID to set. |
Notify player of last sample time of audio used.
| SampleTime | The last audio sample dequeued by one of the audio sinks. |
Set the player's native volume if supported.
| Volume | The volume to set. |