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
79267ae5
Commit
79267ae5
authored
Apr 06, 2021
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
比对codec失败时,先关闭profile比对,再关闭codec比对
parent
b5e6c12e
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
16 行增加
和
11 行删除
+16
-11
webrtc/Sdp.cpp
+16
-11
没有找到文件。
webrtc/Sdp.cpp
查看文件 @
79267ae5
...
...
@@ -1342,7 +1342,8 @@ void RtcConfigure::matchMedia(shared_ptr<RtcSession> &ret, TrackType type, const
if
(
!
configure
.
enable
)
{
return
;
}
bool
failed
=
false
;
bool
check_profile
=
true
;
bool
check_codec
=
true
;
RETRY
:
...
...
@@ -1357,15 +1358,13 @@ RETRY:
}
const
RtcCodecPlan
*
offer_plan_ptr
=
nullptr
;
for
(
auto
&
plan
:
offer_media
.
plan
)
{
if
(
getCodecId
(
plan
.
codec
)
!=
codec
)
{
//先检查编码格式是否为偏好
if
(
check_codec
&&
getCodecId
(
plan
.
codec
)
!=
codec
)
{
continue
;
}
//如果匹配失败了,那么随便选择一个plan
if
(
!
failed
)
{
//命中偏好的编码格式
if
(
!
onMatchCodecPlan
(
plan
,
codec
))
{
continue
;
}
//命中偏好的编码格式,然后检查规格
if
(
check_profile
&&
!
onCheckCodecProfile
(
plan
,
codec
))
{
continue
;
}
//找到中意的codec
offer_plan_ptr
=
&
plan
;
...
...
@@ -1495,9 +1494,15 @@ RETRY:
}
}
if
(
!
failed
)
{
//只重试一次
failed
=
true
;
if
(
check_profile
)
{
//如果是由于检查profile导致匹配失败,那么重试一次,且不检查profile
check_profile
=
false
;
goto
RETRY
;
}
if
(
check_codec
)
{
//如果是由于检查codec导致匹配失败,那么重试一次,且不检查codec
check_codec
=
false
;
goto
RETRY
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论