-
Notifications
You must be signed in to change notification settings - Fork 1k
/
agoraconfig.cpp
130 lines (106 loc) · 2.87 KB
/
agoraconfig.cpp
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
119
120
121
122
123
124
125
126
127
128
129
130
#include "agoraconfig.h"
CAgoraConfig::CAgoraConfig()
{
m_spConfig = std::make_shared<QSettings>("AgoraConfigOpenVideoCall.ini",QSettings::IniFormat);
}
void CAgoraConfig::setAppId(const QString &str)
{
return m_spConfig->setValue("/BaseInfo/AppId",str);
}
QString CAgoraConfig::getAppId()
{
return m_spConfig->value("/BaseInfo/AppId").toString();
}
QString CAgoraConfig::getAppToken()
{
return m_spConfig->value("/BaseInfo/AppToken").toString();
}
void CAgoraConfig::setChannelName(const QString &str)
{
return m_spConfig->setValue("/BaseInfo/CameraName",str);
}
QString CAgoraConfig::getChannelName()
{
return m_spConfig->value("/BaseInfo/ChannelName").toString();
}
void CAgoraConfig::setEnableVideo(bool bEnable)
{
return m_spConfig->setValue("/BaseInfo/EnableVideo",bEnable);
}
bool CAgoraConfig::getEnableVideo()
{
return m_spConfig->value("/BaseInfo/EnableVideo").toBool();
}
void CAgoraConfig::setEnableAudio(bool bEnable)
{
return m_spConfig->setValue("/BaseInfo/EnableAudio",bEnable);
}
bool CAgoraConfig::getEnableAudio()
{
return m_spConfig->value("/BaseInfo/EnableAudio").toBool();
}
void CAgoraConfig::setEnableBeauty(bool bEnable)
{
return m_spConfig->setValue("/BaseInfo/EnableBeauty", bEnable);
}
bool CAgoraConfig::getEnableBeauty()
{
return m_spConfig->value("/BaseInfo/EnableBeauty").toBool();
}
void CAgoraConfig::setLigtheningContrastLevel(int level)
{
return m_spConfig->setValue("/Beauty/LightengingContrastLevel", level);
}
int CAgoraConfig::getLigtheningContrastLevel()
{
return m_spConfig->value("/Beauty/LightengingContrastLevel").toInt();
}
void CAgoraConfig::setRedness(int level)
{
return m_spConfig->setValue("/Beauty/Redness", level);
}
int CAgoraConfig::getRedness()
{
return m_spConfig->value("/Beauty/Redness").toInt();
}
void CAgoraConfig::setLightenging(int lightening)
{
return m_spConfig->setValue("/Beauty/Lightening", lightening);
}
int CAgoraConfig::getLightenging()
{
return m_spConfig->value("/Beauty/Lightening").toInt();
}
void CAgoraConfig::setSmoothness(int smooth)
{
return m_spConfig->setValue("/Beauty/Smoothness", smooth);
}
int CAgoraConfig::getSmoothness()
{
return m_spConfig->value("/Beauty/Smoothness").toInt();
}
void CAgoraConfig::getVideoResolution(int& width, int height)
{
width = m_spConfig->value("/VideoInfo/Width").toInt();
height = m_spConfig->value("/VideoInfo/Height").toInt();
}
int CAgoraConfig::getFPS()
{
return m_spConfig->value("/VideoInfo/FPS").toInt();
}
int CAgoraConfig::getBitrate()
{
return m_spConfig->value("/VideoInfo/Bitrate").toInt();
}
bool CAgoraConfig::isCustomFPS()
{
return m_spConfig->value("/VideoInfo/CustomFPS").toBool();
}
bool CAgoraConfig::isCustomBitrate()
{
return m_spConfig->value("/VideoInfo/CustomBitrate").toBool();
}
bool CAgoraConfig::isCustomResolution()
{
return m_spConfig->value("/VideoInfo/CustomResolution").toBool();
}