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

Side by Side Diff: webrtc/audio/audio_receive_stream_unittest.cc

Issue 2669153004: Remove remaining calls to VoE APIs from Audio[Send|Receive]Stream. (Closed)
Patch Set: logging bug 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
« no previous file with comments | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/audio/audio_send_stream.cc » ('j') | 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 MockVoiceEngine& voice_engine() { return voice_engine_; } 136 MockVoiceEngine& voice_engine() { return voice_engine_; }
137 MockVoEChannelProxy* channel_proxy() { return channel_proxy_; } 137 MockVoEChannelProxy* channel_proxy() { return channel_proxy_; }
138 138
139 void SetupMockForBweFeedback(bool send_side_bwe) { 139 void SetupMockForBweFeedback(bool send_side_bwe) {
140 EXPECT_CALL(remote_bitrate_estimator_, 140 EXPECT_CALL(remote_bitrate_estimator_,
141 RemoveStream(stream_config_.rtp.remote_ssrc)); 141 RemoveStream(stream_config_.rtp.remote_ssrc));
142 } 142 }
143 143
144 void SetupMockForGetStats() { 144 void SetupMockForGetStats() {
145 using testing::DoAll; 145 using testing::DoAll;
146 using testing::SetArgReferee; 146 using testing::SetArgPointee;
147 147
148 ASSERT_TRUE(channel_proxy_); 148 ASSERT_TRUE(channel_proxy_);
149 EXPECT_CALL(*channel_proxy_, GetRTCPStatistics()) 149 EXPECT_CALL(*channel_proxy_, GetRTCPStatistics())
150 .WillOnce(Return(kCallStats)); 150 .WillOnce(Return(kCallStats));
151 EXPECT_CALL(*channel_proxy_, GetDelayEstimate()) 151 EXPECT_CALL(*channel_proxy_, GetDelayEstimate())
152 .WillOnce(Return(kJitterBufferDelay + kPlayoutBufferDelay)); 152 .WillOnce(Return(kJitterBufferDelay + kPlayoutBufferDelay));
153 EXPECT_CALL(*channel_proxy_, GetSpeechOutputLevelFullRange()) 153 EXPECT_CALL(*channel_proxy_, GetSpeechOutputLevelFullRange())
154 .WillOnce(Return(kSpeechOutputLevel)); 154 .WillOnce(Return(kSpeechOutputLevel));
155 EXPECT_CALL(*channel_proxy_, GetNetworkStatistics()) 155 EXPECT_CALL(*channel_proxy_, GetNetworkStatistics())
156 .WillOnce(Return(kNetworkStats)); 156 .WillOnce(Return(kNetworkStats));
157 EXPECT_CALL(*channel_proxy_, GetDecodingCallStatistics()) 157 EXPECT_CALL(*channel_proxy_, GetDecodingCallStatistics())
158 .WillOnce(Return(kAudioDecodeStats)); 158 .WillOnce(Return(kAudioDecodeStats));
159 159 EXPECT_CALL(*channel_proxy_, GetRecCodec(_))
160 EXPECT_CALL(voice_engine_, GetRecCodec(kChannelId, _)) 160 .WillOnce(DoAll(SetArgPointee<0>(kCodecInst), Return(true)));
161 .WillOnce(DoAll(SetArgReferee<1>(kCodecInst), Return(0)));
162 } 161 }
163 162
164 private: 163 private:
165 PacketRouter packet_router_; 164 PacketRouter packet_router_;
166 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; 165 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
167 MockRemoteBitrateEstimator remote_bitrate_estimator_; 166 MockRemoteBitrateEstimator remote_bitrate_estimator_;
168 MockRtcEventLog event_log_; 167 MockRtcEventLog event_log_;
169 testing::StrictMock<MockVoiceEngine> voice_engine_; 168 testing::StrictMock<MockVoiceEngine> voice_engine_;
170 rtc::scoped_refptr<AudioState> audio_state_; 169 rtc::scoped_refptr<AudioState> audio_state_;
171 rtc::scoped_refptr<MockAudioMixer> audio_mixer_; 170 rtc::scoped_refptr<MockAudioMixer> audio_mixer_;
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 363
365 EXPECT_CALL(helper.voice_engine(), StartPlayout(_)).WillOnce(Return(0)); 364 EXPECT_CALL(helper.voice_engine(), StartPlayout(_)).WillOnce(Return(0));
366 EXPECT_CALL(helper.voice_engine(), StopPlayout(_)); 365 EXPECT_CALL(helper.voice_engine(), StopPlayout(_));
367 EXPECT_CALL(*helper.audio_mixer(), AddSource(&recv_stream)) 366 EXPECT_CALL(*helper.audio_mixer(), AddSource(&recv_stream))
368 .WillOnce(Return(true)); 367 .WillOnce(Return(true));
369 368
370 recv_stream.Start(); 369 recv_stream.Start();
371 } 370 }
372 } // namespace test 371 } // namespace test
373 } // namespace webrtc 372 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/audio/audio_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698