| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 acm_a_->InitializeReceiver(); | 134 acm_a_->InitializeReceiver(); |
| 135 acm_b_->InitializeReceiver(); | 135 acm_b_->InitializeReceiver(); |
| 136 | 136 |
| 137 uint8_t num_encoders = acm_a_->NumberOfCodecs(); | 137 uint8_t num_encoders = acm_a_->NumberOfCodecs(); |
| 138 CodecInst my_codec_param; | 138 CodecInst my_codec_param; |
| 139 for (uint8_t n = 0; n < num_encoders; n++) { | 139 for (uint8_t n = 0; n < num_encoders; n++) { |
| 140 acm_b_->Codec(n, &my_codec_param); | 140 acm_b_->Codec(n, &my_codec_param); |
| 141 if (!strcmp(my_codec_param.plname, "opus")) { | 141 if (!strcmp(my_codec_param.plname, "opus")) { |
| 142 my_codec_param.channels = 1; | 142 my_codec_param.channels = 1; |
| 143 } | 143 } |
| 144 acm_b_->RegisterReceiveCodec(my_codec_param); | 144 acm_b_->RegisterReceiveCodec(my_codec_param.pltype, |
| 145 CodecInstToSdp(my_codec_param)); |
| 145 } | 146 } |
| 146 | 147 |
| 147 // Create and connect the channel | 148 // Create and connect the channel |
| 148 channel_a_to_b_ = new TestPack; | 149 channel_a_to_b_ = new TestPack; |
| 149 acm_a_->RegisterTransportCallback(channel_a_to_b_); | 150 acm_a_->RegisterTransportCallback(channel_a_to_b_); |
| 150 channel_a_to_b_->RegisterReceiverACM(acm_b_.get()); | 151 channel_a_to_b_->RegisterReceiverACM(acm_b_.get()); |
| 151 | 152 |
| 152 // All codecs are tested for all allowed sampling frequencies, rates and | 153 // All codecs are tested for all allowed sampling frequencies, rates and |
| 153 // packet sizes. | 154 // packet sizes. |
| 154 #ifdef WEBRTC_CODEC_G722 | 155 #ifdef WEBRTC_CODEC_G722 |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 } | 482 } |
| 482 | 483 |
| 483 void TestAllCodecs::DisplaySendReceiveCodec() { | 484 void TestAllCodecs::DisplaySendReceiveCodec() { |
| 484 CodecInst my_codec_param; | 485 CodecInst my_codec_param; |
| 485 printf("%s -> ", acm_a_->SendCodec()->plname); | 486 printf("%s -> ", acm_a_->SendCodec()->plname); |
| 486 acm_b_->ReceiveCodec(&my_codec_param); | 487 acm_b_->ReceiveCodec(&my_codec_param); |
| 487 printf("%s\n", my_codec_param.plname); | 488 printf("%s\n", my_codec_param.plname); |
| 488 } | 489 } |
| 489 | 490 |
| 490 } // namespace webrtc | 491 } // namespace webrtc |
| OLD | NEW |