Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 1a139ab

Browse files
authored
Add nack config and disable ulpfec when h264/h265 is used (#880)
1 parent 7d8e854 commit 1a139ab

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

source/agent/webrtc/sdpInfo.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,16 @@ class SdpInfo {
249249
// }
250250
// }
251251

252+
// Remove ulpfec if h264/h265 is selected
253+
const selectedCodec = codecMap.get(selectedPayload);
254+
if (['h264', 'h265'].includes(selectedCodec)) {
255+
codecMap.forEach((codec, pt) => {
256+
if (codec === 'ulpfec') {
257+
relatedPayloads.delete(pt);
258+
}
259+
});
260+
}
261+
252262
relatedPayloads.add(selectedPayload);
253263
// Remove non-selected video payload
254264
mediaInfo.rtp = mediaInfo.rtp.filter(

source/core/rtc_adapter/VideoReceiveAdapter.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ void VideoReceiveAdapterImpl::CreateReceiveVideo()
191191
default_config.rtp.rtcp_mode = webrtc::RtcpMode::kReducedSize;
192192
default_config.rtp.remote_ssrc = m_config.ssrc;
193193
default_config.rtp.red_payload_type = RED_90000_PT;
194+
default_config.rtp.nack.rtp_history_ms = 500;
194195
if (m_config.transport_cc) {
195196
RTC_LOG(LS_INFO) << "TransportSequenceNumber Extension Enabled";
196197
default_config.rtp.transport_cc = true;

0 commit comments

Comments
 (0)