Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Unified Diff: webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc

Issue 2388153004: Stop using old AudioCodingModule::RegisterReceiveCodec overloads (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc
diff --git a/webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc b/webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc
index 9f6eb5c9c0871ba17faae3b88d6b13a51dc3c924..7d61b8c935a26cf2f0a0a4872223d701f59b2add 100644
--- a/webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc
+++ b/webrtc/modules/audio_coding/acm2/acm_receive_test_oldapi.cc
@@ -132,7 +132,9 @@ void AcmReceiveTestOldApi::RegisterDefaultCodecs() {
for (int n = 0; n < acm_->NumberOfCodecs(); n++) {
ASSERT_EQ(0, acm_->Codec(n, &my_codec_param)) << "Failed to get codec.";
if (ModifyAndUseThisCodec(&my_codec_param)) {
- ASSERT_EQ(0, acm_->RegisterReceiveCodec(my_codec_param))
+ ASSERT_EQ(true,
+ acm_->RegisterReceiveCodec(my_codec_param.pltype,
+ CodecInstToSdp(my_codec_param)))
<< "Couldn't register receive codec.\n";
}
}
@@ -151,22 +153,14 @@ void AcmReceiveTestOldApi::RegisterNetEqTestCodecs() {
my_codec_param.plfreq,
my_codec_param.channels,
&my_codec_param.pltype)) {
- ASSERT_EQ(0, acm_->RegisterReceiveCodec(my_codec_param))
+ ASSERT_EQ(true,
+ acm_->RegisterReceiveCodec(my_codec_param.pltype,
+ CodecInstToSdp(my_codec_param)))
<< "Couldn't register receive codec.\n";
}
}
}
-int AcmReceiveTestOldApi::RegisterExternalReceiveCodec(
- int rtp_payload_type,
- AudioDecoder* external_decoder,
- int sample_rate_hz,
- int num_channels,
- const std::string& name) {
- return acm_->RegisterExternalReceiveCodec(rtp_payload_type, external_decoder,
- sample_rate_hz, num_channels, name);
-}
-
void AcmReceiveTestOldApi::Run() {
for (std::unique_ptr<Packet> packet(packet_source_->NextPacket()); packet;
packet = packet_source_->NextPacket()) {

Powered by Google App Engine
This is Rietveld 408576698