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
9d2498a6
Commit
9d2498a6
authored
Mar 29, 2021
by
ziyue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
candidate foundation改为string类型
parent
ba06def4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
16 行增加
和
12 行删除
+16
-12
conf/config.ini
+8
-8
server/main.cpp
+2
-0
webrtc/Sdp.cpp
+5
-3
webrtc/Sdp.h
+1
-1
没有找到文件。
conf/config.ini
查看文件 @
9d2498a6
...
...
@@ -140,14 +140,14 @@ maxReqSize=4096
#404网页内容,用户可以自定义404网页
notFound
=
<html><head><title>404 Not Found</title></head><body bgcolor="white"><center><h1>您访问的资源不存在!</h1></center><hr><center>ZLMediaKit-4.0</center></body></html>
#http服务器监听端口
port
=
8
0
port
=
0
#http文件服务器根目录
#可以为相对(相对于本可执行程序目录)或绝对路径
rootPath
=
./www
#http文件服务器读文件缓存大小,单位BYTE,调整该参数可以优化文件io性能
sendBufSize
=
65536
#https服务器监听端口
sslport
=
443
sslport
=
20
443
#是否显示文件夹菜单,开启后可以浏览文件夹
dirMenu
=
1
...
...
@@ -187,9 +187,9 @@ keepAliveSecond=15
#在接收rtmp推流时,是否重新生成时间戳(很多推流器的时间戳着实很烂)
modifyStamp
=
0
#rtmp服务器监听端口
port
=
1
935
port
=
8
935
#rtmps服务器监听地址
sslport
=
1935
0
sslport
=
0
[rtp]
#音频mtu大小,该参数限制rtp最大字节数,推荐不要超过1400
...
...
@@ -202,7 +202,7 @@ videoMtuSize=1400
#导出调试数据(包括rtp/ps/h264)至该目录,置空则关闭数据导出
dumpDir
=
#udp和tcp代理服务器,支持rtp(必须是ts或ps类型)代理
port
=
1000
0
port
=
0
#rtp超时时间,单位秒
timeoutSec
=
15
...
...
@@ -221,13 +221,13 @@ handshakeSecond=15
#或者tcp发送缓存超过这个时间,则会断开连接,单位秒
keepAliveSecond
=
15
#rtsp服务器监听地址
port
=
554
port
=
8
554
#rtsps服务器监听地址
sslport
=
322
sslport
=
0
[shell]
#调试telnet服务器接受最大bufffer大小
maxReqSize
=
1024
#调试telnet服务器监听端口
port
=
900
0
port
=
0
server/main.cpp
查看文件 @
9d2498a6
...
...
@@ -209,6 +209,7 @@ static void inline listen_shell_input(){
//全局变量,在WebApi中用于保存配置文件用
string
g_ini_file
;
extern
void
test_sdp
();
int
start_main
(
int
argc
,
char
*
argv
[])
{
{
CMD_main
cmd_main
;
...
...
@@ -266,6 +267,7 @@ int start_main(int argc,char *argv[]) {
});
}
test_sdp
();
uint16_t
shellPort
=
mINI
::
Instance
()[
Shell
::
kPort
];
uint16_t
rtspPort
=
mINI
::
Instance
()[
Rtsp
::
kPort
];
uint16_t
rtspsPort
=
mINI
::
Instance
()[
Rtsp
::
kSSLPort
];
...
...
webrtc/Sdp.cpp
查看文件 @
9d2498a6
...
...
@@ -689,14 +689,16 @@ string SdpAttrSctpMap::toString() const {
}
void
SdpAttrCandidate
::
parse
(
const
string
&
str
)
{
char
foundation_buf
[
32
]
=
{
0
};
char
transport_buf
[
16
]
=
{
0
};
char
address_buf
[
32
]
=
{
0
};
char
type_buf
[
16
]
=
{
0
};
if
(
7
!=
sscanf
(
str
.
data
(),
"%
"
SCNu32
"
%"
SCNu32
" %15[^ ] %"
SCNu32
" %31[^ ] %"
SCNu16
" typ %15[^ ]"
,
&
foundation
,
&
component
,
transport_buf
,
&
priority
,
address_buf
,
&
port
,
type_buf
))
{
if
(
7
!=
sscanf
(
str
.
data
(),
"%
31[^ ]
%"
SCNu32
" %15[^ ] %"
SCNu32
" %31[^ ] %"
SCNu16
" typ %15[^ ]"
,
foundation_buf
,
&
component
,
transport_buf
,
&
priority
,
address_buf
,
&
port
,
type_buf
))
{
SDP_THROW
();
}
foundation
=
foundation_buf
;
transport
=
transport_buf
;
address
=
address_buf
;
type
=
type_buf
;
...
...
@@ -720,7 +722,7 @@ void SdpAttrCandidate::parse(const string &str) {
string
SdpAttrCandidate
::
toString
()
const
{
if
(
value
.
empty
())
{
value
=
to_string
(
foundation
)
+
" "
+
to_string
(
component
)
+
" "
+
transport
+
" "
+
to_string
(
priority
)
+
value
=
foundation
+
" "
+
to_string
(
component
)
+
" "
+
transport
+
" "
+
to_string
(
priority
)
+
" "
+
address
+
" "
+
to_string
(
port
)
+
" typ "
+
type
;
for
(
auto
&
pr
:
arr
)
{
value
+=
' '
;
...
...
webrtc/Sdp.h
查看文件 @
9d2498a6
...
...
@@ -407,7 +407,7 @@ public:
//15.1. "candidate" Attribute
//a=candidate:4 1 udp 2 192.168.1.7 58107 typ host
//a=candidate:<foundation> <component-id> <transport> <priority> <address> <port> typ <cand-type>
uint32_t
foundation
;
string
foundation
;
uint32_t
component
;
string
transport
{
"udp"
};
uint32_t
priority
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论