OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2010 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 #ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ | 11 #ifndef WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ |
12 #define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ | 12 #define WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ |
13 | 13 |
14 #include <list> | 14 #include <list> |
15 #include <map> | 15 #include <map> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "webrtc/base/basictypes.h" | 18 #include "webrtc/base/basictypes.h" |
19 #include "webrtc/base/checks.h" | 19 #include "webrtc/base/checks.h" |
20 #include "webrtc/base/gunit.h" | 20 #include "webrtc/base/gunit.h" |
21 #include "webrtc/base/stringutils.h" | 21 #include "webrtc/base/stringutils.h" |
22 #include "webrtc/config.h" | 22 #include "webrtc/config.h" |
23 #include "webrtc/media/base/codec.h" | 23 #include "webrtc/media/base/codec.h" |
24 #include "webrtc/media/base/rtputils.h" | 24 #include "webrtc/media/base/rtputils.h" |
25 #include "webrtc/media/engine/fakewebrtccommon.h" | 25 #include "webrtc/media/engine/fakewebrtccommon.h" |
26 #include "webrtc/media/engine/webrtcvoe.h" | 26 #include "webrtc/media/engine/webrtcvoe.h" |
27 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" | 27 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" |
| 28 #include "webrtc/modules/audio_device/include/fake_audio_device.h" |
28 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 29 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
29 | 30 |
30 namespace cricket { | 31 namespace cricket { |
31 | 32 |
32 static const int kOpusBandwidthNb = 4000; | 33 static const int kOpusBandwidthNb = 4000; |
33 static const int kOpusBandwidthMb = 6000; | 34 static const int kOpusBandwidthMb = 6000; |
34 static const int kOpusBandwidthWb = 8000; | 35 static const int kOpusBandwidthWb = 8000; |
35 static const int kOpusBandwidthSwb = 12000; | 36 static const int kOpusBandwidthSwb = 12000; |
36 static const int kOpusBandwidthFb = 20000; | 37 static const int kOpusBandwidthFb = 20000; |
37 | 38 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 inited_ = true; | 300 inited_ = true; |
300 return 0; | 301 return 0; |
301 } | 302 } |
302 WEBRTC_FUNC(Terminate, ()) { | 303 WEBRTC_FUNC(Terminate, ()) { |
303 inited_ = false; | 304 inited_ = false; |
304 return 0; | 305 return 0; |
305 } | 306 } |
306 webrtc::AudioProcessing* audio_processing() override { | 307 webrtc::AudioProcessing* audio_processing() override { |
307 return &audio_processing_; | 308 return &audio_processing_; |
308 } | 309 } |
| 310 webrtc::AudioDeviceModule* audio_device_module() override { |
| 311 return &audio_device_module_; |
| 312 } |
309 WEBRTC_FUNC(CreateChannel, ()) { | 313 WEBRTC_FUNC(CreateChannel, ()) { |
310 webrtc::Config empty_config; | 314 webrtc::Config empty_config; |
311 return AddChannel(empty_config); | 315 return AddChannel(empty_config); |
312 } | 316 } |
313 WEBRTC_FUNC(CreateChannel, (const webrtc::Config& config)) { | 317 WEBRTC_FUNC(CreateChannel, (const webrtc::Config& config)) { |
314 return AddChannel(config); | 318 return AddChannel(config); |
315 } | 319 } |
316 WEBRTC_FUNC(DeleteChannel, (int channel)) { | 320 WEBRTC_FUNC(DeleteChannel, (int channel)) { |
317 WEBRTC_CHECK_CHANNEL(channel); | 321 WEBRTC_CHECK_CHANNEL(channel); |
318 for (const auto& ch : channels_) { | 322 for (const auto& ch : channels_) { |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 webrtc::EcModes ec_mode_; | 772 webrtc::EcModes ec_mode_; |
769 webrtc::AecmModes aecm_mode_; | 773 webrtc::AecmModes aecm_mode_; |
770 webrtc::NsModes ns_mode_; | 774 webrtc::NsModes ns_mode_; |
771 webrtc::AgcModes agc_mode_; | 775 webrtc::AgcModes agc_mode_; |
772 webrtc::AgcConfig agc_config_; | 776 webrtc::AgcConfig agc_config_; |
773 webrtc::VoiceEngineObserver* observer_; | 777 webrtc::VoiceEngineObserver* observer_; |
774 int playout_fail_channel_; | 778 int playout_fail_channel_; |
775 int recording_sample_rate_; | 779 int recording_sample_rate_; |
776 int playout_sample_rate_; | 780 int playout_sample_rate_; |
777 FakeAudioProcessing audio_processing_; | 781 FakeAudioProcessing audio_processing_; |
| 782 webrtc::FakeAudioDeviceModule audio_device_module_; |
778 }; | 783 }; |
779 | 784 |
780 } // namespace cricket | 785 } // namespace cricket |
781 | 786 |
782 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ | 787 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCVOICEENGINE_H_ |
OLD | NEW |