-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuisettings_controller.h
More file actions
60 lines (49 loc) · 1.51 KB
/
Copy pathuisettings_controller.h
File metadata and controls
60 lines (49 loc) · 1.51 KB
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
#pragma once
#include "encoder_info.h"
#include "wrapper/plugin_api.h"
namespace IOPlugin {
enum QualityMode : int32_t {
CQP = 1 << 0,
CRF = 1 << 1,
VBR = 1 << 2,
};
class UISettingsController final {
public:
explicit UISettingsController(const EncoderInfo& encoderInfo);
UISettingsController(const HostCodecConfigCommon& commonProps, const EncoderInfo& encoderInfo);
void Load(IPropertyProvider* values);
StatusCode Render(HostListRef* settingsList) const;
private:
void InitDefaults();
void SetFirstSupportedQualityMode();
StatusCode RenderQuality(HostListRef* settingsList) const;
public:
QualityMode GetQualityMode() const;
int32_t GetQP() const;
int32_t GetBitRate() const;
int32_t GetPreset() const;
const std::string& GetExtExePath() const { return extExePath; }
const std::string& GetExtArgs() const { return extArgs; }
bool GetPass2Enabled() const { return pass2Enabled; }
const std::string& GetPass2Args() const { return pass2Args; }
private:
HostCodecConfigCommon commonProps;
EncoderInfo encoderInfo;
QualityMode qualityMode{};
int32_t qp{};
int32_t bitRate{};
int32_t preset{};
std::string qualityModeId;
std::string qpId;
std::string bitrateId;
std::string presetId;
std::string extExePathId;
std::string extArgsId;
std::string pass2EnableId;
std::string pass2ArgsId;
std::string extExePath;
std::string extArgs;
bool pass2Enabled{false};
std::string pass2Args;
};
}