| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 ASSERT_TRUE(playout_timing_fid_ != NULL); | 87 ASSERT_TRUE(playout_timing_fid_ != NULL); |
| 88 | 88 |
| 89 next_receive_ts_ = ReceiveTimestamp(); | 89 next_receive_ts_ = ReceiveTimestamp(); |
| 90 | 90 |
| 91 CodecInst codec; | 91 CodecInst codec; |
| 92 ASSERT_EQ(0, AudioCodingModule::Codec(FLAGS_codec.c_str(), &codec, | 92 ASSERT_EQ(0, AudioCodingModule::Codec(FLAGS_codec.c_str(), &codec, |
| 93 FLAGS_codec_sample_rate_hz, | 93 FLAGS_codec_sample_rate_hz, |
| 94 FLAGS_codec_channels)); | 94 FLAGS_codec_channels)); |
| 95 ASSERT_EQ(0, receive_acm_->InitializeReceiver()); | 95 ASSERT_EQ(0, receive_acm_->InitializeReceiver()); |
| 96 ASSERT_EQ(0, send_acm_->RegisterSendCodec(codec)); | 96 ASSERT_EQ(0, send_acm_->RegisterSendCodec(codec)); |
| 97 ASSERT_EQ(0, receive_acm_->RegisterReceiveCodec(codec)); | 97 ASSERT_EQ(true, receive_acm_->RegisterReceiveCodec(codec.pltype, |
| 98 CodecInstToSdp(codec))); |
| 98 | 99 |
| 99 // Set codec-dependent parameters. | 100 // Set codec-dependent parameters. |
| 100 samples_in_1ms_ = codec.plfreq / 1000; | 101 samples_in_1ms_ = codec.plfreq / 1000; |
| 101 num_10ms_in_codec_frame_ = codec.pacsize / (codec.plfreq / 100); | 102 num_10ms_in_codec_frame_ = codec.pacsize / (codec.plfreq / 100); |
| 102 | 103 |
| 103 channel_->RegisterReceiverACM(receive_acm_.get()); | 104 channel_->RegisterReceiverACM(receive_acm_.get()); |
| 104 send_acm_->RegisterTransportCallback(channel_); | 105 send_acm_->RegisterTransportCallback(channel_); |
| 105 | 106 |
| 106 if (FLAGS_input.size() == 0) { | 107 if (FLAGS_input.size() == 0) { |
| 107 std::string file_name = test::ResourcePath("audio_coding/testfile32kHz", | 108 std::string file_name = test::ResourcePath("audio_coding/testfile32kHz", |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 if (delay_log != NULL) { | 302 if (delay_log != NULL) { |
| 302 fprintf(delay_log, "%3d %3d\n", optimal_delay_ms, current_delay_ms); | 303 fprintf(delay_log, "%3d %3d\n", optimal_delay_ms, current_delay_ms); |
| 303 } | 304 } |
| 304 } | 305 } |
| 305 } | 306 } |
| 306 std::cout << std::endl; | 307 std::cout << std::endl; |
| 307 test.TearDown(); | 308 test.TearDown(); |
| 308 if (delay_log != NULL) | 309 if (delay_log != NULL) |
| 309 fclose(delay_log); | 310 fclose(delay_log); |
| 310 } | 311 } |
| OLD | NEW |