Add on_snoop Lua callback
[lsnes.git] / videodumper2.hpp
blobfdaa4952f6c2c0ab9933b69601533f57c8425e14
1 #ifndef _videodumper2__hpp__included__
2 #define _videodumper2__hpp__included__
4 #include <cstdint>
5 #include <iostream>
6 #include <fstream>
7 #include <vector>
8 #include <list>
9 #include <stdexcept>
10 #include "window.hpp"
11 #include "videodumper.hpp"
13 /**
14 * \brief End dumping.
16 * Forcibly ends dumping. Mainly useful for quitting.
18 * \throws std::bad_alloc Not enough memory.
19 * \throws std::runtime_error Failed to end dump.
21 void end_vid_dump() throw(std::bad_alloc, std::runtime_error);
23 /**
24 * \brief Dump a frame.
26 * Dumps a frame. Does nothing if dumping is not in progress.
28 * \param ls Screen to dump.
29 * \param rq Render queue to run.
30 * \param left Left border.
31 * \param right Right border.
32 * \param top Top border.
33 * \param bottom Bottom border.
34 * \param region True if PAL, false if NTSC.
35 * \param win Graphics system handle.
36 * \throws std::bad_alloc Not enough memory.
37 * \throws std::runtime_error Failed to dump frame.
39 void dump_frame(lcscreen& ls, render_queue* rq, uint32_t left, uint32_t right, uint32_t top, uint32_t bottom,
40 bool region, window* win) throw(std::bad_alloc, std::runtime_error);
42 /**
43 * \brief Dump sample of audio.
45 * Dumps one sample of audio. Does nothing if dumping is not in progress.
47 * \param l_sample Left channel sample (-32768-32767)
48 * \param r_sample Right channel sample (-32768-32767)
49 * \param win Graphics System handle.
50 * \throws std::bad_alloc Not enough memory.
51 * \throws std::runtime_error Failed to dump sample.
53 void dump_audio_sample(int16_t l_sample, int16_t r_sample, window* win) throw(std::bad_alloc, std::runtime_error);
55 /**
56 * \brief Is the dump in progress?
58 bool dump_in_progress() throw();
60 /**
61 * \brief Fill rendering shifts.
63 void video_fill_shifts(uint32_t& r, uint32_t& g, uint32_t& b);
65 #endif