// $Id: $ #ifndef AVIRECORDER_HH #define AVIRECORDER_HH #include "Command.hh" #include "EmuTime.hh" #include #include #include namespace openmsx { class Reactor; class VideoSourceSetting; class AviWriter; class WavWriter; class PostProcessor; class MSXMixer; class Scheduler; class AviRecorder : private SimpleCommand { public: AviRecorder(Reactor& reactor); ~AviRecorder(); void addWave(unsigned num, short* data); void addImage(const void** lines, const EmuTime& time); void stop(); private: void start(bool recordAudio, bool recordVideo, const std::string& filename); virtual std::string execute(const std::vector& tokens); virtual std::string help(const std::vector& tokens) const; virtual void tabCompletion(std::vector& tokens) const; std::string processStart(const std::vector& tokens); std::string processStop(const std::vector& tokens); std::string processToggle(const std::vector& tokens); Reactor& reactor; std::vector audioBuf; std::auto_ptr aviWriter; std::auto_ptr wavWriter; PostProcessor* postProcessor1; PostProcessor* postProcessor2; MSXMixer* mixer; Scheduler* scheduler; double frameDuration; unsigned sampleRate; bool warnedFps; bool warnedSampleRate; EmuDuration duration; EmuTime prevTime; }; } // namespace openmsx #endif