Add experiment to disable ulpfec.
BUG=None Review-Url: https://codereview.webrtc.org/2997363002 Cr-Commit-Position: refs/heads/master@{#19471}
This commit is contained in:
parent
45ca37c022
commit
60e10c794e
@ -987,6 +987,11 @@ void VideoSendStreamImpl::ConfigureProtection() {
|
||||
auto IsUlpfecEnabled = [&]() { return ulpfec_payload_type >= 0; };
|
||||
auto DisableUlpfec = [&]() { ulpfec_payload_type = -1; };
|
||||
|
||||
if (webrtc::field_trial::IsEnabled("WebRTC-DisableUlpFecExperiment")) {
|
||||
LOG(LS_INFO) << "Experiment to disable sending ULPFEC is enabled.";
|
||||
DisableUlpfec();
|
||||
}
|
||||
|
||||
// If enabled, FlexFEC takes priority over RED+ULPFEC.
|
||||
if (flexfec_enabled) {
|
||||
// We can safely disable RED here, because if the remote supports FlexFEC,
|
||||
@ -1045,9 +1050,7 @@ void VideoSendStreamImpl::ConfigureProtection() {
|
||||
true,
|
||||
kMinSendSidePacketHistorySize);
|
||||
// Set RED/ULPFEC information.
|
||||
for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
|
||||
rtp_rtcp->SetUlpfecConfig(red_payload_type, ulpfec_payload_type);
|
||||
}
|
||||
rtp_rtcp->SetUlpfecConfig(red_payload_type, ulpfec_payload_type);
|
||||
}
|
||||
|
||||
// Currently, both ULPFEC and FlexFEC use the same FEC rate calculation logic,
|
||||
|
||||
@ -554,6 +554,20 @@ TEST_F(VideoSendStreamTest, SupportsUlpfecWithoutExtensions) {
|
||||
RunBaseTest(&test);
|
||||
}
|
||||
|
||||
class VideoSendStreamWithoutUlpfecTest : public VideoSendStreamTest {
|
||||
protected:
|
||||
VideoSendStreamWithoutUlpfecTest()
|
||||
: field_trial_("WebRTC-DisableUlpFecExperiment/Enabled/") {}
|
||||
|
||||
test::ScopedFieldTrials field_trial_;
|
||||
};
|
||||
|
||||
TEST_F(VideoSendStreamWithoutUlpfecTest, NoUlpfecIfDisabledThroughFieldTrial) {
|
||||
std::unique_ptr<VideoEncoder> encoder(VP8Encoder::Create());
|
||||
UlpfecObserver test(false, false, true, false, "VP8", encoder.get());
|
||||
RunBaseTest(&test);
|
||||
}
|
||||
|
||||
// The FEC scheme used is not efficient for H264, so we should not use RED/FEC
|
||||
// since we'll still have to re-request FEC packets, effectively wasting
|
||||
// bandwidth since the receiver has to wait for FEC retransmissions to determine
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user