forked from OpenApoc/OpenApoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
video.h
49 lines (40 loc) · 829 Bytes
/
video.h
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
#pragma once
#include "framework/sound.h"
#include "library/sp.h"
#include <chrono>
namespace OpenApoc
{
class Image;
class Palette;
class AudioFormat;
class IFile;
class FrameImage
{
public:
unsigned frame;
sp<Image> image;
sp<Palette> palette;
};
class FrameAudio
{
public:
unsigned frame;
up<char[]> samples;
unsigned sample_count;
AudioFormat format;
};
class Video
{
private:
public:
virtual std::chrono::duration<unsigned int, std::nano> getFrameTime() const = 0;
virtual unsigned getFrameCount() const = 0;
virtual Vec2<int> getVideoSize() const = 0;
virtual sp<FrameImage> popImage() = 0;
virtual sp<FrameAudio> popAudio() = 0;
virtual ~Video() = default;
virtual void stop() = 0;
virtual sp<MusicTrack> getMusicTrack() = 0;
};
sp<Video> loadSMKVideo(IFile &file);
} // namespace OpenApoc