Index: webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc |
diff --git a/webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc b/webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc |
index b19991251b15b0014d238f622d05a869e7fc476b..aad413acfc97ba33530366f17237b4e2e58c50d9 100644 |
--- a/webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc |
+++ b/webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc |
@@ -19,9 +19,10 @@ |
namespace webrtc { |
namespace { |
-int64_t RunComplexityTest(const AudioEncoderOpus::Config& config) { |
+int64_t RunComplexityTest(const AudioEncoderOpusConfig& config) { |
// Create encoder. |
- AudioEncoderOpus encoder(config); |
+ constexpr int payload_type = 17; |
+ AudioEncoderOpusImpl encoder(config, payload_type); |
// Open speech file. |
const std::string kInputFileName = |
webrtc::test::ResourcePath("audio_coding/speech_mono_32_48kHz", "pcm"); |
@@ -60,14 +61,14 @@ int64_t RunComplexityTest(const AudioEncoderOpus::Config& config) { |
// the lower rate. |
TEST(AudioEncoderOpusComplexityAdaptationTest, AdaptationOn) { |
// Create config. |
- AudioEncoderOpus::Config config; |
+ AudioEncoderOpusConfig config; |
// The limit -- including the hysteresis window -- at which the complexity |
// shuold be increased. |
- config.bitrate_bps = rtc::Optional<int>(11000 - 1); |
+ config.bitrate_bps = 11000 - 1; |
config.low_rate_complexity = 9; |
int64_t runtime_10999bps = RunComplexityTest(config); |
- config.bitrate_bps = rtc::Optional<int>(15500); |
+ config.bitrate_bps = 15500; |
int64_t runtime_15500bps = RunComplexityTest(config); |
test::PrintResult("opus_encoding_complexity_ratio", "", "adaptation_on", |
@@ -80,14 +81,14 @@ TEST(AudioEncoderOpusComplexityAdaptationTest, AdaptationOn) { |
// that the resulting ratio is less than 100% at all times. |
TEST(AudioEncoderOpusComplexityAdaptationTest, AdaptationOff) { |
// Create config. |
- AudioEncoderOpus::Config config; |
+ AudioEncoderOpusConfig config; |
// The limit -- including the hysteresis window -- at which the complexity |
// shuold be increased (but not in this test since complexity adaptation is |
// disabled). |
- config.bitrate_bps = rtc::Optional<int>(11000 - 1); |
+ config.bitrate_bps = 11000 - 1; |
int64_t runtime_10999bps = RunComplexityTest(config); |
- config.bitrate_bps = rtc::Optional<int>(15500); |
+ config.bitrate_bps = 15500; |
int64_t runtime_15500bps = RunComplexityTest(config); |
test::PrintResult("opus_encoding_complexity_ratio", "", "adaptation_off", |