WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 7/inf
Convert audio/ and collateral (audio encoder copy red). Bug: webrtc:10335 Change-Id: Iac54c0cfd2f62f4402f3deec35ae2725ec35b81a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255820 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36229}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
e72f4bc524
commit
a943e730b2
@ -32,10 +32,10 @@
|
||||
#include "modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
|
||||
#include "rtc_base/task_queue_for_test.h"
|
||||
#include "system_wrappers/include/clock.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/mock_audio_encoder.h"
|
||||
#include "test/mock_audio_encoder_factory.h"
|
||||
#include "test/scoped_key_value_config.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
@ -196,7 +196,8 @@ struct ConfigHelper {
|
||||
Clock::GetRealTimeClock(), stream_config_, audio_state_,
|
||||
task_queue_factory_.get(), &rtp_transport_, &bitrate_allocator_,
|
||||
&event_log_, absl::nullopt,
|
||||
std::unique_ptr<voe::ChannelSendInterface>(channel_send_)));
|
||||
std::unique_ptr<voe::ChannelSendInterface>(channel_send_),
|
||||
field_trials));
|
||||
}
|
||||
|
||||
AudioSendStream::Config& config() { return stream_config_; }
|
||||
@ -321,6 +322,8 @@ struct ConfigHelper {
|
||||
|
||||
TaskQueueForTest* worker() { return &worker_queue_; }
|
||||
|
||||
test::ScopedKeyValueConfig field_trials;
|
||||
|
||||
private:
|
||||
SimulatedClock clock_;
|
||||
std::unique_ptr<TaskQueueFactory> task_queue_factory_;
|
||||
@ -659,10 +662,10 @@ TEST(AudioSendStreamTest, SSBweTargetInRangeRespected) {
|
||||
}
|
||||
|
||||
TEST(AudioSendStreamTest, SSBweFieldTrialMinRespected) {
|
||||
ScopedFieldTrials field_trials(
|
||||
"WebRTC-Audio-Allocation/min:6kbps,max:64kbps/");
|
||||
for (bool use_null_audio_processing : {false, true}) {
|
||||
ConfigHelper helper(true, true, use_null_audio_processing);
|
||||
ScopedKeyValueConfig field_trials(
|
||||
helper.field_trials, "WebRTC-Audio-Allocation/min:6kbps,max:64kbps/");
|
||||
auto send_stream = helper.CreateAudioSendStream();
|
||||
EXPECT_CALL(
|
||||
*helper.channel_send(),
|
||||
@ -676,10 +679,10 @@ TEST(AudioSendStreamTest, SSBweFieldTrialMinRespected) {
|
||||
}
|
||||
|
||||
TEST(AudioSendStreamTest, SSBweFieldTrialMaxRespected) {
|
||||
ScopedFieldTrials field_trials(
|
||||
"WebRTC-Audio-Allocation/min:6kbps,max:64kbps/");
|
||||
for (bool use_null_audio_processing : {false, true}) {
|
||||
ConfigHelper helper(true, true, use_null_audio_processing);
|
||||
ScopedKeyValueConfig field_trials(
|
||||
helper.field_trials, "WebRTC-Audio-Allocation/min:6kbps,max:64kbps/");
|
||||
auto send_stream = helper.CreateAudioSendStream();
|
||||
EXPECT_CALL(
|
||||
*helper.channel_send(),
|
||||
@ -693,10 +696,10 @@ TEST(AudioSendStreamTest, SSBweFieldTrialMaxRespected) {
|
||||
}
|
||||
|
||||
TEST(AudioSendStreamTest, SSBweWithOverhead) {
|
||||
ScopedFieldTrials field_trials(
|
||||
"WebRTC-Audio-LegacyOverhead/Disabled/");
|
||||
for (bool use_null_audio_processing : {false, true}) {
|
||||
ConfigHelper helper(true, true, use_null_audio_processing);
|
||||
ScopedKeyValueConfig field_trials(helper.field_trials,
|
||||
"WebRTC-Audio-LegacyOverhead/Disabled/");
|
||||
EXPECT_CALL(*helper.rtp_rtcp(), ExpectedPerPacketOverhead)
|
||||
.WillRepeatedly(Return(kOverheadPerPacket.bytes<size_t>()));
|
||||
auto send_stream = helper.CreateAudioSendStream();
|
||||
@ -714,11 +717,12 @@ TEST(AudioSendStreamTest, SSBweWithOverhead) {
|
||||
}
|
||||
|
||||
TEST(AudioSendStreamTest, SSBweWithOverheadMinRespected) {
|
||||
ScopedFieldTrials field_trials(
|
||||
"WebRTC-Audio-LegacyOverhead/Disabled/"
|
||||
"WebRTC-Audio-Allocation/min:6kbps,max:64kbps/");
|
||||
for (bool use_null_audio_processing : {false, true}) {
|
||||
ConfigHelper helper(true, true, use_null_audio_processing);
|
||||
ScopedKeyValueConfig field_trials(
|
||||
helper.field_trials,
|
||||
"WebRTC-Audio-LegacyOverhead/Disabled/"
|
||||
"WebRTC-Audio-Allocation/min:6kbps,max:64kbps/");
|
||||
EXPECT_CALL(*helper.rtp_rtcp(), ExpectedPerPacketOverhead)
|
||||
.WillRepeatedly(Return(kOverheadPerPacket.bytes<size_t>()));
|
||||
auto send_stream = helper.CreateAudioSendStream();
|
||||
@ -734,11 +738,12 @@ TEST(AudioSendStreamTest, SSBweWithOverheadMinRespected) {
|
||||
}
|
||||
|
||||
TEST(AudioSendStreamTest, SSBweWithOverheadMaxRespected) {
|
||||
ScopedFieldTrials field_trials(
|
||||
"WebRTC-Audio-LegacyOverhead/Disabled/"
|
||||
"WebRTC-Audio-Allocation/min:6kbps,max:64kbps/");
|
||||
for (bool use_null_audio_processing : {false, true}) {
|
||||
ConfigHelper helper(true, true, use_null_audio_processing);
|
||||
ScopedKeyValueConfig field_trials(
|
||||
helper.field_trials,
|
||||
"WebRTC-Audio-LegacyOverhead/Disabled/"
|
||||
"WebRTC-Audio-Allocation/min:6kbps,max:64kbps/");
|
||||
EXPECT_CALL(*helper.rtp_rtcp(), ExpectedPerPacketOverhead)
|
||||
.WillRepeatedly(Return(kOverheadPerPacket.bytes<size_t>()));
|
||||
auto send_stream = helper.CreateAudioSendStream();
|
||||
|
||||
Reference in New Issue
Block a user