Simplifies audio priority rate config in scenario tests.

Bug: webrtc:9510
Change-Id: Iecd2caa8d4353c64ec351969f999c8ed59c3a07d
Reviewed-on: https://webrtc-review.googlesource.com/c/110614
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25606}
This commit is contained in:
Sebastian Jansson
2018-11-12 16:33:39 +01:00
committed by Commit Bot
parent aee8380894
commit 2b101d2c9e
3 changed files with 7 additions and 9 deletions

View File

@ -9,6 +9,7 @@
*/
#include "test/scenario/audio_stream.h"
#include "rtc_base/bitrateallocationstrategy.h"
#include "test/call_test.h"
#if WEBRTC_ENABLE_PROTOBUF
@ -131,8 +132,12 @@ SendAudioStream::SendAudioStream(
{RtpExtension::kTransportSequenceNumberUri, 8}};
}
if (config.stream.rate_allocation_priority) {
if (config.encoder.priority_rate) {
send_config.track_id = sender->GetNextPriorityId();
sender_->call_->SetBitrateAllocationStrategy(
absl::make_unique<rtc::AudioPriorityBitrateAllocationStrategy>(
send_config.track_id,
config.encoder.priority_rate->bps<uint32_t>()));
}
send_stream_ = sender_->call_->CreateAudioSendStream(send_config);
if (field_trial::IsEnabled("WebRTC-SendSideBwe-WithOverhead")) {

View File

@ -147,12 +147,6 @@ CallClient::CallClient(Clock* clock,
fake_audio_setup_.audio_state)),
transport_(clock_, call_.get()),
header_parser_(RtpHeaderParser::Create()) {
if (!config.priority_target_rate.IsZero() &&
config.priority_target_rate.IsFinite()) {
call_->SetBitrateAllocationStrategy(
absl::make_unique<rtc::AudioPriorityBitrateAllocationStrategy>(
kPriorityStreamId, config.priority_target_rate.bps()));
}
} // namespace test
CallClient::~CallClient() {

View File

@ -51,7 +51,6 @@ struct TransportControllerConfig {
struct CallClientConfig {
TransportControllerConfig transport;
DataRate priority_target_rate = DataRate::Zero();
};
struct SimulatedTimeClientConfig {
@ -155,6 +154,7 @@ struct AudioStreamConfig {
absl::optional<DataRate> fixed_rate;
absl::optional<DataRate> min_rate;
absl::optional<DataRate> max_rate;
absl::optional<DataRate> priority_rate;
TimeDelta initial_frame_length = TimeDelta::ms(20);
} encoder;
struct Stream {
@ -162,7 +162,6 @@ struct AudioStreamConfig {
Stream(const Stream&);
~Stream();
bool in_bandwidth_estimation = false;
bool rate_allocation_priority = false;
} stream;
struct Render {
std::string sync_group;