Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-04-13 13:57:39 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f980340e893e82910a0d3be4fa0a6d7eee546ba9
f980340e
1 parent
aa784377
refine config option
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
10 行增加
和
8 行删除
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_config.cpp
查看文件 @
f980340
...
...
@@ -1064,6 +1064,7 @@ int SrsConfig::parse_options(int argc, char** argv)
{
int
ret
=
ERROR_SUCCESS
;
show_help
=
true
;
for
(
int
i
=
1
;
i
<
argc
;
i
++
)
{
if
((
ret
=
parse_argv
(
i
,
argv
))
!=
ERROR_SUCCESS
)
{
return
ret
;
...
...
@@ -1139,13 +1140,11 @@ int SrsConfig::parse_file(const char* filename)
int
SrsConfig
::
parse_argv
(
int
&
i
,
char
**
argv
)
{
int
ret
=
ERROR_SUCCESS
;
char
*
p
=
argv
[
i
];
if
(
*
p
++
!=
'-'
)
{
ret
=
ERROR_SYSTEM_CONFIG_INVALID
;
srs_error
(
"invalid options(index=%d, value=%s), "
"must starts with -, see help: %s -h, ret=%d"
,
i
,
argv
[
i
],
argv
[
0
],
ret
);
show_help
=
true
;
return
ret
;
}
...
...
@@ -1157,9 +1156,11 @@ int SrsConfig::parse_argv(int& i, char** argv)
break
;
case
'v'
:
case
'V'
:
show_help
=
false
;
show_version
=
true
;
break
;
case
'c'
:
show_help
=
false
;
if
(
*
p
)
{
config_file
=
p
;
return
ret
;
...
...
@@ -1187,12 +1188,13 @@ void SrsConfig::print_help(char** argv)
RTMP_SIG_SRS_NAME
" "
RTMP_SIG_SRS_VERSION
" "
RTMP_SIG_SRS_COPYRIGHT
"
\n
"
"Primary Authors: "
RTMP_SIG_SRS_PRIMARY_AUTHROS
"
\n
"
"Build: "
SRS_BUILD_DATE
" Configuration:"
SRS_CONFIGURE
"
\n
"
"Usage: %s [-h?vV] [-c <filename>]
\n
"
"Usage: %s [-h?vV
t
] [-c <filename>]
\n
"
"
\n
"
"Options:
\n
"
" -?-h : show help
\n
"
" -v-V : show version and exit
\n
"
" -c filename : set configuration file
\n
"
" -?, -h : show help
\n
"
" -v, -V : show version and exit
\n
"
" -t : test configuration file
\n
"
" -c filename : set configuration file
\n
"
"
\n
"
RTMP_SIG_SRS_WEB
"
\n
"
RTMP_SIG_SRS_URL
"
\n
"
...
...
请
注册
或
登录
后发表评论