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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
#define WM_DEFINE_CONFIG 1
#include "config.h"
#include "loadini.h"
#include "main.h"
#include "../nu/Config.h"
bool config_no_video = false;
extern Nullsoft::Utility::Config wmConfig;
#pragma warning(disable:4800)
#define READ(type, name) config_##name = (type)wmConfig.cfg_int(TEXT("config_") TEXT(#name), default_##name)
#define WRITE(type, name) wmConfig.cfg_int(TEXT("config_") TEXT(#name), default_##name) = (int)config_##name
#define DEFAULT(name) config_##name = default_##name
void ReadConfig()
{
READ(bool, lowmemory);
READ(bool, clock);
READ(bool, video_dedicated_thread);
READ(bool, video_early);
READ(int, video_early_pad);
READ(bool, video_outoforder);
READ(bool, video_catchup);
READ(int, video_jitter);
READ(int, video_drop_threshold);
READ(size_t, video_cache_frames);
READ(bool, video_notifylate);
READ(bool, video_framedropoffset);
READ(bool, audio_outoforder);
READ(bool, audio_dedicated_thread);
READ(int, audio_early_pad);
READ(bool, audio_early);
READ(size_t, audio_cache_frames);
READ(size_t, audio_num_channels);
// READ(bool, no_silent);
// READ(bool, untrusted_ok);
READ(bool, http_metadata);
READ(size_t, buffer_time);
READ(bool, extra_asx_extensions);
READ(int, col1);
READ(int, col2);
}
void WriteConfig()
{
WRITE(bool, lowmemory);
WRITE(bool, clock);
WRITE(bool, video_dedicated_thread);
WRITE(bool, video_early);
WRITE(int, video_early_pad);
WRITE(bool, video_outoforder);
WRITE(bool, video_catchup);
WRITE(int, video_jitter);
WRITE(int, video_drop_threshold);
WRITE(size_t, video_cache_frames);
WRITE(bool, video_notifylate);
WRITE(bool, video_framedropoffset);
WRITE(bool, audio_outoforder);
WRITE(bool, audio_dedicated_thread);
WRITE(int, audio_early_pad);
WRITE(bool, audio_early);
WRITE(size_t, audio_cache_frames);
WRITE(size_t, audio_num_channels);
// WRITE(bool, no_silent);
// WRITE(bool, untrusted_ok);
WRITE(bool, http_metadata);
WRITE(size_t, buffer_time);
WRITE(bool, extra_asx_extensions);
WRITE(int, col1);
WRITE(int, col2);
}
void DefaultConfig()
{
DEFAULT(http_metadata);
// DEFAULT(no_silent);
// DEFAULT(untrusted_ok);
DEFAULT(buffer_time);
DEFAULT(audio_num_channels);
DEFAULT(audio_outoforder);
DEFAULT(audio_dedicated_thread);
DEFAULT(audio_early_pad);
DEFAULT(audio_early);
DEFAULT(audio_cache_frames);
DEFAULT(lowmemory);
DEFAULT(clock);
DEFAULT(video_dedicated_thread);
DEFAULT(video_early);
DEFAULT(video_early_pad);
DEFAULT(video_outoforder);
DEFAULT(video_catchup);
DEFAULT(video_jitter);
DEFAULT(video_drop_threshold);
DEFAULT(video_cache_frames);
DEFAULT(video_notifylate);
DEFAULT(video_framedropoffset);
DEFAULT(extra_asx_extensions);
DEFAULT(col1);
DEFAULT(col2);
}
|