FrameDump: Start timing at 0 ticks when starting from boot

This commit is contained in:
JosJuice
2020-11-21 22:25:57 +01:00
parent 9b03cdf93e
commit d69f243c32
4 changed files with 28 additions and 24 deletions

View File

@ -23,6 +23,7 @@ public:
struct FrameState
{
u64 ticks = 0;
int frame_number = 0;
u32 savestate_index = 0;
int refresh_rate_num = 0;
int refresh_rate_den = 0;
@ -37,16 +38,16 @@ public:
FrameState state;
};
bool Start(int w, int h);
bool Start(int w, int h, u64 start_ticks);
void AddFrame(const FrameData&);
void Stop();
void DoState(PointerWrap&);
bool IsStarted() const;
FrameState FetchState(u64 ticks) const;
FrameState FetchState(u64 ticks, int frame_number) const;
private:
bool IsFirstFrameInCurrentFile() const;
bool PrepareEncoding(int w, int h);
bool PrepareEncoding(int w, int h, u64 start_ticks, u32 savestate_index);
bool CreateVideoFile();
void CloseVideoFile();
void CheckForConfigChange(const FrameData&);
@ -68,7 +69,7 @@ private:
inline FrameDump::FrameDump() = default;
inline FrameDump::~FrameDump() = default;
inline FrameDump::FrameState FrameDump::FetchState(u64 ticks) const
inline FrameDump::FrameState FrameDump::FetchState(u64 ticks, int frame_number) const
{
return {};
}