-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathuisettings_controller.h
More file actions
50 lines (40 loc) · 1.15 KB
/
uisettings_controller.h
File metadata and controls
50 lines (40 loc) · 1.15 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
#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& GetCustomParams() const;
private:
HostCodecConfigCommon commonProps;
EncoderInfo encoderInfo;
QualityMode qualityMode{};
int32_t qp{};
int32_t bitRate{};
int32_t preset{};
std::string customParams;
std::string qualityModeId;
std::string qpId;
std::string bitrateId;
std::string presetId;
std::string customParamsId;
};
}