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