2019-12-26 14:45:42 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2019-02-27 11:57:17 -05:00
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "Modules/ModuleInterface.h"
|
|
|
|
|
#include "Modules/ModuleManager.h"
|
|
|
|
|
#include "GameplayMediaEncoderCommon.h"
|
2019-11-26 17:28:51 -05:00
|
|
|
#include "GameplayMediaEncoder.h"
|
2019-02-27 11:57:17 -05:00
|
|
|
|
|
|
|
|
class FGameplayMediaEncoderModule : public IModuleInterface
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
FGameplayMediaEncoderModule()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-26 17:28:51 -05:00
|
|
|
~FGameplayMediaEncoderModule()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StartupModule() override
|
|
|
|
|
{
|
|
|
|
|
FModuleManager::Get().LoadModule(TEXT("AVEncoder"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ShutdownModule() override
|
|
|
|
|
{
|
|
|
|
|
// If the FGameplayMediaEncoder instance was created, then explicitly destroy it here
|
|
|
|
|
// instead of waiting for the automatic cleanup, since at that point some objects
|
|
|
|
|
// it depends to for a clean shutdown are not available any longer.
|
2024-03-14 20:30:26 -04:00
|
|
|
PRAGMA_DISABLE_DEPRECATION_WARNINGS
|
2023-08-16 14:28:25 -04:00
|
|
|
FGameplayMediaEncoder::Singleton.Reset();
|
2024-03-14 20:30:26 -04:00
|
|
|
PRAGMA_ENABLE_DEPRECATION_WARNINGS
|
2019-11-26 17:28:51 -05:00
|
|
|
}
|
2024-03-14 20:30:26 -04:00
|
|
|
|
2019-11-26 17:28:51 -05:00
|
|
|
private:
|
2019-02-27 11:57:17 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_MODULE(FGameplayMediaEncoderModule, GameplayMediaEncoder);
|
|
|
|
|
|