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

Side by Side Diff: webrtc/voice_engine/test/auto_test/standard/dtmf_test.cc

Issue 2689183002: Clean out platform specific things from voice_engine_defines.h. (Closed)
Patch Set: more remove Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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 26 matching lines...) Expand all
37 // This test modifies the DTMF payload type from the default 106 to 88 37 // This test modifies the DTMF payload type from the default 106 to 88
38 // and then runs through 16 DTMF out.of-band events. 38 // and then runs through 16 DTMF out.of-band events.
39 TEST_F(DtmfTest, ManualCanChangeDtmfPayloadType) { 39 TEST_F(DtmfTest, ManualCanChangeDtmfPayloadType) {
40 webrtc::CodecInst codec_instance = webrtc::CodecInst(); 40 webrtc::CodecInst codec_instance = webrtc::CodecInst();
41 41
42 TEST_LOG("Changing DTMF payload type.\n"); 42 TEST_LOG("Changing DTMF payload type.\n");
43 43
44 // Start by modifying the receiving side. 44 // Start by modifying the receiving side.
45 for (int i = 0; i < voe_codec_->NumOfCodecs(); i++) { 45 for (int i = 0; i < voe_codec_->NumOfCodecs(); i++) {
46 EXPECT_EQ(0, voe_codec_->GetCodec(i, codec_instance)); 46 EXPECT_EQ(0, voe_codec_->GetCodec(i, codec_instance));
47 if (!_stricmp("telephone-event", codec_instance.plname)) { 47 if (!STR_CASE_CMP("telephone-event", codec_instance.plname)) {
48 codec_instance.pltype = 88; // Use 88 instead of default 106. 48 codec_instance.pltype = 88; // Use 88 instead of default 106.
49 EXPECT_EQ(0, voe_base_->StopSend(channel_)); 49 EXPECT_EQ(0, voe_base_->StopSend(channel_));
50 EXPECT_EQ(0, voe_base_->StopPlayout(channel_)); 50 EXPECT_EQ(0, voe_base_->StopPlayout(channel_));
51 EXPECT_EQ(0, voe_codec_->SetRecPayloadType(channel_, codec_instance)); 51 EXPECT_EQ(0, voe_codec_->SetRecPayloadType(channel_, codec_instance));
52 EXPECT_EQ(0, voe_base_->StartPlayout(channel_)); 52 EXPECT_EQ(0, voe_base_->StartPlayout(channel_));
53 EXPECT_EQ(0, voe_base_->StartSend(channel_)); 53 EXPECT_EQ(0, voe_base_->StartSend(channel_));
54 break; 54 break;
55 } 55 }
56 } 56 }
57 57
58 Sleep(500); 58 Sleep(500);
59 59
60 // Next, we must modify the sending side as well. 60 // Next, we must modify the sending side as well.
61 EXPECT_TRUE( 61 EXPECT_TRUE(
62 channel_proxy_->SetSendTelephoneEventPayloadType(codec_instance.pltype, 62 channel_proxy_->SetSendTelephoneEventPayloadType(codec_instance.pltype,
63 codec_instance.plfreq)); 63 codec_instance.plfreq));
64 64
65 RunSixteenDtmfEvents(); 65 RunSixteenDtmfEvents();
66 } 66 }
OLDNEW
« no previous file with comments | « webrtc/voice_engine/test/auto_test/standard/codec_test.cc ('k') | webrtc/voice_engine/voice_engine_defines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698