mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-30 14:18:44 +00:00
AVIDump: Add a struct for the state.
So AddFrame use no global state and can be threaded well.
This commit is contained in:
parent
dad5041737
commit
be29090aae
9 changed files with 44 additions and 18 deletions
|
@ -14,8 +14,21 @@ private:
|
|||
static void CheckResolution(int width, int height);
|
||||
|
||||
public:
|
||||
struct Frame
|
||||
{
|
||||
u64 ticks = 0;
|
||||
u32 ticks_per_second = 0;
|
||||
bool first_frame = false;
|
||||
};
|
||||
|
||||
static bool Start(int w, int h);
|
||||
static void AddFrame(const u8* data, int width, int height, int stride, u64 ticks);
|
||||
static void AddFrame(const u8* data, int width, int height, int stride, const Frame& state);
|
||||
static void Stop();
|
||||
static void DoState();
|
||||
|
||||
#if defined(HAVE_LIBAV) || defined(_WIN32)
|
||||
static Frame FetchState(u64 ticks);
|
||||
#else
|
||||
static Frame FetchState(u64 ticks) { return {}; }
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue