Files
UnrealEngineUWP/Engine/Source/Runtime/MediaUtils/Private/MediaHelpers.cpp

81 lines
2.8 KiB
C++
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
Copying //UE4/Dev-Sequencer to //UE4/Main (Source: //UE4/Dev-Sequencer @ 3631098) #lockdown nick.penwarden #rb none Change 3618690 on 2017/08/30 by Max.Preussner Media: Pass-through of global timecode in tick Change 3620659 on 2017/08/31 by Max.Preussner WmfMedia: Added string conversion for stream marker types; updated documentation Change 3620663 on 2017/08/31 by Max.Preussner MediaUtils: Always queuing up media events to prevent application from interfering with player state during event callbacks Change 3620878 on 2017/08/31 by Max.Preussner Media: Using correct parameter for printing pointers Change 3621327 on 2017/08/31 by Max.Preussner Core: Added TQueue.Pop Change 3621419 on 2017/08/31 by Chris.Babcock Skip some mediaplayer calls if not prepared and check for completion in stopped state #jira UE-49054 Change 3622023 on 2017/09/01 by Max.Chen Sequencer: Fix regression where spawnables don't play because they're defined as temporary editor actors. #jira UE-48923 Change 3622433 on 2017/09/01 by Chris.Babcock Reorder Android media player suspend and playbackendreached events so stop is first Change 3622568 on 2017/09/01 by Max.Chen Media Player: Move sinks and player guid to PostInitProperties instead of PostLoad to fix issues with newly created players. #jira UE-49160 Change 3622678 on 2017/09/01 by Max.Chen Actor Sequence: Move runtime to plugins. #jira UE-45752 Change 3623243 on 2017/09/01 by Max.Preussner MfMedia: Resetting media characteristics before trying to reinitialize them Change 3623246 on 2017/09/01 by Max.Preussner WmfMedia: Fixed media characteristics not updated when opening media without tracks selected #jira UE-49214 Change 3623675 on 2017/09/01 by Max.Preussner MediaUtils: Fixed multichannel downmixing Change 3623747 on 2017/09/01 by Max.Preussner WmfMedia: Removed still images from list of supported streams as they require special handling that is currently not implemented Change 3623757 on 2017/09/01 by Max.Preussner WmfMedia: Added missing string conversion for Playing state Change 3623793 on 2017/09/01 by Max.Chen Sequencer: Fix ensure when deleting sections. Sections were getting removed from the array during iteration. #jira UE-49220 Change 3623797 on 2017/09/01 by Max.Chen Sequencer: Add transactions to easing type and setting changes. #jira UE-49209 Change 3623924 on 2017/09/02 by Max.Preussner Media: Renamed IMediaPlayer::GetName to GetPlayerName Change 3623931 on 2017/09/02 by Max.Preussner Media: Added IMediaPlayer::GetMediaName Change 3623962 on 2017/09/02 by Max.Preussner WmfMedia: Consistent logging format Change 3623963 on 2017/09/02 by Max.Preussner MfMedia: Consistent logging format Change 3624190 on 2017/09/03 by Max.Preussner MediaUtils: Made sink overflow log messages a compile option Change 3624412 on 2017/09/04 by Richard.Wallis Trivial fix for Mac Audio Mixer playback through engine using current AV implementation. This fixes up what is already there to get us back to a working Mac Media playback via engine. Although it is still disabled just in case this stream is at a time/feature critical point. Just remove the && 0 in the AUDIO_PLAYBACK_VIA_ENGINE define at the top of AvfMediaTracks.cpp. Change 3624769 on 2017/09/04 by Max.Preussner WmfMedia: Fixed some subtle issues with session state changes & track switching Change 3624811 on 2017/09/04 by Max.Preussner WmfMedia: Not compiling WMF related libraries on dedicated server Change 3624813 on 2017/09/04 by Max.Preussner WmfMedia: Added utility function to copy MF attributes Change 3624941 on 2017/09/05 by Max.Chen Sequencer: Added slip functionality for sections. Hold down shift and drag the section left and right (as if you were moving it). #jira UE-24929 Change 3625131 on 2017/09/05 by Andrew.Rodham Media: Fixed optional parameter name not being loaded properly for external texture uniform expressions Change 3625547 on 2017/09/05 by Max.Preussner AudioMixer: Fixed crash due to legacy int16 audio buffer not initialized Change 3625569 on 2017/09/05 by Max.Chen Cine Camera: Added GetFilmbackPresetName(), SetFilmbackPresetByName(), GetLensPresetName(), SetLensPresetByName(). #jira UE-48967 Change 3625668 on 2017/09/05 by Max.Chen Sequence Recorder: Add drag and drop functionality to sequence recorder #jira UE-49072 Change 3625738 on 2017/09/05 by Max.Preussner WmfMedia: showing possible image streams that may be incorrectly returned as video streams in media info Change 3625751 on 2017/09/05 by Max.Preussner WmfMedia: Restarting session from beginning on track switching if media doesn't support seeking Change 3625869 on 2017/09/05 by Andrew.Rodham Sequencer: Fixed crash caused by manipulating selection while iterating Change 3625884 on 2017/09/05 by Andrew.Rodham Sequencer: Optimization pass on key and trajectory rendering when dealing with large numbers of tracks and/or keys - Memory is reserved where possible on hot code paths - Reduced amount of sorting and shuffling of arrays where possible - Key collections (and thus key groups) are now cacheable so we don't have to regenerate them every frame - Reduced amount of overdraw on keys in sequencer UI - Added editor preference to limit the number of keys shown around the current time when rendering trajectories in the editor (default=250) - Optimized various algorithms used for key introspection and manipulation - Overlapping keys are now highlighted with a red border #jira UE-42018 Change 3626270 on 2017/09/05 by Max.Preussner WmfMedia: Added utility function to dump out media type attributes Change 3626274 on 2017/09/05 by Max.Preussner WmfMedia: Dumping media type attributes in very verbose debug log Change 3626275 on 2017/09/05 by Max.Preussner WmfMedia: Clearing pending topologies before setting new one Change 3626440 on 2017/09/05 by Max.Preussner WmfMedia: Resolving stream format types and interlace modes in attribute dump Change 3626719 on 2017/09/05 by Max.Preussner MediaAssets: Exposed the OnTracksChanged event on media player assets Change 3626806 on 2017/09/05 by Chris.Babcock Fix error returns from rungradle.bat and ant.bat #jira UE-49305 Change 3626915 on 2017/09/05 by Chris.Babcock Only use immersive mode if enabled on Android #jira UE-49308 Change 3626980 on 2017/09/05 by Max.Preussner MediaAssets: Renamed capture device enumeration filters from Unspecified to Unknown Change 3627333 on 2017/09/05 by Max.Preussner MediaUtils: Added utility functions for converting common enum values to string Change 3627702 on 2017/09/06 by Andrew.Rodham Sequencer: Fixed crash caused by erroneous persistent references to FSequencer - Also added an ensure to FSequencer::Tick to ensure this doesn't happen again #jira UE-48647 #jira UE-48383 #jira UE-47661 Change 3628000 on 2017/09/06 by Andrew.Rodham Sequencer: Changed ensure for a message log warning #jira UE-49245 Change 3628548 on 2017/09/06 by Max.Preussner MediaUtils: Logging media events in player facade Change 3629189 on 2017/09/06 by Max.Preussner WmfMedia: Selecting default format and track when initializing media source #jira UE-49214 Change 3629207 on 2017/09/06 by Max.Preussner MfMedia: Selecting default format when initializing media source Change 3629256 on 2017/09/06 by Max.Preussner MediaUtils: Fixed sample queue count not decremented on Pop #jira UE-49372 [CL 3631147 by Max Chen in Main branch]
2017-09-07 15:02:48 -04:00
#include "MediaHelpers.h"
#include "IMediaControls.h"
#include "IMediaEventSink.h"
#include "IMediaTracks.h"
namespace MediaUtils
{
FString EventToString(EMediaEvent Event)
{
switch (Event)
{
case EMediaEvent::MediaBuffering: return TEXT("MediaBuffering");
case EMediaEvent::MediaClosed: return TEXT("MediaClosed");
case EMediaEvent::MediaConnecting: return TEXT("MediaConnecting");
case EMediaEvent::MediaOpened: return TEXT("MediaOpened");
case EMediaEvent::MediaOpenFailed: return TEXT("MediaOpenFailed");
case EMediaEvent::PlaybackEndReached: return TEXT("PlaybackEndReached");
case EMediaEvent::PlaybackResumed: return TEXT("PlaybackResumed");
case EMediaEvent::PlaybackSuspended: return TEXT("PlaybackSuspended");
case EMediaEvent::SeekCompleted: return TEXT("SeekCompleted");
case EMediaEvent::TracksChanged: return TEXT("TracksChanged");
case EMediaEvent::MetadataChanged: return TEXT("MetadataChanged");
Copying //UE4/Dev-Sequencer to //UE4/Main (Source: //UE4/Dev-Sequencer @ 3631098) #lockdown nick.penwarden #rb none Change 3618690 on 2017/08/30 by Max.Preussner Media: Pass-through of global timecode in tick Change 3620659 on 2017/08/31 by Max.Preussner WmfMedia: Added string conversion for stream marker types; updated documentation Change 3620663 on 2017/08/31 by Max.Preussner MediaUtils: Always queuing up media events to prevent application from interfering with player state during event callbacks Change 3620878 on 2017/08/31 by Max.Preussner Media: Using correct parameter for printing pointers Change 3621327 on 2017/08/31 by Max.Preussner Core: Added TQueue.Pop Change 3621419 on 2017/08/31 by Chris.Babcock Skip some mediaplayer calls if not prepared and check for completion in stopped state #jira UE-49054 Change 3622023 on 2017/09/01 by Max.Chen Sequencer: Fix regression where spawnables don't play because they're defined as temporary editor actors. #jira UE-48923 Change 3622433 on 2017/09/01 by Chris.Babcock Reorder Android media player suspend and playbackendreached events so stop is first Change 3622568 on 2017/09/01 by Max.Chen Media Player: Move sinks and player guid to PostInitProperties instead of PostLoad to fix issues with newly created players. #jira UE-49160 Change 3622678 on 2017/09/01 by Max.Chen Actor Sequence: Move runtime to plugins. #jira UE-45752 Change 3623243 on 2017/09/01 by Max.Preussner MfMedia: Resetting media characteristics before trying to reinitialize them Change 3623246 on 2017/09/01 by Max.Preussner WmfMedia: Fixed media characteristics not updated when opening media without tracks selected #jira UE-49214 Change 3623675 on 2017/09/01 by Max.Preussner MediaUtils: Fixed multichannel downmixing Change 3623747 on 2017/09/01 by Max.Preussner WmfMedia: Removed still images from list of supported streams as they require special handling that is currently not implemented Change 3623757 on 2017/09/01 by Max.Preussner WmfMedia: Added missing string conversion for Playing state Change 3623793 on 2017/09/01 by Max.Chen Sequencer: Fix ensure when deleting sections. Sections were getting removed from the array during iteration. #jira UE-49220 Change 3623797 on 2017/09/01 by Max.Chen Sequencer: Add transactions to easing type and setting changes. #jira UE-49209 Change 3623924 on 2017/09/02 by Max.Preussner Media: Renamed IMediaPlayer::GetName to GetPlayerName Change 3623931 on 2017/09/02 by Max.Preussner Media: Added IMediaPlayer::GetMediaName Change 3623962 on 2017/09/02 by Max.Preussner WmfMedia: Consistent logging format Change 3623963 on 2017/09/02 by Max.Preussner MfMedia: Consistent logging format Change 3624190 on 2017/09/03 by Max.Preussner MediaUtils: Made sink overflow log messages a compile option Change 3624412 on 2017/09/04 by Richard.Wallis Trivial fix for Mac Audio Mixer playback through engine using current AV implementation. This fixes up what is already there to get us back to a working Mac Media playback via engine. Although it is still disabled just in case this stream is at a time/feature critical point. Just remove the && 0 in the AUDIO_PLAYBACK_VIA_ENGINE define at the top of AvfMediaTracks.cpp. Change 3624769 on 2017/09/04 by Max.Preussner WmfMedia: Fixed some subtle issues with session state changes & track switching Change 3624811 on 2017/09/04 by Max.Preussner WmfMedia: Not compiling WMF related libraries on dedicated server Change 3624813 on 2017/09/04 by Max.Preussner WmfMedia: Added utility function to copy MF attributes Change 3624941 on 2017/09/05 by Max.Chen Sequencer: Added slip functionality for sections. Hold down shift and drag the section left and right (as if you were moving it). #jira UE-24929 Change 3625131 on 2017/09/05 by Andrew.Rodham Media: Fixed optional parameter name not being loaded properly for external texture uniform expressions Change 3625547 on 2017/09/05 by Max.Preussner AudioMixer: Fixed crash due to legacy int16 audio buffer not initialized Change 3625569 on 2017/09/05 by Max.Chen Cine Camera: Added GetFilmbackPresetName(), SetFilmbackPresetByName(), GetLensPresetName(), SetLensPresetByName(). #jira UE-48967 Change 3625668 on 2017/09/05 by Max.Chen Sequence Recorder: Add drag and drop functionality to sequence recorder #jira UE-49072 Change 3625738 on 2017/09/05 by Max.Preussner WmfMedia: showing possible image streams that may be incorrectly returned as video streams in media info Change 3625751 on 2017/09/05 by Max.Preussner WmfMedia: Restarting session from beginning on track switching if media doesn't support seeking Change 3625869 on 2017/09/05 by Andrew.Rodham Sequencer: Fixed crash caused by manipulating selection while iterating Change 3625884 on 2017/09/05 by Andrew.Rodham Sequencer: Optimization pass on key and trajectory rendering when dealing with large numbers of tracks and/or keys - Memory is reserved where possible on hot code paths - Reduced amount of sorting and shuffling of arrays where possible - Key collections (and thus key groups) are now cacheable so we don't have to regenerate them every frame - Reduced amount of overdraw on keys in sequencer UI - Added editor preference to limit the number of keys shown around the current time when rendering trajectories in the editor (default=250) - Optimized various algorithms used for key introspection and manipulation - Overlapping keys are now highlighted with a red border #jira UE-42018 Change 3626270 on 2017/09/05 by Max.Preussner WmfMedia: Added utility function to dump out media type attributes Change 3626274 on 2017/09/05 by Max.Preussner WmfMedia: Dumping media type attributes in very verbose debug log Change 3626275 on 2017/09/05 by Max.Preussner WmfMedia: Clearing pending topologies before setting new one Change 3626440 on 2017/09/05 by Max.Preussner WmfMedia: Resolving stream format types and interlace modes in attribute dump Change 3626719 on 2017/09/05 by Max.Preussner MediaAssets: Exposed the OnTracksChanged event on media player assets Change 3626806 on 2017/09/05 by Chris.Babcock Fix error returns from rungradle.bat and ant.bat #jira UE-49305 Change 3626915 on 2017/09/05 by Chris.Babcock Only use immersive mode if enabled on Android #jira UE-49308 Change 3626980 on 2017/09/05 by Max.Preussner MediaAssets: Renamed capture device enumeration filters from Unspecified to Unknown Change 3627333 on 2017/09/05 by Max.Preussner MediaUtils: Added utility functions for converting common enum values to string Change 3627702 on 2017/09/06 by Andrew.Rodham Sequencer: Fixed crash caused by erroneous persistent references to FSequencer - Also added an ensure to FSequencer::Tick to ensure this doesn't happen again #jira UE-48647 #jira UE-48383 #jira UE-47661 Change 3628000 on 2017/09/06 by Andrew.Rodham Sequencer: Changed ensure for a message log warning #jira UE-49245 Change 3628548 on 2017/09/06 by Max.Preussner MediaUtils: Logging media events in player facade Change 3629189 on 2017/09/06 by Max.Preussner WmfMedia: Selecting default format and track when initializing media source #jira UE-49214 Change 3629207 on 2017/09/06 by Max.Preussner MfMedia: Selecting default format when initializing media source Change 3629256 on 2017/09/06 by Max.Preussner MediaUtils: Fixed sample queue count not decremented on Pop #jira UE-49372 [CL 3631147 by Max Chen in Main branch]
2017-09-07 15:02:48 -04:00
case EMediaEvent::Internal_PurgeVideoSamplesHint: return TEXT("Internal: PurgeVideoSamplesHint");
case EMediaEvent::Internal_ResetForDiscontinuity: return TEXT("Internal: ResetForDiscontinuity");
case EMediaEvent::Internal_RenderClockStart: return TEXT("Internal: RenderClockStart");
case EMediaEvent::Internal_RenderClockStop: return TEXT("Internal: RenderClockStop");
case EMediaEvent::Internal_VideoSamplesAvailable: return TEXT("Internal: VideoSamplesAvailable");
case EMediaEvent::Internal_VideoSamplesUnavailable: return TEXT("Internal: VideoSamplesUnavailable");
case EMediaEvent::Internal_AudioSamplesAvailable: return TEXT("Internal: AudioSamplesAvailable");
case EMediaEvent::Internal_AudioSamplesUnavailable: return TEXT("Internal: AudioSamplesUnavailable");
Copying //UE4/Dev-Sequencer to //UE4/Main (Source: //UE4/Dev-Sequencer @ 3631098) #lockdown nick.penwarden #rb none Change 3618690 on 2017/08/30 by Max.Preussner Media: Pass-through of global timecode in tick Change 3620659 on 2017/08/31 by Max.Preussner WmfMedia: Added string conversion for stream marker types; updated documentation Change 3620663 on 2017/08/31 by Max.Preussner MediaUtils: Always queuing up media events to prevent application from interfering with player state during event callbacks Change 3620878 on 2017/08/31 by Max.Preussner Media: Using correct parameter for printing pointers Change 3621327 on 2017/08/31 by Max.Preussner Core: Added TQueue.Pop Change 3621419 on 2017/08/31 by Chris.Babcock Skip some mediaplayer calls if not prepared and check for completion in stopped state #jira UE-49054 Change 3622023 on 2017/09/01 by Max.Chen Sequencer: Fix regression where spawnables don't play because they're defined as temporary editor actors. #jira UE-48923 Change 3622433 on 2017/09/01 by Chris.Babcock Reorder Android media player suspend and playbackendreached events so stop is first Change 3622568 on 2017/09/01 by Max.Chen Media Player: Move sinks and player guid to PostInitProperties instead of PostLoad to fix issues with newly created players. #jira UE-49160 Change 3622678 on 2017/09/01 by Max.Chen Actor Sequence: Move runtime to plugins. #jira UE-45752 Change 3623243 on 2017/09/01 by Max.Preussner MfMedia: Resetting media characteristics before trying to reinitialize them Change 3623246 on 2017/09/01 by Max.Preussner WmfMedia: Fixed media characteristics not updated when opening media without tracks selected #jira UE-49214 Change 3623675 on 2017/09/01 by Max.Preussner MediaUtils: Fixed multichannel downmixing Change 3623747 on 2017/09/01 by Max.Preussner WmfMedia: Removed still images from list of supported streams as they require special handling that is currently not implemented Change 3623757 on 2017/09/01 by Max.Preussner WmfMedia: Added missing string conversion for Playing state Change 3623793 on 2017/09/01 by Max.Chen Sequencer: Fix ensure when deleting sections. Sections were getting removed from the array during iteration. #jira UE-49220 Change 3623797 on 2017/09/01 by Max.Chen Sequencer: Add transactions to easing type and setting changes. #jira UE-49209 Change 3623924 on 2017/09/02 by Max.Preussner Media: Renamed IMediaPlayer::GetName to GetPlayerName Change 3623931 on 2017/09/02 by Max.Preussner Media: Added IMediaPlayer::GetMediaName Change 3623962 on 2017/09/02 by Max.Preussner WmfMedia: Consistent logging format Change 3623963 on 2017/09/02 by Max.Preussner MfMedia: Consistent logging format Change 3624190 on 2017/09/03 by Max.Preussner MediaUtils: Made sink overflow log messages a compile option Change 3624412 on 2017/09/04 by Richard.Wallis Trivial fix for Mac Audio Mixer playback through engine using current AV implementation. This fixes up what is already there to get us back to a working Mac Media playback via engine. Although it is still disabled just in case this stream is at a time/feature critical point. Just remove the && 0 in the AUDIO_PLAYBACK_VIA_ENGINE define at the top of AvfMediaTracks.cpp. Change 3624769 on 2017/09/04 by Max.Preussner WmfMedia: Fixed some subtle issues with session state changes & track switching Change 3624811 on 2017/09/04 by Max.Preussner WmfMedia: Not compiling WMF related libraries on dedicated server Change 3624813 on 2017/09/04 by Max.Preussner WmfMedia: Added utility function to copy MF attributes Change 3624941 on 2017/09/05 by Max.Chen Sequencer: Added slip functionality for sections. Hold down shift and drag the section left and right (as if you were moving it). #jira UE-24929 Change 3625131 on 2017/09/05 by Andrew.Rodham Media: Fixed optional parameter name not being loaded properly for external texture uniform expressions Change 3625547 on 2017/09/05 by Max.Preussner AudioMixer: Fixed crash due to legacy int16 audio buffer not initialized Change 3625569 on 2017/09/05 by Max.Chen Cine Camera: Added GetFilmbackPresetName(), SetFilmbackPresetByName(), GetLensPresetName(), SetLensPresetByName(). #jira UE-48967 Change 3625668 on 2017/09/05 by Max.Chen Sequence Recorder: Add drag and drop functionality to sequence recorder #jira UE-49072 Change 3625738 on 2017/09/05 by Max.Preussner WmfMedia: showing possible image streams that may be incorrectly returned as video streams in media info Change 3625751 on 2017/09/05 by Max.Preussner WmfMedia: Restarting session from beginning on track switching if media doesn't support seeking Change 3625869 on 2017/09/05 by Andrew.Rodham Sequencer: Fixed crash caused by manipulating selection while iterating Change 3625884 on 2017/09/05 by Andrew.Rodham Sequencer: Optimization pass on key and trajectory rendering when dealing with large numbers of tracks and/or keys - Memory is reserved where possible on hot code paths - Reduced amount of sorting and shuffling of arrays where possible - Key collections (and thus key groups) are now cacheable so we don't have to regenerate them every frame - Reduced amount of overdraw on keys in sequencer UI - Added editor preference to limit the number of keys shown around the current time when rendering trajectories in the editor (default=250) - Optimized various algorithms used for key introspection and manipulation - Overlapping keys are now highlighted with a red border #jira UE-42018 Change 3626270 on 2017/09/05 by Max.Preussner WmfMedia: Added utility function to dump out media type attributes Change 3626274 on 2017/09/05 by Max.Preussner WmfMedia: Dumping media type attributes in very verbose debug log Change 3626275 on 2017/09/05 by Max.Preussner WmfMedia: Clearing pending topologies before setting new one Change 3626440 on 2017/09/05 by Max.Preussner WmfMedia: Resolving stream format types and interlace modes in attribute dump Change 3626719 on 2017/09/05 by Max.Preussner MediaAssets: Exposed the OnTracksChanged event on media player assets Change 3626806 on 2017/09/05 by Chris.Babcock Fix error returns from rungradle.bat and ant.bat #jira UE-49305 Change 3626915 on 2017/09/05 by Chris.Babcock Only use immersive mode if enabled on Android #jira UE-49308 Change 3626980 on 2017/09/05 by Max.Preussner MediaAssets: Renamed capture device enumeration filters from Unspecified to Unknown Change 3627333 on 2017/09/05 by Max.Preussner MediaUtils: Added utility functions for converting common enum values to string Change 3627702 on 2017/09/06 by Andrew.Rodham Sequencer: Fixed crash caused by erroneous persistent references to FSequencer - Also added an ensure to FSequencer::Tick to ensure this doesn't happen again #jira UE-48647 #jira UE-48383 #jira UE-47661 Change 3628000 on 2017/09/06 by Andrew.Rodham Sequencer: Changed ensure for a message log warning #jira UE-49245 Change 3628548 on 2017/09/06 by Max.Preussner MediaUtils: Logging media events in player facade Change 3629189 on 2017/09/06 by Max.Preussner WmfMedia: Selecting default format and track when initializing media source #jira UE-49214 Change 3629207 on 2017/09/06 by Max.Preussner MfMedia: Selecting default format when initializing media source Change 3629256 on 2017/09/06 by Max.Preussner MediaUtils: Fixed sample queue count not decremented on Pop #jira UE-49372 [CL 3631147 by Max Chen in Main branch]
2017-09-07 15:02:48 -04:00
// no default case; all cases must be implemented!
}
return TEXT("Unknown");
}
FString StateToString(EMediaState State)
{
switch (State)
{
case EMediaState::Closed: return TEXT("Closed");
case EMediaState::Error: return TEXT("Error");
case EMediaState::Paused: return TEXT("Paused");
case EMediaState::Playing: return TEXT("Playing");
case EMediaState::Preparing: return TEXT("Preparing");
case EMediaState::Stopped: return TEXT("Stopped");
// no default case; all cases must be implemented!
}
return TEXT("Unknown");
}
FString TrackTypeToString(EMediaTrackType TrackType)
{
switch (TrackType)
{
case EMediaTrackType::Audio: return TEXT("Audio");
case EMediaTrackType::Caption: return TEXT("Caption");
case EMediaTrackType::Metadata: return TEXT("Metadata");
case EMediaTrackType::Script: return TEXT("Script");
case EMediaTrackType::Subtitle: return TEXT("Subtitle");
case EMediaTrackType::Text: return TEXT("Text");
case EMediaTrackType::Video: return TEXT("Video");
// no default case; all cases must be implemented!
}
return TEXT("Unknown");
}
}