Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
ZLMediaKit
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
张翔宇
ZLMediaKit
Commits
e1e50191
Commit
e1e50191
authored
Jun 19, 2019
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置键名统一使用string
parent
446c0feb
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
19 行增加
和
14 行删除
+19
-14
server/WebApi.h
+7
-2
server/main.cpp
+6
-6
tests/test_server.cpp
+6
-6
没有找到文件。
server/WebApi.h
查看文件 @
e1e50191
...
...
@@ -27,16 +27,21 @@
#ifndef ZLMEDIAKIT_WEBAPI_H
#define ZLMEDIAKIT_WEBAPI_H
#include <string>
using
namespace
std
;
namespace
mediakit
{
////////////RTSP服务器配置///////////
namespace
Rtsp
{
extern
const
char
kPort
[]
;
extern
const
string
kPort
;
}
//namespace Rtsp
////////////RTMP服务器配置///////////
namespace
Rtmp
{
extern
const
char
kPort
[]
;
extern
const
string
kPort
;
}
//namespace RTMP
}
// namespace mediakit
...
...
server/main.cpp
查看文件 @
e1e50191
...
...
@@ -58,9 +58,9 @@ namespace mediakit {
namespace
Http
{
#define HTTP_FIELD "http."
#define HTTP_PORT 80
const
char
kPort
[]
=
HTTP_FIELD
"port"
;
const
string
kPort
=
HTTP_FIELD
"port"
;
#define HTTPS_PORT 443
const
char
kSSLPort
[]
=
HTTP_FIELD
"sslport"
;
const
string
kSSLPort
=
HTTP_FIELD
"sslport"
;
onceToken
token1
([](){
mINI
::
Instance
()[
kPort
]
=
HTTP_PORT
;
mINI
::
Instance
()[
kSSLPort
]
=
HTTPS_PORT
;
...
...
@@ -71,7 +71,7 @@ onceToken token1([](){
namespace
Shell
{
#define SHELL_FIELD "shell."
#define SHELL_PORT 9000
const
char
kPort
[]
=
SHELL_FIELD
"port"
;
const
string
kPort
=
SHELL_FIELD
"port"
;
onceToken
token1
([](){
mINI
::
Instance
()[
kPort
]
=
SHELL_PORT
;
},
nullptr
);
...
...
@@ -82,8 +82,8 @@ namespace Rtsp {
#define RTSP_FIELD "rtsp."
#define RTSP_PORT 554
#define RTSPS_PORT 322
const
char
kPort
[]
=
RTSP_FIELD
"port"
;
const
char
kSSLPort
[]
=
RTSP_FIELD
"sslport"
;
const
string
kPort
=
RTSP_FIELD
"port"
;
const
string
kSSLPort
=
RTSP_FIELD
"sslport"
;
onceToken
token1
([](){
mINI
::
Instance
()[
kPort
]
=
RTSP_PORT
;
mINI
::
Instance
()[
kSSLPort
]
=
RTSPS_PORT
;
...
...
@@ -95,7 +95,7 @@ onceToken token1([](){
namespace
Rtmp
{
#define RTMP_FIELD "rtmp."
#define RTMP_PORT 1935
const
char
kPort
[]
=
RTMP_FIELD
"port"
;
const
string
kPort
=
RTMP_FIELD
"port"
;
onceToken
token1
([](){
mINI
::
Instance
()[
kPort
]
=
RTMP_PORT
;
},
nullptr
);
...
...
tests/test_server.cpp
查看文件 @
e1e50191
...
...
@@ -54,9 +54,9 @@ namespace mediakit {
namespace
Http
{
#define HTTP_FIELD "http."
#define HTTP_PORT 80
const
char
kPort
[]
=
HTTP_FIELD
"port"
;
const
string
kPort
=
HTTP_FIELD
"port"
;
#define HTTPS_PORT 443
const
char
kSSLPort
[]
=
HTTP_FIELD
"sslport"
;
const
string
kSSLPort
=
HTTP_FIELD
"sslport"
;
onceToken
token1
([](){
mINI
::
Instance
()[
kPort
]
=
HTTP_PORT
;
mINI
::
Instance
()[
kSSLPort
]
=
HTTPS_PORT
;
...
...
@@ -67,7 +67,7 @@ onceToken token1([](){
namespace
Shell
{
#define SHELL_FIELD "shell."
#define SHELL_PORT 9000
const
char
kPort
[]
=
SHELL_FIELD
"port"
;
const
string
kPort
=
SHELL_FIELD
"port"
;
onceToken
token1
([](){
mINI
::
Instance
()[
kPort
]
=
SHELL_PORT
;
},
nullptr
);
...
...
@@ -78,8 +78,8 @@ namespace Rtsp {
#define RTSP_FIELD "rtsp."
#define RTSP_PORT 554
#define RTSPS_PORT 322
const
char
kPort
[]
=
RTSP_FIELD
"port"
;
const
char
kSSLPort
[]
=
RTSP_FIELD
"sslport"
;
const
string
kPort
=
RTSP_FIELD
"port"
;
const
string
kSSLPort
=
RTSP_FIELD
"sslport"
;
onceToken
token1
([](){
mINI
::
Instance
()[
kPort
]
=
RTSP_PORT
;
mINI
::
Instance
()[
kSSLPort
]
=
RTSPS_PORT
;
...
...
@@ -91,7 +91,7 @@ onceToken token1([](){
namespace
Rtmp
{
#define RTMP_FIELD "rtmp."
#define RTMP_PORT 1935
const
char
kPort
[]
=
RTMP_FIELD
"port"
;
const
string
kPort
=
RTMP_FIELD
"port"
;
onceToken
token1
([](){
mINI
::
Instance
()[
kPort
]
=
RTMP_PORT
;
},
nullptr
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论