Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
51bfb9d8
O
obs-studio
项目概览
尘离序散
/
obs-studio
与 Fork 源项目一致
从无法访问的项目Fork
通知
30
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obs-studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
51bfb9d8
编写于
3月 09, 2019
作者:
D
derrod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Add checkbox for Twitch bandwidth test mode
上级
c55f0060
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
32 addition
and
6 deletion
+32
-6
UI/auth-oauth.cpp
UI/auth-oauth.cpp
+8
-1
UI/data/locale/en-US.ini
UI/data/locale/en-US.ini
+1
-0
UI/forms/OBSBasicSettings.ui
UI/forms/OBSBasicSettings.ui
+12
-5
UI/window-basic-settings-stream.cpp
UI/window-basic-settings-stream.cpp
+10
-0
UI/window-basic-settings.cpp
UI/window-basic-settings.cpp
+1
-0
未找到文件。
UI/auth-oauth.cpp
浏览文件 @
51bfb9d8
...
...
@@ -297,7 +297,14 @@ void OAuthStreamKey::OnStreamConfig()
obs_data_t
*
settings
=
obs_service_get_settings
(
service
);
obs_data_set_string
(
settings
,
"key"
,
key_
.
c_str
());
bool
bwtest
=
obs_data_get_bool
(
settings
,
"bwtest"
);
if
(
bwtest
&&
strcmp
(
this
->
service
(),
"Twitch"
)
==
0
)
obs_data_set_string
(
settings
,
"key"
,
key_
.
append
(
"?bandwidthtest=true"
).
c_str
());
else
obs_data_set_string
(
settings
,
"key"
,
key_
.
c_str
());
obs_service_update
(
service
,
settings
);
obs_data_release
(
settings
);
...
...
UI/data/locale/en-US.ini
浏览文件 @
51bfb9d8
...
...
@@ -628,6 +628,7 @@ Basic.Settings.Stream.StreamType="Stream Type"
Basic.Settings.Stream.Custom.UseAuthentication
=
"Use authentication"
Basic.Settings.Stream.Custom.Username
=
"Username"
Basic.Settings.Stream.Custom.Password
=
"Password"
Basic.Settings.Stream.BandwidthTestMode
=
"Enable Bandwidth Test Mode"
# basic mode 'output' settings
Basic.Settings.Output
=
"Output"
...
...
UI/forms/OBSBasicSettings.ui
浏览文件 @
51bfb9d8
...
...
@@ -1062,17 +1062,17 @@
</item>
</layout>
</item>
<item
row=
"
4
"
column=
"1"
>
<item
row=
"
5
"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"useAuth"
>
<property
name=
"text"
>
<string>
Basic.Settings.Stream.Custom.UseAuthentication
</string>
</property>
</widget>
</item>
<item
row=
"
5
"
column=
"1"
>
<item
row=
"
6
"
column=
"1"
>
<widget
class=
"QLineEdit"
name=
"authUsername"
/>
</item>
<item
row=
"
5
"
column=
"0"
>
<item
row=
"
6
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"authUsernameLabel"
>
<property
name=
"text"
>
<string>
Basic.Settings.Stream.Custom.Username
</string>
...
...
@@ -1082,7 +1082,7 @@
</property>
</widget>
</item>
<item
row=
"
6
"
column=
"0"
>
<item
row=
"
7
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"authPwLabel"
>
<property
name=
"text"
>
<string>
Basic.Settings.Stream.Custom.Password
</string>
...
...
@@ -1092,7 +1092,7 @@
</property>
</widget>
</item>
<item
row=
"
6
"
column=
"1"
>
<item
row=
"
7
"
column=
"1"
>
<widget
class=
"QWidget"
name=
"authPwWidget"
native=
"true"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_25"
>
<property
name=
"leftMargin"
>
...
...
@@ -1124,6 +1124,13 @@
</layout>
</widget>
</item>
<item
row=
"4"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"bandwidthTestEnable"
>
<property
name=
"text"
>
<string>
Basic.Settings.Stream.BandwidthTestMode
</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
...
...
UI/window-basic-settings-stream.cpp
浏览文件 @
51bfb9d8
...
...
@@ -36,6 +36,7 @@ void OBSBasicSettings::InitStreamPage()
{
ui
->
connectAccount2
->
setVisible
(
false
);
ui
->
disconnectAccount
->
setVisible
(
false
);
ui
->
bandwidthTestEnable
->
setVisible
(
false
);
int
vertSpacing
=
ui
->
topStreamLayout
->
verticalSpacing
();
...
...
@@ -90,6 +91,9 @@ void OBSBasicSettings::LoadStream1Settings()
idx
=
1
;
}
ui
->
service
->
setCurrentIndex
(
idx
);
bool
bw_test
=
obs_data_get_bool
(
settings
,
"bwtest"
);
ui
->
bandwidthTestEnable
->
setChecked
(
bw_test
);
}
UpdateServerList
();
...
...
@@ -151,6 +155,7 @@ void OBSBasicSettings::SaveStream1Settings()
}
}
obs_data_set_bool
(
settings
,
"bwtest"
,
ui
->
bandwidthTestEnable
->
isChecked
());
obs_data_set_string
(
settings
,
"key"
,
QT_TO_UTF8
(
ui
->
key
->
text
()));
OBSService
newService
=
obs_service_create
(
service_id
,
...
...
@@ -260,6 +265,7 @@ void OBSBasicSettings::on_service_currentIndexChanged(int)
bool
custom
=
IsCustomService
();
ui
->
disconnectAccount
->
setVisible
(
false
);
ui
->
bandwidthTestEnable
->
setVisible
(
false
);
#ifdef BROWSER_AVAILABLE
if
(
cef
)
{
...
...
@@ -411,6 +417,9 @@ void OBSBasicSettings::OnOAuthStreamKeyConnected()
ui
->
streamKeyLabel
->
setVisible
(
false
);
ui
->
connectAccount2
->
setVisible
(
false
);
ui
->
disconnectAccount
->
setVisible
(
true
);
if
(
strcmp
(
a
->
service
(),
"Twitch"
)
==
0
)
ui
->
bandwidthTestEnable
->
setVisible
(
true
);
}
ui
->
streamStackWidget
->
setCurrentIndex
((
int
)
Section
::
StreamKey
);
...
...
@@ -473,6 +482,7 @@ void OBSBasicSettings::on_disconnectAccount_clicked()
ui
->
streamKeyLabel
->
setVisible
(
true
);
ui
->
connectAccount2
->
setVisible
(
true
);
ui
->
disconnectAccount
->
setVisible
(
false
);
ui
->
bandwidthTestEnable
->
setVisible
(
false
);
ui
->
key
->
setText
(
""
);
}
...
...
UI/window-basic-settings.cpp
浏览文件 @
51bfb9d8
...
...
@@ -334,6 +334,7 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget
(
ui
->
server
,
COMBO_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
customServer
,
EDIT_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
key
,
EDIT_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
bandwidthTestEnable
,
CHECK_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
useAuth
,
CHECK_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
authUsername
,
EDIT_CHANGED
,
STREAM1_CHANGED
);
HookWidget
(
ui
->
authPw
,
EDIT_CHANGED
,
STREAM1_CHANGED
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录