dolphin/Source/Core/VideoCommon/FrameDump.h

36 lines
756 B
C
Raw Normal View History

// Copyright 2008 Dolphin Emulator Project
2015-05-17 23:08:10 +00:00
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include "Common/CommonTypes.h"
class FrameDump
{
2014-06-15 03:29:05 +00:00
private:
static bool CreateVideoFile();
static void CloseVideoFile();
2016-06-25 02:41:10 +00:00
static void CheckResolution(int width, int height);
2014-10-04 07:28:01 +00:00
2014-06-15 03:29:05 +00:00
public:
struct Frame
{
u64 ticks = 0;
u32 ticks_per_second = 0;
bool first_frame = false;
int savestate_index = 0;
};
2016-10-08 14:23:04 +00:00
static bool Start(int w, int h);
static void AddFrame(const u8* data, int width, int height, int stride, const Frame& state);
static void Stop();
static void DoState();
2017-05-22 19:27:10 +00:00
#if defined(HAVE_FFMPEG)
static Frame FetchState(u64 ticks);
#else
static Frame FetchState(u64 ticks) { return {}; }
#endif
};