mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
添加remb开关
This commit is contained in:
parent
8f17fcdf1d
commit
dc2c882994
@ -1252,6 +1252,8 @@ bool RtcSession::supportRtcpFb(const string &name, TrackType type) const {
|
||||
|
||||
static string const kTWCCRtcpFb = "transport-cc";
|
||||
static string const kTWCCExtMap = "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01";
|
||||
static string const kRembRtcpFb = "goog-remb";
|
||||
static string const kRembExtMap = "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time";
|
||||
|
||||
void RtcConfigure::RtcTrackConfigure::enableTWCC(bool enable){
|
||||
if (!enable) {
|
||||
@ -1263,6 +1265,16 @@ void RtcConfigure::RtcTrackConfigure::enableTWCC(bool enable){
|
||||
}
|
||||
}
|
||||
|
||||
void RtcConfigure::RtcTrackConfigure::enableREMB(bool enable){
|
||||
if (!enable) {
|
||||
rtcp_fb.erase(kRembRtcpFb);
|
||||
extmap.erase(kRembExtMap);
|
||||
} else {
|
||||
rtcp_fb.emplace(kRembRtcpFb);
|
||||
extmap.emplace(kRembExtMap);
|
||||
}
|
||||
}
|
||||
|
||||
void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){
|
||||
enable = true;
|
||||
rtcp_mux = true;
|
||||
@ -1278,11 +1290,11 @@ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){
|
||||
case TrackAudio: {
|
||||
//此处调整偏好的编码格式优先级
|
||||
preferred_codec = {CodecAAC, CodecG711U, CodecG711A, CodecOpus};
|
||||
rtcp_fb = {kTWCCRtcpFb};
|
||||
rtcp_fb = {kTWCCRtcpFb, kRembRtcpFb};
|
||||
extmap = {
|
||||
kTWCCExtMap,
|
||||
kRembExtMap,
|
||||
"urn:ietf:params:rtp-hdrext:ssrc-audio-level",
|
||||
"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",
|
||||
"urn:ietf:params:rtp-hdrext:sdes:mid",
|
||||
"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id",
|
||||
"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id"
|
||||
@ -1292,11 +1304,11 @@ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){
|
||||
case TrackVideo: {
|
||||
//此处调整偏好的编码格式优先级
|
||||
preferred_codec = {CodecH264, CodecH265};
|
||||
rtcp_fb = {kTWCCRtcpFb, "nack", "ccm fir", "nack pli", "goog-remb"};
|
||||
rtcp_fb = {kTWCCRtcpFb, kRembRtcpFb, "nack", "ccm fir", "nack pli"};
|
||||
extmap = {
|
||||
kTWCCExtMap,
|
||||
kRembExtMap,
|
||||
"urn:ietf:params:rtp-hdrext:toffset",
|
||||
"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",
|
||||
"urn:3gpp:video-orientation",
|
||||
"http://www.webrtc.org/experiments/rtp-hdrext/playout-delay",
|
||||
"http://www.webrtc.org/experiments/rtp-hdrext/video-content-type",
|
||||
|
@ -701,6 +701,7 @@ public:
|
||||
|
||||
void setDefaultSetting(TrackType type);
|
||||
void enableTWCC(bool enable = true);
|
||||
void enableREMB(bool enable = true);
|
||||
};
|
||||
|
||||
RtcTrackConfigure video;
|
||||
|
Loading…
Reference in New Issue
Block a user