Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
7c98edcc
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,发现更多精彩内容 >>
提交
7c98edcc
编写于
1月 11, 2017
作者:
C
cg2121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Add more command line options
上级
d2ee3bb2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
64 addition
and
3 deletion
+64
-3
UI/obs-app.cpp
UI/obs-app.cpp
+44
-0
UI/obs-app.hpp
UI/obs-app.hpp
+3
-0
UI/window-basic-main.cpp
UI/window-basic-main.cpp
+17
-3
未找到文件。
UI/obs-app.cpp
浏览文件 @
7c98edcc
...
...
@@ -51,6 +51,8 @@
#include <signal.h>
#endif
#include <iostream>
using
namespace
std
;
static
log_handler_t
def_log_handler
;
...
...
@@ -63,6 +65,9 @@ static bool log_verbose = false;
static
bool
unfiltered_log
=
false
;
bool
opt_start_streaming
=
false
;
bool
opt_start_recording
=
false
;
bool
opt_studio_mode
=
false
;
bool
opt_start_replaybuffer
=
false
;
bool
opt_minimize_tray
=
false
;
string
opt_starting_collection
;
string
opt_starting_profile
;
string
opt_starting_scene
;
...
...
@@ -1749,6 +1754,9 @@ int main(int argc, char *argv[])
}
else
if
(
arg_is
(
argv
[
i
],
"--startrecording"
,
nullptr
))
{
opt_start_recording
=
true
;
}
else
if
(
arg_is
(
argv
[
i
],
"--startreplaybuffer"
,
nullptr
))
{
opt_start_replaybuffer
=
true
;
}
else
if
(
arg_is
(
argv
[
i
],
"--collection"
,
nullptr
))
{
if
(
++
i
<
argc
)
opt_starting_collection
=
argv
[
i
];
...
...
@@ -1757,6 +1765,42 @@ int main(int argc, char *argv[])
}
else
if
(
arg_is
(
argv
[
i
],
"--scene"
,
nullptr
))
{
if
(
++
i
<
argc
)
opt_starting_scene
=
argv
[
i
];
}
else
if
(
arg_is
(
argv
[
i
],
"--minimize-to-tray"
,
nullptr
))
{
opt_minimize_tray
=
true
;
}
else
if
(
arg_is
(
argv
[
i
],
"--studio-mode"
,
nullptr
))
{
opt_studio_mode
=
true
;
}
else
if
(
arg_is
(
argv
[
i
],
"--help"
,
"-h"
))
{
std
::
cout
<<
"--help, -h: Get list of available commands.
\n\n
"
<<
"--startstreaming: Automatically start streaming.
\n
"
<<
"--startrecording: Automatically start recording.
\n
"
<<
"--startreplaybuffer: Start replay buffer.
\n\n
"
<<
"--collection <string>: Use specific scene collection."
<<
"
\n
"
<<
"--profile <string>: Use specific profile.
\n
"
<<
"--scene <string>: Start with specific scene.
\n\n
"
<<
"--studio-mode: Enable studio mode.
\n
"
<<
"--minimize-to-tray: Minimize to system tray.
\n
"
<<
"--portable, -p: Use portable mode.
\n\n
"
<<
"--verbose: Make log more verbose.
\n
"
<<
"--unfiltered_log: Make log unfiltered.
\n\n
"
<<
"--version, -V: Get current version.
\n
"
;
exit
(
0
);
}
else
if
(
arg_is
(
argv
[
i
],
"--version"
,
"-V"
))
{
std
::
cout
<<
"OBS Studio - "
<<
App
()
->
GetVersionString
()
<<
"
\n
"
;
exit
(
0
);
}
else
{
std
::
cout
<<
"Invalid arguments. Use --help or -h to get "
<<
"a list of available command line arguments.
\n
"
;
exit
(
0
);
}
}
...
...
UI/obs-app.hpp
浏览文件 @
7c98edcc
...
...
@@ -178,4 +178,7 @@ static inline int GetProfilePath(char *path, size_t size, const char *file)
extern
bool
opt_start_streaming
;
extern
bool
opt_start_recording
;
extern
bool
opt_start_replaybuffer
;
extern
bool
opt_minimize_tray
;
extern
bool
opt_studio_mode
;
extern
std
::
string
opt_starting_scene
;
UI/window-basic-main.cpp
浏览文件 @
7c98edcc
...
...
@@ -703,6 +703,12 @@ retryScene:
opt_start_recording
=
false
;
}
if
(
opt_start_replaybuffer
)
{
QMetaObject
::
invokeMethod
(
this
,
"StartReplayBuffer"
,
Qt
::
QueuedConnection
);
opt_start_replaybuffer
=
false
;
}
LogScenes
();
disableSaving
--
;
...
...
@@ -1162,8 +1168,14 @@ void OBSBasic::OBSInit()
"BasicWindow"
,
"SwapScenesMode"
);
editPropertiesMode
=
config_get_bool
(
App
()
->
GlobalConfig
(),
"BasicWindow"
,
"EditPropertiesMode"
);
SetPreviewProgramMode
(
config_get_bool
(
App
()
->
GlobalConfig
(),
"BasicWindow"
,
"PreviewProgramMode"
));
if
(
!
opt_studio_mode
)
{
SetPreviewProgramMode
(
config_get_bool
(
App
()
->
GlobalConfig
(),
"BasicWindow"
,
"PreviewProgramMode"
));
}
else
{
SetPreviewProgramMode
(
true
);
opt_studio_mode
=
false
;
}
#define SET_VISIBILITY(name, control) \
do { \
...
...
@@ -4983,12 +4995,14 @@ void OBSBasic::SystemTray(bool firstStarted)
if
(
!
sysTrayWhenStarted
&&
!
sysTrayEnabled
)
{
trayIcon
->
hide
();
}
else
if
(
sysTrayWhenStarted
&&
sysTrayEnabled
)
{
}
else
if
((
sysTrayWhenStarted
&&
sysTrayEnabled
)
||
opt_minimize_tray
)
{
trayIcon
->
show
();
if
(
firstStarted
)
{
QTimer
::
singleShot
(
50
,
this
,
SLOT
(
hide
()));
EnablePreviewDisplay
(
false
);
setVisible
(
false
);
opt_minimize_tray
=
false
;
}
}
else
if
(
sysTrayEnabled
)
{
trayIcon
->
show
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录