Mesen-SX/Utilities/GifRecorder.h
NovaSquirrel c0e249e993 Revert "Merge branch 'reformat_code'"
This reverts commit daf3b57e89, reversing
changes made to 7a6e0b7d77.
2021-03-10 11:13:28 -05:00

25 lines
No EOL
718 B
C++

#pragma once
#include "stdafx.h"
#include "../Utilities/IVideoRecorder.h"
struct GifWriter;
class GifRecorder : public IVideoRecorder
{
private:
std::unique_ptr<GifWriter> _gif;
bool _recording = false;
uint32_t _frameCounter = 0;
string _outputFile;
public:
GifRecorder();
virtual ~GifRecorder();
bool StartRecording(string filename, uint32_t width, uint32_t height, uint32_t bpp, uint32_t audioSampleRate, double fps) override;
void StopRecording() override;
void AddFrame(void* frameBuffer, uint32_t width, uint32_t height, double fps) override;
void AddSound(int16_t* soundBuffer, uint32_t sampleCount, uint32_t sampleRate) override;
bool IsRecording() override;
string GetOutputFile() override;
};