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