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

Side by Side Diff: webrtc/call/call_unittest.cc

Issue 1403363003: Move VoiceEngineObserver into AudioSendStream so that we detect typing noises and return properly i… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: missing file 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) 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
11 #include <list> 11 #include <list>
12 12
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 #include "webrtc/audio_state.h"
15 #include "webrtc/call.h" 16 #include "webrtc/call.h"
16 #include "webrtc/test/fake_voice_engine.h" 17 #include "webrtc/test/fake_voice_engine.h"
17 18
18 namespace { 19 namespace {
19 20
20 struct CallHelper { 21 struct CallHelper {
21 CallHelper() : voice_engine_(new webrtc::test::FakeVoiceEngine()) { 22 CallHelper() : voice_engine_(new webrtc::test::FakeVoiceEngine()) {
23 webrtc::AudioState::Config audio_state_config;
24 audio_state_config.voice_engine = voice_engine_.get();
22 webrtc::Call::Config config; 25 webrtc::Call::Config config;
23 config.voice_engine = voice_engine_.get(); 26 config.audio_state = webrtc::AudioState::Create(audio_state_config);
24 call_.reset(webrtc::Call::Create(config)); 27 call_.reset(webrtc::Call::Create(config));
25 } 28 }
26 29
27 webrtc::Call* operator->() { return call_.get(); } 30 webrtc::Call* operator->() { return call_.get(); }
28 31
29 private: 32 private:
30 rtc::scoped_ptr<webrtc::test::FakeVoiceEngine> voice_engine_; 33 rtc::scoped_ptr<webrtc::test::FakeVoiceEngine> voice_engine_;
31 rtc::scoped_ptr<webrtc::Call> call_; 34 rtc::scoped_ptr<webrtc::Call> call_;
32 }; 35 };
33 } // namespace 36 } // namespace
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 streams.push_front(stream); 100 streams.push_front(stream);
98 } 101 }
99 } 102 }
100 for (auto s : streams) { 103 for (auto s : streams) {
101 call->DestroyAudioReceiveStream(s); 104 call->DestroyAudioReceiveStream(s);
102 } 105 }
103 streams.clear(); 106 streams.clear();
104 } 107 }
105 } 108 }
106 } // namespace webrtc 109 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698