Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
379b41aa
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,发现更多精彩内容 >>
提交
379b41aa
编写于
2月 22, 2017
作者:
D
derrod
提交者:
jp9000
2月 25, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Add options for new socket loop
上级
f8617bd3
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
206 addition
and
91 deletion
+206
-91
UI/data/locale/en-US.ini
UI/data/locale/en-US.ini
+2
-0
UI/forms/OBSBasicSettings.ui
UI/forms/OBSBasicSettings.ui
+166
-91
UI/window-basic-main-outputs.cpp
UI/window-basic-main-outputs.cpp
+16
-0
UI/window-basic-main.cpp
UI/window-basic-main.cpp
+4
-0
UI/window-basic-settings.cpp
UI/window-basic-settings.cpp
+18
-0
未找到文件。
UI/data/locale/en-US.ini
浏览文件 @
379b41aa
...
...
@@ -605,6 +605,8 @@ Basic.Settings.Advanced.StreamDelay.Preserve="Preserve cutoff point (increase de
Basic.Settings.Advanced.StreamDelay.MemoryUsage
=
"Estimated Memory Usage: %1 MB"
Basic.Settings.Advanced.Network
=
"Network"
Basic.Settings.Advanced.Network.BindToIP
=
"Bind to IP"
Basic.Settings.Advanced.Network.EnableNewSocketLoop
=
"Enable new networking code"
Basic.Settings.Advanced.Network.EnableLowLatencyMode
=
"Low latency mode"
# advanced audio properties
Basic.AdvAudio
=
"Advanced Audio Properties"
...
...
UI/forms/OBSBasicSettings.ui
浏览文件 @
379b41aa
...
...
@@ -3455,9 +3455,9 @@
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
59
3
</width>
<height>
699
</height>
<y>
-16
</y>
<width>
80
3
</width>
<height>
738
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_16"
>
...
...
@@ -3787,16 +3787,9 @@
<string>
Basic.Settings.Advanced.StreamDelay
</string>
</property>
<layout
class=
"QFormLayout"
name=
"formLayout_18"
>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"streamDelayEnable"
>
<property
name=
"text"
>
<string>
Enable
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
<property
name=
"topMargin"
>
<number>
2
</number>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_56"
>
<property
name=
"text"
>
...
...
@@ -3873,6 +3866,16 @@
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"streamDelayEnable"
>
<property
name=
"text"
>
<string>
Enable
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
...
...
@@ -3979,6 +3982,23 @@
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"enableNewSocketLoop"
>
<property
name=
"text"
>
<string>
Basic.Settings.Advanced.Network.EnableNewSocketLoop
</string>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"enableLowLatencyMode"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
Basic.Settings.Advanced.Network.EnableLowLatencyMode
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
...
...
@@ -4147,6 +4167,29 @@
<tabstop>
reconnectRetryDelay
</tabstop>
<tabstop>
reconnectMaxRetries
</tabstop>
<tabstop>
bindToIP
</tabstop>
<tabstop>
enableNewSocketLoop
</tabstop>
<tabstop>
enableLowLatencyMode
</tabstop>
<tabstop>
warnBeforeStreamStop
</tabstop>
<tabstop>
recordWhenStreaming
</tabstop>
<tabstop>
keepRecordStreamStops
</tabstop>
<tabstop>
replayWhileStreaming
</tabstop>
<tabstop>
keepReplayStreamStops
</tabstop>
<tabstop>
snappingEnabled
</tabstop>
<tabstop>
screenSnapping
</tabstop>
<tabstop>
centerSnapping
</tabstop>
<tabstop>
sourceSnapping
</tabstop>
<tabstop>
snapDistance
</tabstop>
<tabstop>
hideProjectorCursor
</tabstop>
<tabstop>
projectorAlwaysOnTop
</tabstop>
<tabstop>
saveProjectors
</tabstop>
<tabstop>
systemTrayEnabled
</tabstop>
<tabstop>
systemTrayWhenStarted
</tabstop>
<tabstop>
systemTrayAlways
</tabstop>
<tabstop>
enableAutoUpdates
</tabstop>
<tabstop>
warnBeforeStreamStart
</tabstop>
<tabstop>
scrollArea_2
</tabstop>
<tabstop>
language
</tabstop>
<tabstop>
theme
</tabstop>
</tabstops>
<resources>
<include
location=
"obs.qrc"
/>
...
...
@@ -4276,7 +4319,7 @@
</hint>
<hint
type=
"destinationlabel"
>
<x>
241
</x>
<y>
5
4
</y>
<y>
5
3
</y>
</hint>
</hints>
</connection>
...
...
@@ -4291,7 +4334,7 @@
<y>
67
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
2
43
</x>
<x>
2
50
</x>
<y>
67
</y>
</hint>
</hints>
...
...
@@ -4345,210 +4388,242 @@
</hints>
</connection>
<connection>
<sender>
s
treamDelayEnable
</sender>
<sender>
s
impleOutAdvanced
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
label_56
</receiver>
<slot>
set
Enabled
(bool)
</slot>
<receiver>
simpleOutEnforce
</receiver>
<slot>
set
Visible
(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
503
</x>
<y>
4
50
</y>
<x>
240
</x>
<y>
4
6
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
2
69
</x>
<y>
4
76
</y>
<x>
2
40
</x>
<y>
4
5
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
s
treamDelayEnable
</sender>
<sender>
s
ystemTrayEnabled
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
s
treamDelayPreserve
</receiver>
<receiver>
s
ystemTrayWhenStarted
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
503
</x>
<y>
450
</y>
<x>
730
</x>
<y>
556
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
503
</x>
<y>
49
9
</y>
<x>
746
</x>
<y>
57
9
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
s
treamDelayEnable
</sender>
<sender>
s
ystemTrayEnabled
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
widget_12
</receiver>
<receiver>
systemTrayAlways
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
503
</x>
<y>
450
</y>
<x>
830
</x>
<y>
556
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
503
</x>
<y>
476
</y>
<x>
826
</x>
<y>
602
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
simpleOutAdvanced
</sender>
<sender>
enableNewSocketLoop
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
simpleOutEnforc
e
</receiver>
<slot>
set
Visible
(bool)
</slot>
<receiver>
enableLowLatencyMod
e
</receiver>
<slot>
set
Enabled
(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
240
</x>
<y>
46
</y>
<x>
403
</x>
<y>
642
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
240
</x>
<y>
4
5
</y>
<x>
403
</x>
<y>
66
5
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
s
ystemTray
Enabled
</sender>
<sender>
s
napping
Enabled
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
systemTrayWhenStarted
</receiver>
<receiver>
label_9
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
384
</x>
<y>
559
</y>
<x>
733
</x>
<y>
317
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
400
</x>
<y>
585
</y>
<x>
347
</x>
<y>
343
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
s
ystemTray
Enabled
</sender>
<sender>
s
napping
Enabled
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
s
ystemTrayAlways
</receiver>
<receiver>
s
napDistance
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
48
4
</x>
<y>
566
</y>
<x>
77
4
</x>
<y>
317
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
480
</x>
<y>
605
</y>
<x>
782
</x>
<y>
343
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
snappingEnabled
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
label_9
</receiver>
<receiver>
screenSnapping
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
38
0
</x>
<y>
3
22
</y>
<x>
82
0
</x>
<y>
3
17
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
330
</x>
<y>
3
50
</y>
<x>
837
</x>
<y>
3
66
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
snappingEnabled
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
s
napDistance
</receiver>
<receiver>
s
ourceSnapping
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
42
1
</x>
<y>
3
25
</y>
<x>
88
1
</x>
<y>
3
17
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
429
</x>
<y>
3
46
</y>
<x>
890
</x>
<y>
3
89
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
snappingEnabled
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
screen
Snapping
</receiver>
<receiver>
center
Snapping
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
467
</x>
<y>
3
25
</y>
<x>
928
</x>
<y>
3
17
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
484
</x>
<y>
378
</y>
<x>
915
</x>
<y>
412
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
snappingEnabled
</sender>
<sender>
recordWhenStreaming
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
sourceSnapping
</receiver>
<receiver>
keepRecordStreamStops
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
528
</x>
<y>
32
9
</y>
<x>
803
</x>
<y>
19
9
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
537
</x>
<y>
39
2
</y>
<x>
820
</x>
<y>
22
2
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
snappingEnabled
</sender>
<sender>
replayWhileStreaming
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
centerSnapping
</receiver>
<receiver>
keepReplayStreamStops
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
575
</x>
<y>
328
</y>
<x>
747
</x>
<y>
245
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
562
</x>
<x>
753
</x>
<y>
268
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
streamDelayEnable
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
label_56
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
431
</x>
<y>
422
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
356
</x>
<y>
443
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
recordWhenStreaming
</sender>
<sender>
streamDelayEnable
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
keepRecordStreamStops
</receiver>
<receiver>
streamDelaySec
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
4
57
</x>
<y>
205
</y>
<x>
4
65
</x>
<y>
420
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
4
74
</x>
<y>
226
</y>
<x>
4
63
</x>
<y>
447
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
replayWhileStreaming
</sender>
<sender>
streamDelayEnable
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
keepReplayStreamStops
</receiver>
<receiver>
streamDelayInfo
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
533
</x>
<y>
420
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
557
</x>
<y>
446
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
streamDelayEnable
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
streamDelayPreserve
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
401
</x>
<y>
247
</y>
<x>
504
</x>
<y>
420
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
4
07
</x>
<y>
270
</y>
<x>
4
94
</x>
<y>
465
</y>
</hint>
</hints>
</connection>
...
...
UI/window-basic-main-outputs.cpp
浏览文件 @
379b41aa
...
...
@@ -665,9 +665,17 @@ bool SimpleOutput::StartStreaming(obs_service_t *service)
"DelayPreserve"
);
const
char
*
bindIP
=
config_get_string
(
main
->
Config
(),
"Output"
,
"BindIP"
);
bool
enableNewSocketLoop
=
config_get_bool
(
main
->
Config
(),
"Output"
,
"NewSocketLoopEnable"
);
bool
enableLowLatencyMode
=
config_get_bool
(
main
->
Config
(),
"Output"
,
"LowLatencyEnable"
);
obs_data_t
*
settings
=
obs_data_create
();
obs_data_set_string
(
settings
,
"bind_ip"
,
bindIP
);
obs_data_set_bool
(
settings
,
"new_socket_loop_enabled"
,
enableNewSocketLoop
);
obs_data_set_bool
(
settings
,
"low_latency_mode_enabled"
,
enableLowLatencyMode
);
obs_output_update
(
streamOutput
,
settings
);
obs_data_release
(
settings
);
...
...
@@ -1314,9 +1322,17 @@ bool AdvancedOutput::StartStreaming(obs_service_t *service)
"DelayPreserve"
);
const
char
*
bindIP
=
config_get_string
(
main
->
Config
(),
"Output"
,
"BindIP"
);
bool
enableNewSocketLoop
=
config_get_bool
(
main
->
Config
(),
"Output"
,
"NewSocketLoopEnable"
);
bool
enableLowLatencyMode
=
config_get_bool
(
main
->
Config
(),
"Output"
,
"LowLatencyEnable"
);
obs_data_t
*
settings
=
obs_data_create
();
obs_data_set_string
(
settings
,
"bind_ip"
,
bindIP
);
obs_data_set_bool
(
settings
,
"new_socket_loop_enabled"
,
enableNewSocketLoop
);
obs_data_set_bool
(
settings
,
"low_latency_mode_enabled"
,
enableLowLatencyMode
);
obs_output_update
(
streamOutput
,
settings
);
obs_data_release
(
settings
);
...
...
UI/window-basic-main.cpp
浏览文件 @
379b41aa
...
...
@@ -1001,6 +1001,10 @@ bool OBSBasic::InitBasicConfigDefaults()
config_set_default_uint
(
basicConfig
,
"Output"
,
"MaxRetries"
,
20
);
config_set_default_string
(
basicConfig
,
"Output"
,
"BindIP"
,
"default"
);
config_set_default_bool
(
basicConfig
,
"Output"
,
"NewSocketLoopEnable"
,
false
);
config_set_default_bool
(
basicConfig
,
"Output"
,
"LowLatencyEnable"
,
false
);
int
i
=
0
;
uint32_t
scale_cx
=
cx
;
...
...
UI/window-basic-settings.cpp
浏览文件 @
379b41aa
...
...
@@ -403,6 +403,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget
(
ui
->
reconnectMaxRetries
,
SCROLL_CHANGED
,
ADV_CHANGED
);
HookWidget
(
ui
->
processPriority
,
COMBO_CHANGED
,
ADV_CHANGED
);
HookWidget
(
ui
->
bindToIP
,
COMBO_CHANGED
,
ADV_CHANGED
);
HookWidget
(
ui
->
enableNewSocketLoop
,
CHECK_CHANGED
,
ADV_CHANGED
);
HookWidget
(
ui
->
enableLowLatencyMode
,
CHECK_CHANGED
,
ADV_CHANGED
);
#if !defined(_WIN32) && !defined(__APPLE__)
delete
ui
->
monitoringDevice
;
...
...
@@ -453,6 +455,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
delete
ui
->
processPriorityLabel
;
delete
ui
->
processPriority
;
delete
ui
->
advancedGeneralGroupBox
;
delete
ui
->
enableNewSocketLoop
;
delete
ui
->
enableLowLatencyMode
;
ui
->
rendererLabel
=
nullptr
;
ui
->
renderer
=
nullptr
;
ui
->
adapterLabel
=
nullptr
;
...
...
@@ -460,6 +464,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
ui
->
processPriorityLabel
=
nullptr
;
ui
->
processPriority
=
nullptr
;
ui
->
advancedGeneralGroupBox
=
nullptr
;
ui
->
enableNewSocketLoop
=
nullptr
;
ui
->
enableLowLatencyMode
=
nullptr
;
#endif
#ifndef __APPLE__
...
...
@@ -2004,6 +2010,7 @@ void OBSBasicSettings::LoadAdvancedSettings()
ui
->
streamDelayPreserve
->
setChecked
(
preserveDelay
);
ui
->
streamDelayEnable
->
setChecked
(
enableDelay
);
SetComboByName
(
ui
->
colorFormat
,
videoColorFormat
);
SetComboByName
(
ui
->
colorSpace
,
videoColorSpace
);
SetComboByValue
(
ui
->
colorRange
,
videoColorRange
);
...
...
@@ -2025,10 +2032,18 @@ void OBSBasicSettings::LoadAdvancedSettings()
#elif _WIN32
const
char
*
processPriority
=
config_get_string
(
App
()
->
GlobalConfig
(),
"General"
,
"ProcessPriority"
);
bool
enableNewSocketLoop
=
config_get_bool
(
main
->
Config
(),
"Output"
,
"NewSocketLoopEnable"
);
bool
enableLowLatencyMode
=
config_get_bool
(
main
->
Config
(),
"Output"
,
"LowLatencyEnable"
);
idx
=
ui
->
processPriority
->
findData
(
processPriority
);
if
(
idx
==
-
1
)
idx
=
ui
->
processPriority
->
findData
(
"Normal"
);
ui
->
processPriority
->
setCurrentIndex
(
idx
);
ui
->
enableNewSocketLoop
->
setChecked
(
enableNewSocketLoop
);
ui
->
enableLowLatencyMode
->
setChecked
(
enableLowLatencyMode
);
#endif
loading
=
false
;
...
...
@@ -2505,6 +2520,9 @@ void OBSBasicSettings::SaveAdvancedSettings()
priority
.
c_str
());
if
(
main
->
Active
())
SetProcessPriority
(
priority
.
c_str
());
SaveCheckBox
(
ui
->
enableNewSocketLoop
,
"Output"
,
"NewSocketLoopEnable"
);
SaveCheckBox
(
ui
->
enableLowLatencyMode
,
"Output"
,
"LowLatencyEnable"
);
#endif
#ifdef __APPLE__
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录