Files
UnrealEngineUWP/Engine/Source/Runtime/MediaAssets/Private/Assets/MediaSource.cpp
Max Chen 27e1dc3ed0 Copying //UE4/Dev-Sequencer to //UE4/Dev-Main (Source: //UE4/Dev-Sequencer @ 3057646)
#lockdown Nick.Penwarden
#rb none

==========================
MAJOR FEATURES + CHANGES
==========================

Change 2840895 on 2016/01/23 by Max.Chen

	Sequencer: Moved key proxy handling from section into key area; added support for grouped keys; exposed color properties in context menu.

Change 2937981 on 2016/04/08 by Max.Chen

	Sequencer: Refactored GetKeyHandles to take a time range for filtering keys

Change 3051834 on 2016/07/15 by Max.Chen

	Sequencer: Adjust tooltips for autokeying and key all to be more descriptive.

	#jira UE-33081

Change 3053057 on 2016/07/17 by Max.Chen

	Sequencer: String track editor

	#jira UE-32141

Change 3053083 on 2016/07/18 by Max.Chen

	Sequence Recorder: Add an option to maximize the viewport when starting recording.

Change 3053084 on 2016/07/18 by Max.Chen

	Added UnmapAction to FUICommandList

	Sequencer uses this to re-hook into the level editor commands without issue when it re-opens.

Change 3053085 on 2016/07/18 by Max.Chen

	Sequence Recorder: Display name of next sequence in sequence recorder

	Also display on-screen during countdown

Change 3053086 on 2016/07/18 by Max.Chen

	Sequence Recorder: Improved recording indicator icon, text & timer

	Also fixed a bug with record/stop button where they would not show/enable correctly if no animations were being recorded for a sequence.

Change 3053089 on 2016/07/18 by Max.Chen

	Sequencer: Added hotkey for recording selected actors

	Alt+R now records selected actor into sequencer.

Change 3055488 on 2016/07/19 by Max.Chen

	Sequencer: Fixed NotifyCameraCut() being erroneously called every frame (in FSequencer), and not being called at all in ULevelSequencePlayer

Change 3056783 on 2016/07/19 by Max.Preussner

	PS4Media: Attempting to fix playlist advance on PS4 (UE-33481)

	#jira UE-33481

[CL 3057666 by Max Chen in Main branch]
2016-07-20 10:38:29 -04:00

108 lines
2.1 KiB
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#include "MediaAssetsPCH.h"
#include "MediaSource.h"
/* UMediaSource interface
*****************************************************************************/
FString UMediaSource::GetDesiredPlayer() const
{
#if WITH_EDITORONLY_DATA
const FString RunningPlatformName(FPlatformProperties::IniPlatformName());
const FString* PlatformPlayer = PlatformPlayers.Find(RunningPlatformName);
if (PlatformPlayer != nullptr)
{
return *PlatformPlayer;
}
#endif
return DefaultPlayer;
}
/* UObject interface
*****************************************************************************/
void UMediaSource::GetAssetRegistryTags(TArray<FAssetRegistryTag>& OutTags) const
{
FString Url = GetUrl();
if (!Url.IsEmpty())
{
OutTags.Add(FAssetRegistryTag("Url", Url, FAssetRegistryTag::TT_Alphabetical));
}
}
#if WITH_EDITOR
void UMediaSource::GetAssetRegistryTagMetadata(TMap<FName, FAssetRegistryTagMetadata>& OutMetadata) const
{
}
#endif
void UMediaSource::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
#if WITH_EDITORONLY_DATA
if (Ar.IsCooking())
{
const FString* PlatformPlayer = PlatformPlayers.Find(Ar.CookingTarget()->PlatformName());
if (PlatformPlayer != nullptr)
{
DefaultPlayer = *PlatformPlayer;
}
}
else
{
Ar << PlatformPlayers;
}
#endif
Ar << DefaultPlayer;
}
/* IMediaOptions interface
*****************************************************************************/
bool UMediaSource::GetMediaOption(const FName& Key, bool DefaultValue) const
{
return DefaultValue;
}
double UMediaSource::GetMediaOption(const FName& Key, double DefaultValue) const
{
return DefaultValue;
}
int64 UMediaSource::GetMediaOption(const FName& Key, int64 DefaultValue) const
{
return DefaultValue;
}
FString UMediaSource::GetMediaOption(const FName& Key, const FString& DefaultValue) const
{
return DefaultValue;
}
FText UMediaSource::GetMediaOption(const FName& Key, const FText& DefaultValue) const
{
return DefaultValue;
}
bool UMediaSource::HasMediaOption(const FName& Key) const
{
return false;
}