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
cd96267d
Commit
cd96267d
authored
May 07, 2021
by
xia-chu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extmap相关设置改成枚举
parent
9f25392f
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
24 行增加
和
28 行删除
+24
-28
webrtc/Sdp.cpp
+22
-25
webrtc/Sdp.h
+2
-3
没有找到文件。
webrtc/Sdp.cpp
查看文件 @
cd96267d
...
@@ -1251,27 +1251,25 @@ bool RtcSession::supportRtcpFb(const string &name, TrackType type) const {
...
@@ -1251,27 +1251,25 @@ bool RtcSession::supportRtcpFb(const string &name, TrackType type) const {
}
}
string
const
SdpConst
::
kTWCCRtcpFb
=
"transport-cc"
;
string
const
SdpConst
::
kTWCCRtcpFb
=
"transport-cc"
;
string
const
SdpConst
::
kTWCCExtMap
=
"http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01"
;
string
const
SdpConst
::
kRembRtcpFb
=
"goog-remb"
;
string
const
SdpConst
::
kRembRtcpFb
=
"goog-remb"
;
string
const
SdpConst
::
kRembExtMap
=
"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"
;
void
RtcConfigure
::
RtcTrackConfigure
::
enableTWCC
(
bool
enable
){
void
RtcConfigure
::
RtcTrackConfigure
::
enableTWCC
(
bool
enable
){
if
(
!
enable
)
{
if
(
!
enable
)
{
rtcp_fb
.
erase
(
SdpConst
::
kTWCCRtcpFb
);
rtcp_fb
.
erase
(
SdpConst
::
kTWCCRtcpFb
);
extmap
.
erase
(
SdpConst
::
kTWCCExtMap
);
extmap
.
erase
(
RtpExtType
::
abs_send_time
);
}
else
{
}
else
{
rtcp_fb
.
emplace
(
SdpConst
::
kTWCCRtcpFb
);
rtcp_fb
.
emplace
(
SdpConst
::
kTWCCRtcpFb
);
extmap
.
emplace
(
SdpConst
::
kTWCCExtMap
);
extmap
.
emplace
(
RtpExtType
::
transport_cc
);
}
}
}
}
void
RtcConfigure
::
RtcTrackConfigure
::
enableREMB
(
bool
enable
){
void
RtcConfigure
::
RtcTrackConfigure
::
enableREMB
(
bool
enable
){
if
(
!
enable
)
{
if
(
!
enable
)
{
rtcp_fb
.
erase
(
SdpConst
::
kRembRtcpFb
);
rtcp_fb
.
erase
(
SdpConst
::
kRembRtcpFb
);
extmap
.
erase
(
SdpConst
::
kRembExtMap
);
extmap
.
erase
(
RtpExtType
::
abs_send_time
);
}
else
{
}
else
{
rtcp_fb
.
emplace
(
SdpConst
::
kRembRtcpFb
);
rtcp_fb
.
emplace
(
SdpConst
::
kRembRtcpFb
);
extmap
.
emplace
(
SdpConst
::
kRembExtMap
);
extmap
.
emplace
(
RtpExtType
::
transport_cc
);
}
}
}
}
...
@@ -1292,13 +1290,12 @@ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){
...
@@ -1292,13 +1290,12 @@ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){
preferred_codec
=
{
CodecAAC
,
CodecG711U
,
CodecG711A
,
CodecOpus
};
preferred_codec
=
{
CodecAAC
,
CodecG711U
,
CodecG711A
,
CodecOpus
};
rtcp_fb
=
{
SdpConst
::
kTWCCRtcpFb
,
SdpConst
::
kRembRtcpFb
};
rtcp_fb
=
{
SdpConst
::
kTWCCRtcpFb
,
SdpConst
::
kRembRtcpFb
};
extmap
=
{
extmap
=
{
SdpConst
::
kTWCCExtMap
,
RtpExtType
::
ssrc_audio_level
,
SdpConst
::
kRembExtMap
,
RtpExtType
::
abs_send_time
,
"urn:ietf:params:rtp-hdrext:ssrc-audio-level"
,
RtpExtType
::
transport_cc
,
"urn:ietf:params:rtp-hdrext:sdes:mid"
,
RtpExtType
::
sdes_mid
,
"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id"
,
RtpExtType
::
sdes_rtp_stream_id
,
"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"
,
RtpExtType
::
sdes_repaired_rtp_stream_id
"urn:ietf:params:rtp-hdrext:csrc-audio-level"
};
};
break
;
break
;
}
}
...
@@ -1307,17 +1304,17 @@ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){
...
@@ -1307,17 +1304,17 @@ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){
preferred_codec
=
{
CodecH264
,
CodecH265
};
preferred_codec
=
{
CodecH264
,
CodecH265
};
rtcp_fb
=
{
SdpConst
::
kTWCCRtcpFb
,
SdpConst
::
kRembRtcpFb
,
"nack"
,
"ccm fir"
,
"nack pli"
};
rtcp_fb
=
{
SdpConst
::
kTWCCRtcpFb
,
SdpConst
::
kRembRtcpFb
,
"nack"
,
"ccm fir"
,
"nack pli"
};
extmap
=
{
extmap
=
{
SdpConst
::
kTWCCExtMap
,
RtpExtType
::
abs_send_time
,
SdpConst
::
kRembExtMap
,
RtpExtType
::
transport_cc
,
"urn:ietf:params:rtp-hdrext:toffset"
,
RtpExtType
::
sdes_mid
,
"urn:3gpp:video-orientation"
,
RtpExtType
::
sdes_rtp_stream_id
,
"http://www.webrtc.org/experiments/rtp-hdrext/playout-delay"
,
RtpExtType
::
sdes_repaired_rtp_stream_id
,
"http://www.webrtc.org/experiments/rtp-hdrext/video-content-type"
,
RtpExtType
::
video_timing
,
"http://www.webrtc.org/experiments/rtp-hdrext/video-timing"
,
RtpExtType
::
color_space
,
"http://www.webrtc.org/experiments/rtp-hdrext/color-space"
,
RtpExtType
::
video_content_type
,
"urn:ietf:params:rtp-hdrext:sdes:mid"
,
RtpExtType
::
playout_delay
,
"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id"
,
RtpExtType
::
video_orientation
,
"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"
RtpExtType
::
toffset
};
};
break
;
break
;
}
}
...
@@ -1566,7 +1563,7 @@ RETRY:
...
@@ -1566,7 +1563,7 @@ RETRY:
//对方和我方都支持的扩展,那么我们才支持
//对方和我方都支持的扩展,那么我们才支持
for
(
auto
&
ext
:
offer_media
.
extmap
)
{
for
(
auto
&
ext
:
offer_media
.
extmap
)
{
if
(
configure
.
extmap
.
find
(
ext
.
ext
)
!=
configure
.
extmap
.
end
())
{
if
(
configure
.
extmap
.
find
(
RtpExt
::
getExtType
(
ext
.
ext
)
)
!=
configure
.
extmap
.
end
())
{
answer_media
.
extmap
.
emplace_back
(
ext
);
answer_media
.
extmap
.
emplace_back
(
ext
);
}
}
}
}
...
...
webrtc/Sdp.h
查看文件 @
cd96267d
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <string>
#include <string>
#include <vector>
#include <vector>
#include "RtpExt.h"
#include "assert.h"
#include "assert.h"
#include "Extension/Frame.h"
#include "Extension/Frame.h"
#include "Common/Parser.h"
#include "Common/Parser.h"
...
@@ -695,7 +696,7 @@ public:
...
@@ -695,7 +696,7 @@ public:
SdpAttrFingerprint
fingerprint
;
SdpAttrFingerprint
fingerprint
;
set
<
string
>
rtcp_fb
;
set
<
string
>
rtcp_fb
;
set
<
string
>
extmap
;
set
<
RtpExtType
>
extmap
;
vector
<
CodecId
>
preferred_codec
;
vector
<
CodecId
>
preferred_codec
;
vector
<
SdpAttrCandidate
>
candidate
;
vector
<
SdpAttrCandidate
>
candidate
;
...
@@ -734,9 +735,7 @@ private:
...
@@ -734,9 +735,7 @@ private:
class
SdpConst
{
class
SdpConst
{
public
:
public
:
static
string
const
kTWCCRtcpFb
;
static
string
const
kTWCCRtcpFb
;
static
string
const
kTWCCExtMap
;
static
string
const
kRembRtcpFb
;
static
string
const
kRembRtcpFb
;
static
string
const
kRembExtMap
;
private
:
private
:
SdpConst
()
=
delete
;
SdpConst
()
=
delete
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论