openMSX
video
AviWriter.hh
Go to the documentation of this file.
1
// Code based on DOSBox-0.65
2
3
#ifndef AVIWRITER_HH
4
#define AVIWRITER_HH
5
6
#include "
ZMBVEncoder.hh
"
7
8
#include "
File.hh
"
9
10
#include "
endian.hh
"
11
12
#include <cstdint>
13
#include <span>
14
#include <vector>
15
16
namespace
openmsx
{
17
18
class
Filename
;
19
class
FrameSource;
20
21
class
AviWriter
22
{
23
public
:
24
AviWriter
(
const
Filename
& filename,
unsigned
width,
unsigned
height,
25
unsigned
channels,
unsigned
freq);
26
~AviWriter
();
27
void
addFrame
(
const
FrameSource
* video, std::span<const int16_t> audio);
28
void
setFps
(
float
fps_) { fps = fps_; }
29
30
private
:
31
void
addAviChunk(std::span<const char, 4> tag, std::span<const uint8_t> data,
unsigned
flags);
32
33
private
:
34
File
file;
35
ZMBVEncoder
codec;
36
std::vector<Endian::L32> index;
37
38
float
fps = 0.0f;
// will be filled in later
39
const
uint32_t width;
40
const
uint32_t height;
41
const
uint32_t channels;
42
const
uint32_t audioRate;
43
44
uint32_t frames = 0;
45
uint32_t audioWritten = 0;
46
uint32_t written = 0;
47
};
48
49
}
// namespace openmsx
50
51
#endif
File.hh
ZMBVEncoder.hh
openmsx::AviWriter
Definition
AviWriter.hh:22
openmsx::AviWriter::~AviWriter
~AviWriter()
Definition
AviWriter.cc:41
openmsx::AviWriter::setFps
void setFps(float fps_)
Definition
AviWriter.hh:28
openmsx::AviWriter::addFrame
void addFrame(const FrameSource *video, std::span< const int16_t > audio)
Definition
AviWriter.cc:276
openmsx::File
Definition
File.hh:18
openmsx::Filename
This class represents a filename.
Definition
Filename.hh:20
openmsx::FrameSource
Interface for getting lines from a video frame.
Definition
FrameSource.hh:20
openmsx::ZMBVEncoder
Definition
ZMBVEncoder.hh:20
endian.hh
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
openmsx::Filename
Filename
Definition
Filename.cc:33
Generated on Mon Oct 7 2024 21:13:41 for openMSX by
1.9.8