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

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

Issue 2686043006: WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include "webrtc/voice_engine/channel_proxy.h"
11 #include "webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixtu re.h" 12 #include "webrtc/voice_engine/test/auto_test/fixtures/after_initialization_fixtu re.h"
13 #include "webrtc/voice_engine/voice_engine_impl.h"
12 14
13 class CodecBeforeStreamingTest : public AfterInitializationFixture { 15 class CodecBeforeStreamingTest : public AfterInitializationFixture {
14 protected: 16 protected:
15 void SetUp() { 17 void SetUp() {
16 memset(&codec_instance_, 0, sizeof(codec_instance_)); 18 memset(&codec_instance_, 0, sizeof(codec_instance_));
17 codec_instance_.channels = 1; 19 codec_instance_.channels = 1;
18 codec_instance_.plfreq = 16000; 20 codec_instance_.plfreq = 16000;
19 codec_instance_.pacsize = 480; 21 codec_instance_.pacsize = 480;
20 22
21 channel_ = voe_base_->CreateChannel(); 23 channel_ = voe_base_->CreateChannel();
24 static_cast<webrtc::VoiceEngineImpl*>(voice_engine_)
25 ->GetChannelProxy(channel_)
26 ->RegisterLegacyCodecs();
22 } 27 }
23 28
24 void TearDown() { 29 void TearDown() {
25 voe_base_->DeleteChannel(channel_); 30 voe_base_->DeleteChannel(channel_);
26 } 31 }
27 32
28 webrtc::CodecInst codec_instance_; 33 webrtc::CodecInst codec_instance_;
29 int channel_; 34 int channel_;
30 }; 35 };
31 36
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 EXPECT_EQ(0, voe_codec_->GetRecPayloadType(channel_, codec_instance_)); 79 EXPECT_EQ(0, voe_codec_->GetRecPayloadType(channel_, codec_instance_));
75 80
76 EXPECT_EQ(123, codec_instance_.pltype); 81 EXPECT_EQ(123, codec_instance_.pltype);
77 82
78 codec_instance_.pltype = original_pltype; 83 codec_instance_.pltype = original_pltype;
79 EXPECT_EQ(0, voe_codec_->SetRecPayloadType(channel_, codec_instance_)); 84 EXPECT_EQ(0, voe_codec_->SetRecPayloadType(channel_, codec_instance_));
80 EXPECT_EQ(0, voe_codec_->GetRecPayloadType(channel_, codec_instance_)); 85 EXPECT_EQ(0, voe_codec_->GetRecPayloadType(channel_, codec_instance_));
81 86
82 EXPECT_EQ(original_pltype, codec_instance_.pltype); 87 EXPECT_EQ(original_pltype, codec_instance_.pltype);
83 } 88 }
OLDNEW
« no previous file with comments | « webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698