You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This represents UE4/Main @ 16130047 and Dev-PerfTest @ 16126156 [CL 16163576 by aurel cordonnier in ue5-main branch]
43 lines
678 B
C++
43 lines
678 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "WmfPrivate.h"
|
|
|
|
#include "HAL/ThreadSafeBool.h"
|
|
#include "MediaPacket.h"
|
|
|
|
class FWmfRingBuffer
|
|
{
|
|
public:
|
|
FTimespan GetMaxDuration() const
|
|
{
|
|
return MaxDuration;
|
|
}
|
|
|
|
void SetMaxDuration(FTimespan InMaxDuration)
|
|
{
|
|
MaxDuration = InMaxDuration;
|
|
}
|
|
|
|
FTimespan GetDuration() const;
|
|
|
|
void Push(AVEncoder::FMediaPacket&& Sample);
|
|
|
|
void PauseCleanup(bool bPause);
|
|
|
|
TArray<AVEncoder::FMediaPacket> GetCopy();
|
|
|
|
void Reset();
|
|
|
|
private:
|
|
void Cleanup();
|
|
|
|
private:
|
|
FTimespan MaxDuration = 0;
|
|
TArray<AVEncoder::FMediaPacket> Samples;
|
|
FCriticalSection Mutex;
|
|
FThreadSafeBool bCleanupPaused = false;
|
|
};
|
|
|