guard flexfec usage with fieldtrial
otherwise if the client receives a flexfec-enabled offer and receiving flexfec is enabled by default, an answer or subsequent offer will enable sending flexfec. BUG=webrtc:8151 Change-Id: I632094f69ffa68518b6b8f31175eb093efaf51c6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/193862 Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com> Cr-Commit-Position: refs/heads/master@{#32628}
This commit is contained in:
parent
a4fd641f51
commit
fedc7ab1f2
@ -803,6 +803,7 @@ if (rtc_include_tests) {
|
||||
"../rtc_base:rtc_base_tests_utils",
|
||||
"../rtc_base/third_party/sigslot",
|
||||
"../system_wrappers:metrics",
|
||||
"../test:field_trial",
|
||||
"../test:test_main",
|
||||
"../test:test_support",
|
||||
"//third_party/abseil-cpp/absl/algorithm:container",
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/third_party/base64/base64.h"
|
||||
#include "rtc_base/unique_id_generator.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@ -336,6 +337,12 @@ static StreamParams CreateStreamParamsForNewSenderWithSsrcs(
|
||||
"a single media streams. This session has multiple "
|
||||
"media streams however, so no FlexFEC SSRC will be generated.";
|
||||
}
|
||||
if (include_flexfec_stream &&
|
||||
!webrtc::field_trial::IsEnabled("WebRTC-FlexFEC-03")) {
|
||||
include_flexfec_stream = false;
|
||||
RTC_LOG(LS_WARNING)
|
||||
<< "WebRTC-FlexFEC trial is not enabled, not sending FlexFEC";
|
||||
}
|
||||
|
||||
result.GenerateSsrcs(sender.num_sim_layers, include_rtx_streams,
|
||||
include_flexfec_stream, ssrc_generator);
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
#include "rtc_base/ssl_adapter.h"
|
||||
#include "rtc_base/strings/string_builder.h"
|
||||
#include "rtc_base/unique_id_generator.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gmock.h"
|
||||
|
||||
#define ASSERT_CRYPTO(cd, s, cs) \
|
||||
@ -3456,8 +3457,10 @@ TEST_F(MediaSessionDescriptionFactoryTest, SimSsrcsGenerateMultipleRtxSsrcs) {
|
||||
}
|
||||
|
||||
// Test that, when the FlexFEC codec is added, a FlexFEC ssrc is created
|
||||
// together with a FEC-FR grouping.
|
||||
// together with a FEC-FR grouping. Guarded by WebRTC-FlexFEC-03 trial.
|
||||
TEST_F(MediaSessionDescriptionFactoryTest, GenerateFlexfecSsrc) {
|
||||
webrtc::test::ScopedFieldTrials override_field_trials(
|
||||
"WebRTC-FlexFEC-03/Enabled/");
|
||||
MediaSessionOptions opts;
|
||||
AddMediaDescriptionOptions(MEDIA_TYPE_VIDEO, "video",
|
||||
RtpTransceiverDirection::kSendRecv, kActive,
|
||||
@ -3499,6 +3502,8 @@ TEST_F(MediaSessionDescriptionFactoryTest, GenerateFlexfecSsrc) {
|
||||
// TODO(brandtr): Remove this test when we support simulcast, either through
|
||||
// multiple FlexfecSenders, or through multistream protection.
|
||||
TEST_F(MediaSessionDescriptionFactoryTest, SimSsrcsGenerateNoFlexfecSsrcs) {
|
||||
webrtc::test::ScopedFieldTrials override_field_trials(
|
||||
"WebRTC-FlexFEC-03/Enabled/");
|
||||
MediaSessionOptions opts;
|
||||
AddMediaDescriptionOptions(MEDIA_TYPE_VIDEO, "video",
|
||||
RtpTransceiverDirection::kSendRecv, kActive,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user