forked from SourMesen/Mesen-S
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRecordApiWrapper.cpp
29 lines (25 loc) · 1.38 KB
/
RecordApiWrapper.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "stdafx.h"
#include "../Core/Console.h"
#include "../Core/VideoRenderer.h"
#include "../Core/SoundMixer.h"
#include "../Core/MovieManager.h"
extern shared_ptr<Console> _console;
enum class VideoCodec;
extern "C"
{
DllExport void __stdcall AviRecord(char* filename, VideoCodec codec, uint32_t compressionLevel) { _console->GetVideoRenderer()->StartRecording(filename, codec, compressionLevel); }
DllExport void __stdcall AviStop() { _console->GetVideoRenderer()->StopRecording(); }
DllExport bool __stdcall AviIsRecording() { return _console->GetVideoRenderer()->IsRecording(); }
DllExport void __stdcall WaveRecord(char* filename) { _console->GetSoundMixer()->StartRecording(filename); }
DllExport void __stdcall WaveStop() { _console->GetSoundMixer()->StopRecording(); }
DllExport bool __stdcall WaveIsRecording() { return _console->GetSoundMixer()->IsRecording(); }
DllExport void __stdcall MoviePlay(char* filename) { _console->GetMovieManager()->Play(string(filename)); }
DllExport void __stdcall MovieStop() { _console->GetMovieManager()->Stop(); }
DllExport bool __stdcall MoviePlaying() { return _console->GetMovieManager()->Playing(); }
DllExport bool __stdcall MovieRecording() { return _console->GetMovieManager()->Recording(); }
DllExport void __stdcall MovieRecord(RecordMovieOptions *options)
{
RecordMovieOptions opt = *options;
_console->GetMovieManager()->Record(opt);
}
}