This repository has been archived by the owner on Jan 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lgvs_lgvid_subs.h
80 lines (52 loc) · 1.73 KB
/
lgvs_lgvid_subs.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
#ifndef LGVS_LGVID_SUBS_H
#define LGVS_LGVID_SUBS_H
#include <algorithm>
#include <fstream>
#include <sstream>
#include <windows.h>
#include "lgviddecoder.h"
#include "lgvs_config.h"
#include "lgvs_d3d9_renderer.h"
#include "lgvs_types.h"
namespace lgvs {
class LgVidSubs {
public:
bool refresh_video;
bool refresh_subtitle;
LgVidSubs();
~LgVidSubs();
void initialize(ILGVideoDecoderHost* host, const char* file_path);
void uninitialize();
bool has_subtitles() const;
bool check_subtitle(double pts);
private:
ILGVideoDecoderHost* host_;
Config config_;
static const std::wstring BLANK_WSTRING;
static const std::wstring DEFAULT_FONT_FAMILY;
std::wstring font_filename_;
bool has_subtitles_;
void read_config_values();
WStringList read_movie_paths();
void print_log(const char* text = nullptr);
void print_log(const std::string& text);
void print_log(const std::wstring& text);
LgVidSubs(const LgVidSubs& that);
LgVidSubs& operator=(const LgVidSubs& that);
}; // class LgVidSubs
} // namespace lgvs
#endif // LGVS_LGVID_SUBS_H