blob: 9030dfae176aacd6635c9492993cf46b7ac3499c (
plain) (
blame)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
//============================================================
//
// aviwrite.h - AVI screenshot writer class
//
//============================================================
#pragma once
#ifndef __RENDER_AVIWRITE__
#define __RENDER_AVIWRITE__
#include "emu.h"
#include "aviio.h"
class running_machine;
class avi_write
{
public:
avi_write(running_machine& machine, uint32_t width, uint32_t height);
~avi_write();
void record(const char *name);
void stop();
void audio_frame(const int16_t *buffer, int samples_this_frame);
void video_frame(bitmap_rgb32& snap);
// Getters
bool recording() const { return m_recording; }
private:
void begin_avi_recording(const char *name);
void end_avi_recording();
running_machine& m_machine;
bool m_recording;
uint32_t m_width;
uint32_t m_height;
avi_file::ptr m_output_file;
int m_frame;
attotime m_frame_period;
attotime m_next_frame_time;
};
#endif // __RENDER_AVIWRITE__
|