Update Call Scenario test framwork to use defaults from Chrome

Default send transport wide sequence numbers on audio
Use 32kbit/s audio.
Pace in bursts 40ms, See chromium:1354491

Bug: none
Change-Id: I40b1305ce71478749723a53f6cc84669ddf930e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285883
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38827}
This commit is contained in:
Per Kjellander 2022-12-02 16:07:09 +01:00 committed by WebRTC LUCI CQ
parent fcbf3724eb
commit ce79f873e7
4 changed files with 16 additions and 9 deletions

View File

@ -93,9 +93,10 @@ SendAudioStream::SendAudioStream(
RTC_DCHECK_LE(config.source.channels, 2); RTC_DCHECK_LE(config.source.channels, 2);
send_config.encoder_factory = encoder_factory; send_config.encoder_factory = encoder_factory;
if (config.encoder.fixed_rate) bool use_fixed_rate = !config.encoder.min_rate && !config.encoder.max_rate;
if (use_fixed_rate)
send_config.send_codec_spec->target_bitrate_bps = send_config.send_codec_spec->target_bitrate_bps =
config.encoder.fixed_rate->bps(); config.encoder.fixed_rate.bps();
if (!config.adapt.binary_proto.empty()) { if (!config.adapt.binary_proto.empty()) {
send_config.audio_network_adaptor_config = config.adapt.binary_proto; send_config.audio_network_adaptor_config = config.adapt.binary_proto;
} else if (config.network_adaptation) { } else if (config.network_adaptation) {
@ -106,9 +107,9 @@ SendAudioStream::SendAudioStream(
config.stream.in_bandwidth_estimation) { config.stream.in_bandwidth_estimation) {
DataRate min_rate = DataRate::Infinity(); DataRate min_rate = DataRate::Infinity();
DataRate max_rate = DataRate::Infinity(); DataRate max_rate = DataRate::Infinity();
if (config.encoder.fixed_rate) { if (use_fixed_rate) {
min_rate = *config.encoder.fixed_rate; min_rate = config.encoder.fixed_rate;
max_rate = *config.encoder.fixed_rate; max_rate = config.encoder.fixed_rate;
} else { } else {
min_rate = *config.encoder.min_rate; min_rate = *config.encoder.min_rate;
max_rate = *config.encoder.max_rate; max_rate = *config.encoder.max_rate;

View File

@ -70,6 +70,7 @@ Call* CreateCall(TimeController* time_controller,
call_config.task_queue_factory = time_controller->GetTaskQueueFactory(); call_config.task_queue_factory = time_controller->GetTaskQueueFactory();
call_config.network_controller_factory = network_controller_factory; call_config.network_controller_factory = network_controller_factory;
call_config.audio_state = audio_state; call_config.audio_state = audio_state;
call_config.pacer_burst_interval = config.pacer_burst_interval;
call_config.trials = config.field_trials; call_config.trials = config.field_trials;
Clock* clock = time_controller->GetClock(); Clock* clock = time_controller->GetClock();
return Call::Create(call_config, clock, return Call::Create(call_config, clock,

View File

@ -53,6 +53,10 @@ struct TransportControllerConfig {
struct CallClientConfig { struct CallClientConfig {
TransportControllerConfig transport; TransportControllerConfig transport;
// Allows the pacer to send out multiple packets in a burst.
// The number of bites that can be sent in one burst is pacer_burst_interval *
// current bwe. 40ms is the default Chrome setting.
TimeDelta pacer_burst_interval = TimeDelta::Millis(40);
const FieldTrialsView* field_trials = nullptr; const FieldTrialsView* field_trials = nullptr;
}; };
@ -194,7 +198,8 @@ struct AudioStreamConfig {
~Encoder(); ~Encoder();
bool allocate_bitrate = false; bool allocate_bitrate = false;
bool enable_dtx = false; bool enable_dtx = false;
absl::optional<DataRate> fixed_rate; DataRate fixed_rate = DataRate::KilobitsPerSec(32);
// Overrides fixed rate.
absl::optional<DataRate> min_rate; absl::optional<DataRate> min_rate;
absl::optional<DataRate> max_rate; absl::optional<DataRate> max_rate;
TimeDelta initial_frame_length = TimeDelta::Millis(20); TimeDelta initial_frame_length = TimeDelta::Millis(20);
@ -203,8 +208,8 @@ struct AudioStreamConfig {
Stream(); Stream();
Stream(const Stream&); Stream(const Stream&);
~Stream(); ~Stream();
bool abs_send_time = false; bool abs_send_time = true;
bool in_bandwidth_estimation = false; bool in_bandwidth_estimation = true;
} stream; } stream;
struct Rendering { struct Rendering {
std::string sync_group; std::string sync_group;

View File

@ -91,7 +91,7 @@ TEST(ScenarioAnalyzerTest, PsnrIsLowWhenNetworkIsBad) {
// might change due to changes in configuration and encoder etc. // might change due to changes in configuration and encoder etc.
EXPECT_NEAR(analyzer.stats().psnr_with_freeze.Mean(), 20, 10); EXPECT_NEAR(analyzer.stats().psnr_with_freeze.Mean(), 20, 10);
EXPECT_NEAR(stats.call.stats().target_rate.Mean().kbps(), 75, 50); EXPECT_NEAR(stats.call.stats().target_rate.Mean().kbps(), 75, 50);
EXPECT_NEAR(stats.video_send.stats().media_bitrate.Mean().kbps(), 100, 50); EXPECT_NEAR(stats.video_send.stats().media_bitrate.Mean().kbps(), 70, 30);
EXPECT_NEAR(stats.video_receive.stats().resolution.Mean(), 180, 10); EXPECT_NEAR(stats.video_receive.stats().resolution.Mean(), 180, 10);
EXPECT_NEAR(stats.audio_receive.stats().jitter_buffer.Mean().ms(), 250, 200); EXPECT_NEAR(stats.audio_receive.stats().jitter_buffer.Mean().ms(), 250, 200);
} }