OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 #if defined(WEBRTC_ANDROID) | 11 #if defined(WEBRTC_ANDROID) |
12 #include "webrtc/modules/audio_device/android/audio_device_template.h" | 12 #include "webrtc/modules/audio_device/android/audio_device_template.h" |
13 #include "webrtc/modules/audio_device/android/audio_record_jni.h" | 13 #include "webrtc/modules/audio_device/android/audio_record_jni.h" |
14 #include "webrtc/modules/audio_device/android/audio_track_jni.h" | 14 #include "webrtc/modules/audio_device/android/audio_track_jni.h" |
15 #include "webrtc/modules/utility/include/jvm_android.h" | 15 #include "webrtc/modules/utility/include/jvm_android.h" |
16 #endif | 16 #endif |
17 | 17 |
18 #include "webrtc/base/checks.h" | 18 #include "webrtc/base/checks.h" |
19 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 19 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
20 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | |
21 #include "webrtc/system_wrappers/include/trace.h" | 20 #include "webrtc/system_wrappers/include/trace.h" |
22 #include "webrtc/voice_engine/channel_proxy.h" | 21 #include "webrtc/voice_engine/channel_proxy.h" |
23 #include "webrtc/voice_engine/voice_engine_impl.h" | 22 #include "webrtc/voice_engine/voice_engine_impl.h" |
24 | 23 |
25 namespace webrtc { | 24 namespace webrtc { |
26 | 25 |
27 // Counter to be ensure that we can add a correct ID in all static trace | 26 // Counter to be ensure that we can add a correct ID in all static trace |
28 // methods. It is not the nicest solution, especially not since we already | 27 // methods. It is not the nicest solution, especially not since we already |
29 // have a counter in VoEBaseImpl. In other words, there is room for | 28 // have a counter in VoEBaseImpl. In other words, there is room for |
30 // improvement here. | 29 // improvement here. |
(...skipping 28 matching lines...) Expand all Loading... |
59 Terminate(); | 58 Terminate(); |
60 delete this; | 59 delete this; |
61 } | 60 } |
62 | 61 |
63 return new_ref; | 62 return new_ref; |
64 } | 63 } |
65 | 64 |
66 rtc::scoped_ptr<voe::ChannelProxy> VoiceEngineImpl::GetChannelProxy( | 65 rtc::scoped_ptr<voe::ChannelProxy> VoiceEngineImpl::GetChannelProxy( |
67 int channel_id) { | 66 int channel_id) { |
68 RTC_DCHECK(channel_id >= 0); | 67 RTC_DCHECK(channel_id >= 0); |
69 CriticalSectionScoped cs(crit_sec()); | 68 rtc::CritScope cs(crit_sec()); |
70 RTC_DCHECK(statistics().Initialized()); | 69 RTC_DCHECK(statistics().Initialized()); |
71 return rtc::scoped_ptr<voe::ChannelProxy>( | 70 return rtc::scoped_ptr<voe::ChannelProxy>( |
72 new voe::ChannelProxy(channel_manager().GetChannel(channel_id))); | 71 new voe::ChannelProxy(channel_manager().GetChannel(channel_id))); |
73 } | 72 } |
74 | 73 |
75 VoiceEngine* VoiceEngine::Create() { | 74 VoiceEngine* VoiceEngine::Create() { |
76 Config* config = new Config(); | 75 Config* config = new Config(); |
77 return GetVoiceEngine(config, true); | 76 return GetVoiceEngine(config, true); |
78 } | 77 } |
79 | 78 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 149 |
151 std::string VoiceEngine::GetVersionString() { | 150 std::string VoiceEngine::GetVersionString() { |
152 std::string version = "VoiceEngine 4.1.0"; | 151 std::string version = "VoiceEngine 4.1.0"; |
153 #ifdef WEBRTC_EXTERNAL_TRANSPORT | 152 #ifdef WEBRTC_EXTERNAL_TRANSPORT |
154 version += " (External transport build)"; | 153 version += " (External transport build)"; |
155 #endif | 154 #endif |
156 return version; | 155 return version; |
157 } | 156 } |
158 | 157 |
159 } // namespace webrtc | 158 } // namespace webrtc |
OLD | NEW |