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 #include "webrtc/voice_engine/shared_data.h" | 11 #include "webrtc/voice_engine/shared_data.h" |
12 | 12 |
13 #include "webrtc/modules/audio_processing/include/audio_processing.h" | 13 #include "webrtc/modules/audio_processing/include/audio_processing.h" |
14 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" | 14 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" |
15 #include "webrtc/system_wrappers/interface/trace.h" | 15 #include "webrtc/system_wrappers/interface/trace.h" |
| 16 #include "webrtc/video/rtc_event_log.h" |
16 #include "webrtc/voice_engine/channel.h" | 17 #include "webrtc/voice_engine/channel.h" |
17 #include "webrtc/voice_engine/output_mixer.h" | 18 #include "webrtc/voice_engine/output_mixer.h" |
18 #include "webrtc/voice_engine/transmit_mixer.h" | 19 #include "webrtc/voice_engine/transmit_mixer.h" |
19 | 20 |
20 namespace webrtc { | 21 namespace webrtc { |
21 | 22 |
22 namespace voe { | 23 namespace voe { |
23 | 24 |
24 static int32_t _gInstanceCounter = 0; | 25 static int32_t _gInstanceCounter = 0; |
25 | 26 |
26 SharedData::SharedData(const Config& config) : | 27 SharedData::SharedData(const Config& config) |
27 _instanceId(++_gInstanceCounter), | 28 : _instanceId(++_gInstanceCounter), |
28 _apiCritPtr(CriticalSectionWrapper::CreateCriticalSection()), | 29 _apiCritPtr(CriticalSectionWrapper::CreateCriticalSection()), |
29 _channelManager(_gInstanceCounter, config), | 30 _channelManager(_gInstanceCounter, config), |
30 _engineStatistics(_gInstanceCounter), | 31 _engineStatistics(_gInstanceCounter), |
31 _audioDevicePtr(NULL), | 32 _audioDevicePtr(NULL), |
32 _moduleProcessThreadPtr(ProcessThread::Create()), | 33 _moduleProcessThreadPtr(ProcessThread::Create()), |
33 _externalRecording(false), | 34 _eventLog(RtcEventLog::Create()), |
34 _externalPlayout(false) | 35 _externalRecording(false), |
35 { | 36 _externalPlayout(false) { |
36 Trace::CreateTrace(); | 37 Trace::CreateTrace(); |
37 if (OutputMixer::Create(_outputMixerPtr, _gInstanceCounter) == 0) | 38 if (OutputMixer::Create(_outputMixerPtr, _gInstanceCounter) == 0) |
38 { | 39 { |
39 _outputMixerPtr->SetEngineInformation(_engineStatistics); | 40 _outputMixerPtr->SetEngineInformation(_engineStatistics); |
40 } | 41 } |
41 if (TransmitMixer::Create(_transmitMixerPtr, _gInstanceCounter) == 0) | 42 if (TransmitMixer::Create(_transmitMixerPtr, _gInstanceCounter) == 0) |
42 { | 43 { |
43 _transmitMixerPtr->SetEngineInformation(*_moduleProcessThreadPtr, | 44 _transmitMixerPtr->SetEngineInformation(*_moduleProcessThreadPtr, |
44 _engineStatistics, | 45 _engineStatistics, |
45 _channelManager); | 46 _channelManager); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 } | 112 } |
112 | 113 |
113 void SharedData::SetLastError(int32_t error, TraceLevel level, | 114 void SharedData::SetLastError(int32_t error, TraceLevel level, |
114 const char* msg) const { | 115 const char* msg) const { |
115 _engineStatistics.SetLastError(error, level, msg); | 116 _engineStatistics.SetLastError(error, level, msg); |
116 } | 117 } |
117 | 118 |
118 } // namespace voe | 119 } // namespace voe |
119 | 120 |
120 } // namespace webrtc | 121 } // namespace webrtc |
OLD | NEW |