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

Side by Side Diff: webrtc/modules/audio_coding/main/test/TestStereo.cc

Issue 1406123011: Let AudioCodingModule::SendCodec return Maybe<CodecInst> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: review fix Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 void TestStereo::OpenOutFile(int16_t test_number) { 816 void TestStereo::OpenOutFile(int16_t test_number) {
817 std::string file_name; 817 std::string file_name;
818 std::stringstream file_stream; 818 std::stringstream file_stream;
819 file_stream << webrtc::test::OutputPath() << "teststereo_out_" << test_number 819 file_stream << webrtc::test::OutputPath() << "teststereo_out_" << test_number
820 << ".pcm"; 820 << ".pcm";
821 file_name = file_stream.str(); 821 file_name = file_stream.str();
822 out_file_.Open(file_name, 32000, "wb"); 822 out_file_.Open(file_name, 32000, "wb");
823 } 823 }
824 824
825 void TestStereo::DisplaySendReceiveCodec() { 825 void TestStereo::DisplaySendReceiveCodec() {
826 CodecInst my_codec_param; 826 auto send_codec = acm_a_->SendCodec();
827 acm_a_->SendCodec(&my_codec_param);
828 if (test_mode_ != 0) { 827 if (test_mode_ != 0) {
829 printf("%s -> ", my_codec_param.plname); 828 ASSERT_TRUE(send_codec);
829 printf("%s -> ", send_codec->plname);
830 } 830 }
831 acm_b_->ReceiveCodec(&my_codec_param); 831 CodecInst receive_codec;
832 acm_b_->ReceiveCodec(&receive_codec);
832 if (test_mode_ != 0) { 833 if (test_mode_ != 0) {
833 printf("%s\n", my_codec_param.plname); 834 printf("%s\n", receive_codec.plname);
834 } 835 }
835 } 836 }
836 837
837 } // namespace webrtc 838 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/main/test/TestAllCodecs.cc ('k') | webrtc/modules/audio_coding/main/test/TestVADDTX.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698