Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Obs Studio
提交
21584fa2
O
Obs Studio
项目概览
小白菜888
/
Obs Studio
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Obs Studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
21584fa2
编写于
1月 04, 2017
作者:
D
dennis
提交者:
jp9000
1月 29, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Add auto-start replay buf. opt. when stream starts
Closes jp9000/obs-studio#748
上级
29f22e72
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
165 addition
and
73 deletion
+165
-73
UI/data/locale/en-US.ini
UI/data/locale/en-US.ini
+2
-0
UI/forms/OBSBasicSettings.ui
UI/forms/OBSBasicSettings.ui
+106
-73
UI/window-basic-main.cpp
UI/window-basic-main.cpp
+20
-0
UI/window-basic-settings.cpp
UI/window-basic-settings.cpp
+35
-0
UI/window-basic-settings.hpp
UI/window-basic-settings.hpp
+2
-0
未找到文件。
UI/data/locale/en-US.ini
浏览文件 @
21584fa2
...
...
@@ -412,6 +412,8 @@ Basic.Settings.General.SourceSnapping="Snap Sources to other sources"
Basic.Settings.General.SnapDistance
=
"Snap Sensitivity"
Basic.Settings.General.RecordWhenStreaming
=
"Automatically record when streaming"
Basic.Settings.General.KeepRecordingWhenStreamStops
=
"Keep recording when stream stops"
Basic.Settings.General.ReplayBufferWhileStreaming
=
"Automatically start replay buffer when streaming"
Basic.Settings.General.KeepReplayBufferStreamStops
=
"Keep replay buffer active when stream stops"
Basic.Settings.General.SysTrayEnabled
=
"Enable system tray icon"
Basic.Settings.General.SysTrayWhenStarted
=
"Minimize to system tray when started"
Basic.Settings.General.SystemTrayHideMinimize
=
"Hide to system tray instead of minimize to task bar"
...
...
UI/forms/OBSBasicSettings.ui
浏览文件 @
21584fa2
...
...
@@ -192,14 +192,14 @@
</property>
</widget>
</item>
<item
row=
"1
0
"
column=
"1"
>
<item
row=
"1
2
"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"systemTrayEnabled"
>
<property
name=
"text"
>
<string>
Basic.Settings.General.SysTrayEnabled
</string>
</property>
</widget>
</item>
<item
row=
"1
1
"
column=
"1"
>
<item
row=
"1
3
"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"systemTrayWhenStarted"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
...
...
@@ -209,7 +209,7 @@
</property>
</widget>
</item>
<item
row=
"1
2
"
column=
"1"
>
<item
row=
"1
4
"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"systemTrayAlways"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
...
...
@@ -219,14 +219,14 @@
</property>
</widget>
</item>
<item
row=
"1
3
"
column=
"0"
colspan=
"2"
>
<item
row=
"1
5
"
column=
"0"
colspan=
"2"
>
<widget
class=
"Line"
name=
"line_4"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item
row=
"1
4
"
column=
"0"
colspan=
"2"
>
<item
row=
"1
6
"
column=
"0"
colspan=
"2"
>
<widget
class=
"QGroupBox"
name=
"groupBox_10"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
...
...
@@ -350,6 +350,23 @@
</property>
</widget>
</item>
<item
row=
"11"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"keepReplayStreamStops"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
Basic.Settings.General.KeepReplayBufferStreamStops
</string>
</property>
</widget>
</item>
<item
row=
"10"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"replayWhileStreaming"
>
<property
name=
"text"
>
<string>
Basic.Settings.General.ReplayBufferWhileStreaming
</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget
class=
"QWidget"
name=
"streamPage"
>
...
...
@@ -2919,8 +2936,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
98
</width>
<height>
28
</height>
<width>
80
</width>
<height>
16
</height>
</rect>
</property>
</widget>
...
...
@@ -3813,12 +3830,12 @@
<slot>
setCurrentIndex(int)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
586
</x>
<y>
38
</y>
<x>
241
</x>
<y>
16
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
401
</x>
<y>
102
</y>
<x>
250
</x>
<y>
40
</y>
</hint>
</hints>
</connection>
...
...
@@ -3829,12 +3846,12 @@
<slot>
setVisible(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
6
40
</x>
<y>
180
</y>
<x>
2
40
</x>
<y>
46
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
6
40
</x>
<y>
229
</y>
<x>
2
40
</x>
<y>
44
</y>
</hint>
</hints>
</connection>
...
...
@@ -3845,12 +3862,12 @@
<slot>
setVisible(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
6
40
</x>
<y>
180
</y>
<x>
2
40
</x>
<y>
46
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
383
</x>
<y>
229
</y>
<x>
160
</x>
<y>
44
</y>
</hint>
</hints>
</connection>
...
...
@@ -3861,12 +3878,12 @@
<slot>
setVisible(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
6
40
</x>
<y>
180
</y>
<x>
2
40
</x>
<y>
46
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
6
40
</x>
<y>
255
</y>
<x>
2
40
</x>
<y>
43
</y>
</hint>
</hints>
</connection>
...
...
@@ -3877,12 +3894,12 @@
<slot>
setVisible(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
6
40
</x>
<y>
180
</y>
<x>
2
40
</x>
<y>
46
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
383
</x>
<y>
255
</y>
<x>
160
</x>
<y>
43
</y>
</hint>
</hints>
</connection>
...
...
@@ -3893,12 +3910,12 @@
<slot>
setCurrentIndex(int)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
606
</x>
<y>
113
</y>
<x>
232
</x>
<y>
41
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
394
</x>
<y>
191
</y>
<x>
241
</x>
<y>
53
</y>
</hint>
</hints>
</connection>
...
...
@@ -3909,12 +3926,12 @@
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
397
</x>
<y>
323
</y>
<x>
168
</x>
<y>
67
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
676
</x>
<y>
323
</y>
<x>
250
</x>
<y>
67
</y>
</hint>
</hints>
</connection>
...
...
@@ -3925,12 +3942,12 @@
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
330
</x>
<y>
191
</y>
<x>
168
</x>
<y>
52
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
591
</x>
<y>
191
</y>
<x>
232
</x>
<y>
52
</y>
</hint>
</hints>
</connection>
...
...
@@ -3941,12 +3958,12 @@
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
353
</x>
<y>
277
</y>
<x>
168
</x>
<y>
56
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
614
</x>
<y>
277
</y>
<x>
232
</x>
<y>
56
</y>
</hint>
</hints>
</connection>
...
...
@@ -3957,12 +3974,12 @@
<slot>
setCurrentIndex(int)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
676
</x>
<y>
148
</y>
<x>
250
</x>
<y>
50
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
676
</x>
<y>
177
</y>
<x>
250
</x>
<y>
52
</y>
</hint>
</hints>
</connection>
...
...
@@ -4086,11 +4103,11 @@
<hints>
<hint
type=
"sourcelabel"
>
<x>
951
</x>
<y>
349
</y>
<y>
441
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
346
</x>
<y>
375
</y>
<y>
467
</y>
</hint>
</hints>
</connection>
...
...
@@ -4102,11 +4119,11 @@
<hints>
<hint
type=
"sourcelabel"
>
<x>
951
</x>
<y>
349
</y>
<y>
441
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
951
</x>
<y>
375
</y>
<y>
467
</y>
</hint>
</hints>
</connection>
...
...
@@ -4118,11 +4135,11 @@
<hints>
<hint
type=
"sourcelabel"
>
<x>
951
</x>
<y>
349
</y>
<y>
441
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
951
</x>
<y>
398
</y>
<y>
490
</y>
</hint>
</hints>
</connection>
...
...
@@ -4134,11 +4151,11 @@
<hints>
<hint
type=
"sourcelabel"
>
<x>
951
</x>
<y>
349
</y>
<y>
441
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
951
</x>
<y>
421
</y>
<y>
513
</y>
</hint>
</hints>
</connection>
...
...
@@ -4150,11 +4167,11 @@
<hints>
<hint
type=
"sourcelabel"
>
<x>
951
</x>
<y>
349
</y>
<y>
441
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
951
</x>
<y>
444
</y>
<y>
536
</y>
</hint>
</hints>
</connection>
...
...
@@ -4165,12 +4182,12 @@
<slot>
setVisible(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
6
40
</x>
<y>
180
</y>
<x>
2
40
</x>
<y>
46
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
6
40
</x>
<y>
203
</y>
<x>
2
40
</x>
<y>
45
</y>
</hint>
</hints>
</connection>
...
...
@@ -4181,12 +4198,12 @@
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
705
</x>
<y>
2
25
</y>
<x>
961
</x>
<y>
2
48
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
705
</x>
<y>
2
48
</y>
<x>
961
</x>
<y>
2
71
</y>
</hint>
</hints>
</connection>
...
...
@@ -4197,12 +4214,12 @@
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
705
</x>
<y>
271
</y>
<x>
961
</x>
<y>
340
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
705
</x>
<y>
294
</y>
<x>
961
</x>
<y>
363
</y>
</hint>
</hints>
</connection>
...
...
@@ -4213,12 +4230,28 @@
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
20
</x>
<y>
20
</y>
<x>
336
</x>
<y>
324
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
336
</x>
<y>
370
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
replayWhileStreaming
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
keepReplayStreamStops
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
497
</x>
<y>
288
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
20
</x>
<y>
20
</y>
<x>
513
</x>
<y>
304
</y>
</hint>
</hints>
</connection>
...
...
UI/window-basic-main.cpp
浏览文件 @
21584fa2
...
...
@@ -3864,6 +3864,12 @@ void OBSBasic::StartStreaming()
"BasicWindow"
,
"RecordWhenStreaming"
);
if
(
recordWhenStreaming
)
StartRecording
();
bool
replayBufferWhileStreaming
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"ReplayBufferWhileStreaming"
);
if
(
replayBufferWhileStreaming
)
StartReplayBuffer
();
}
#ifdef _WIN32
...
...
@@ -3926,6 +3932,13 @@ void OBSBasic::StopStreaming()
"BasicWindow"
,
"KeepRecordingWhenStreamStops"
);
if
(
recordWhenStreaming
&&
!
keepRecordingWhenStreamStops
)
StopRecording
();
bool
replayBufferWhileStreaming
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"ReplayBufferWhileStreaming"
);
bool
keepReplayBufferStreamStops
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"KeepReplayBufferStreamStops"
);
if
(
replayBufferWhileStreaming
&&
!
keepReplayBufferStreamStops
)
StopReplayBuffer
();
}
void
OBSBasic
::
ForceStopStreaming
()
...
...
@@ -3943,6 +3956,13 @@ void OBSBasic::ForceStopStreaming()
"BasicWindow"
,
"KeepRecordingWhenStreamStops"
);
if
(
recordWhenStreaming
&&
!
keepRecordingWhenStreamStops
)
StopRecording
();
bool
replayBufferWhileStreaming
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"ReplayBufferWhileStreaming"
);
bool
keepReplayBufferStreamStops
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"KeepReplayBufferStreamStops"
);
if
(
replayBufferWhileStreaming
&&
!
keepReplayBufferStreamStops
)
StopReplayBuffer
();
}
void
OBSBasic
::
StreamDelayStarting
(
int
sec
)
...
...
UI/window-basic-settings.cpp
浏览文件 @
21584fa2
...
...
@@ -279,6 +279,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
HookWidget
(
ui
->
projectorAlwaysOnTop
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
recordWhenStreaming
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
keepRecordStreamStops
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
replayWhileStreaming
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
keepReplayStreamStops
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
systemTrayEnabled
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
systemTrayWhenStarted
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
HookWidget
(
ui
->
systemTrayAlways
,
CHECK_CHANGED
,
GENERAL_CHANGED
);
...
...
@@ -591,6 +593,8 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
AdvOutRecCheckWarnings
();
SimpleRecordingQualityChanged
();
UpdateAutomaticReplayBufferCheckboxes
();
}
void
OBSBasicSettings
::
SaveCombo
(
QComboBox
*
widget
,
const
char
*
section
,
...
...
@@ -885,6 +889,14 @@ void OBSBasicSettings::LoadGeneralSettings()
"BasicWindow"
,
"KeepRecordingWhenStreamStops"
);
ui
->
keepRecordStreamStops
->
setChecked
(
keepRecordStreamStops
);
bool
replayWhileStreaming
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"ReplayBufferWhileStreaming"
);
ui
->
replayWhileStreaming
->
setChecked
(
replayWhileStreaming
);
bool
keepReplayStreamStops
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"KeepReplayBufferStreamStops"
);
ui
->
keepReplayStreamStops
->
setChecked
(
keepReplayStreamStops
);
bool
systemTrayEnabled
=
config_get_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"SysTrayEnabled"
);
ui
->
systemTrayEnabled
->
setChecked
(
systemTrayEnabled
);
...
...
@@ -2342,6 +2354,15 @@ void OBSBasicSettings::SaveGeneralSettings()
"KeepRecordingWhenStreamStops"
,
ui
->
keepRecordStreamStops
->
isChecked
());
if
(
WidgetChanged
(
ui
->
replayWhileStreaming
))
config_set_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"ReplayBufferWhileStreaming"
,
ui
->
replayWhileStreaming
->
isChecked
());
if
(
WidgetChanged
(
ui
->
keepReplayStreamStops
))
config_set_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"KeepReplayBufferStreamStops"
,
ui
->
keepReplayStreamStops
->
isChecked
());
if
(
WidgetChanged
(
ui
->
systemTrayEnabled
))
config_set_bool
(
GetGlobalConfig
(),
"BasicWindow"
,
"SysTrayEnabled"
,
...
...
@@ -3337,6 +3358,8 @@ void OBSBasicSettings::UpdateStreamDelayEstimate()
UpdateSimpleOutStreamDelayEstimate
();
else
UpdateAdvOutStreamDelayEstimate
();
UpdateAutomaticReplayBufferCheckboxes
();
}
static
bool
EncoderAvailable
(
const
char
*
encoder
)
...
...
@@ -3496,6 +3519,15 @@ void OBSBasicSettings::SimpleStreamingEncoderChanged()
#define ESTIMATE_UNKNOWN_STR \
"Basic.Settings.Output.ReplayBuffer.EstimateUnknown"
void
OBSBasicSettings
::
UpdateAutomaticReplayBufferCheckboxes
()
{
bool
state
=
ui
->
simpleReplayBuf
->
isChecked
()
&&
ui
->
outputMode
->
currentIndex
()
==
0
;
ui
->
replayWhileStreaming
->
setEnabled
(
state
);
ui
->
keepReplayStreamStops
->
setEnabled
(
state
&&
ui
->
replayWhileStreaming
->
isChecked
());
}
void
OBSBasicSettings
::
SimpleReplayBufferChanged
()
{
QString
qual
=
ui
->
simpleOutRecQuality
->
currentData
().
toString
();
...
...
@@ -3523,6 +3555,9 @@ void OBSBasicSettings::SimpleReplayBufferChanged()
ui
->
replayBufferGroupBox
->
setVisible
(
!
lossless
&&
replayBufferEnabled
);
ui
->
simpleReplayBuf
->
setVisible
(
!
lossless
);
UpdateAutomaticReplayBufferCheckboxes
();
}
#define SIMPLE_OUTPUT_WARNING(str) \
...
...
UI/window-basic-settings.hpp
浏览文件 @
21584fa2
...
...
@@ -284,6 +284,8 @@ private slots:
void
UpdateStreamDelayEstimate
();
void
UpdateAutomaticReplayBufferCheckboxes
();
void
AdvOutRecCheckWarnings
();
void
SimpleRecordingQualityChanged
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录