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