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
bf70a01f
Commit
bf70a01f
authored
Nov 25, 2019
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提升rtsp的兼容性
parent
21cf3bce
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
15 行增加
和
10 行删除
+15
-10
src/Rtsp/RtspPlayer.cpp
+6
-9
src/Rtsp/RtspPlayer.h
+0
-1
src/Rtsp/RtspPusher.cpp
+3
-0
src/Rtsp/RtspSession.cpp
+6
-0
没有找到文件。
src/Rtsp/RtspPlayer.cpp
查看文件 @
bf70a01f
...
...
@@ -823,21 +823,15 @@ void RtspPlayer::onPlayResult_l(const SockException &ex , bool handshakeComplete
}
}
int
RtspPlayer
::
getTrackIndexByControlSuffix
(
const
string
&
controlSuffix
)
const
{
for
(
unsigned
int
i
=
0
;
i
<
_aTrackInfo
.
size
();
i
++
)
{
auto
pos
=
_aTrackInfo
[
i
]
->
_control_surffix
.
find
(
controlSuffix
);
if
(
pos
==
0
)
{
return
i
;
}
}
return
-
1
;
}
int
RtspPlayer
::
getTrackIndexByInterleaved
(
int
interleaved
)
const
{
for
(
unsigned
int
i
=
0
;
i
<
_aTrackInfo
.
size
();
i
++
)
{
if
(
_aTrackInfo
[
i
]
->
_interleaved
==
interleaved
)
{
return
i
;
}
}
if
(
_aTrackInfo
.
size
()
==
1
){
return
0
;
}
return
-
1
;
}
...
...
@@ -847,6 +841,9 @@ int RtspPlayer::getTrackIndexByTrackType(TrackType trackType) const {
return
i
;
}
}
if
(
_aTrackInfo
.
size
()
==
1
){
return
0
;
}
return
-
1
;
}
...
...
src/Rtsp/RtspPlayer.h
查看文件 @
bf70a01f
...
...
@@ -103,7 +103,6 @@ private:
void
onRecvRTP_l
(
const
RtpPacket
::
Ptr
&
pRtppt
,
const
SdpTrack
::
Ptr
&
track
);
void
onPlayResult_l
(
const
SockException
&
ex
,
bool
handshakeCompleted
);
int
getTrackIndexByControlSuffix
(
const
string
&
controlSuffix
)
const
;
int
getTrackIndexByInterleaved
(
int
interleaved
)
const
;
int
getTrackIndexByTrackType
(
TrackType
trackType
)
const
;
...
...
src/Rtsp/RtspPusher.cpp
查看文件 @
bf70a01f
...
...
@@ -351,6 +351,9 @@ inline int RtspPusher::getTrackIndexByTrackType(TrackType type) {
return
i
;
}
}
if
(
_aTrackInfo
.
size
()
==
1
){
return
0
;
}
return
-
1
;
}
...
...
src/Rtsp/RtspSession.cpp
查看文件 @
bf70a01f
...
...
@@ -1105,6 +1105,9 @@ inline int RtspSession::getTrackIndexByTrackType(TrackType type) {
return
i
;
}
}
if
(
_aTrackInfo
.
size
()
==
1
){
return
0
;
}
return
-
1
;
}
inline
int
RtspSession
::
getTrackIndexByControlSuffix
(
const
string
&
controlSuffix
)
{
...
...
@@ -1125,6 +1128,9 @@ inline int RtspSession::getTrackIndexByInterleaved(int interleaved){
return
i
;
}
}
if
(
_aTrackInfo
.
size
()
==
1
){
return
0
;
}
return
-
1
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论