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

Side by Side Diff: voice_engine/shared_data.cc

Issue 3020473002: Remove voe::Statistics. (Closed)
Patch Set: rebase Created 3 years, 2 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 | « voice_engine/shared_data.h ('k') | voice_engine/statistics.h » ('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) 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 "voice_engine/shared_data.h" 11 #include "voice_engine/shared_data.h"
12 12
13 #include "modules/audio_processing/include/audio_processing.h" 13 #include "modules/audio_processing/include/audio_processing.h"
14 #include "system_wrappers/include/trace.h" 14 #include "system_wrappers/include/trace.h"
15 #include "voice_engine/channel.h" 15 #include "voice_engine/channel.h"
16 #include "voice_engine/transmit_mixer.h" 16 #include "voice_engine/transmit_mixer.h"
17 17
18 namespace webrtc { 18 namespace webrtc {
19 19
20 namespace voe { 20 namespace voe {
21 21
22 static int32_t _gInstanceCounter = 0; 22 static int32_t _gInstanceCounter = 0;
23 23
24 SharedData::SharedData() 24 SharedData::SharedData()
25 : _instanceId(++_gInstanceCounter), 25 : _instanceId(++_gInstanceCounter),
26 _channelManager(_gInstanceCounter), 26 _channelManager(_gInstanceCounter),
27 _engineStatistics(_gInstanceCounter),
28 _audioDevicePtr(NULL), 27 _audioDevicePtr(NULL),
29 _moduleProcessThreadPtr(ProcessThread::Create("VoiceProcessThread")), 28 _moduleProcessThreadPtr(ProcessThread::Create("VoiceProcessThread")),
30 encoder_queue_("AudioEncoderQueue") { 29 encoder_queue_("AudioEncoderQueue") {
31 Trace::CreateTrace(); 30 Trace::CreateTrace();
32 if (TransmitMixer::Create(_transmitMixerPtr, _gInstanceCounter) == 0) { 31 if (TransmitMixer::Create(_transmitMixerPtr, _gInstanceCounter) == 0) {
33 _transmitMixerPtr->SetEngineInformation(&_channelManager); 32 _transmitMixerPtr->SetEngineInformation(&_channelManager);
34 } 33 }
35 } 34 }
36 35
37 SharedData::~SharedData() 36 SharedData::~SharedData()
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 76
78 for (ChannelManager::Iterator it(&_channelManager); it.IsValid(); 77 for (ChannelManager::Iterator it(&_channelManager); it.IsValid();
79 it.Increment()) { 78 it.Increment()) {
80 if (it.GetChannel()->Playing()) 79 if (it.GetChannel()->Playing())
81 ++playout_channels; 80 ++playout_channels;
82 } 81 }
83 82
84 return playout_channels; 83 return playout_channels;
85 } 84 }
86 85
87 void SharedData::SetLastError(int32_t error) const {
88 _engineStatistics.SetLastError(error);
89 }
90
91 void SharedData::SetLastError(int32_t error,
92 TraceLevel level) const {
93 _engineStatistics.SetLastError(error, level);
94 }
95
96 void SharedData::SetLastError(int32_t error, TraceLevel level,
97 const char* msg) const {
98 _engineStatistics.SetLastError(error, level, msg);
99 }
100
101 } // namespace voe 86 } // namespace voe
102 87
103 } // namespace webrtc 88 } // namespace webrtc
OLDNEW
« no previous file with comments | « voice_engine/shared_data.h ('k') | voice_engine/statistics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698