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/voe_neteq_stats_impl.h" | 11 #include "webrtc/voice_engine/voe_neteq_stats_impl.h" |
12 | 12 |
13 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 13 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
14 #include "webrtc/system_wrappers/include/trace.h" | 14 #include "webrtc/system_wrappers/include/trace.h" |
15 #include "webrtc/voice_engine/channel.h" | 15 #include "webrtc/voice_engine/channel.h" |
16 #include "webrtc/voice_engine/include/voe_errors.h" | 16 #include "webrtc/voice_engine/include/voe_errors.h" |
17 #include "webrtc/voice_engine/voice_engine_impl.h" | 17 #include "webrtc/voice_engine/voice_engine_impl.h" |
18 | 18 |
19 #ifndef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API | |
20 #error "Deprecated" | |
21 #endif | |
22 | |
23 namespace webrtc { | 19 namespace webrtc { |
24 | 20 |
25 VoENetEqStats* VoENetEqStats::GetInterface(VoiceEngine* voiceEngine) { | 21 VoENetEqStats* VoENetEqStats::GetInterface(VoiceEngine* voiceEngine) { |
26 #ifndef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API | |
27 return NULL; | |
28 #else | |
29 if (NULL == voiceEngine) { | 22 if (NULL == voiceEngine) { |
30 return NULL; | 23 return NULL; |
31 } | 24 } |
32 VoiceEngineImpl* s = static_cast<VoiceEngineImpl*>(voiceEngine); | 25 VoiceEngineImpl* s = static_cast<VoiceEngineImpl*>(voiceEngine); |
33 s->AddRef(); | 26 s->AddRef(); |
34 return s; | 27 return s; |
35 #endif | |
36 } | 28 } |
37 | 29 |
38 #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API | |
39 | |
40 VoENetEqStatsImpl::VoENetEqStatsImpl(voe::SharedData* shared) | 30 VoENetEqStatsImpl::VoENetEqStatsImpl(voe::SharedData* shared) |
41 : _shared(shared) { | 31 : _shared(shared) { |
42 WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_shared->instance_id(), -1), | 32 WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_shared->instance_id(), -1), |
43 "VoENetEqStatsImpl::VoENetEqStatsImpl() - ctor"); | 33 "VoENetEqStatsImpl::VoENetEqStatsImpl() - ctor"); |
44 } | 34 } |
45 | 35 |
46 VoENetEqStatsImpl::~VoENetEqStatsImpl() { | 36 VoENetEqStatsImpl::~VoENetEqStatsImpl() { |
47 WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_shared->instance_id(), -1), | 37 WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_shared->instance_id(), -1), |
48 "VoENetEqStatsImpl::~VoENetEqStatsImpl() - dtor"); | 38 "VoENetEqStatsImpl::~VoENetEqStatsImpl() - dtor"); |
49 } | 39 } |
(...skipping 27 matching lines...) Expand all Loading... |
77 _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, | 67 _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, |
78 "GetDecodingCallStatistics() failed to locate " | 68 "GetDecodingCallStatistics() failed to locate " |
79 "channel"); | 69 "channel"); |
80 return -1; | 70 return -1; |
81 } | 71 } |
82 | 72 |
83 channelPtr->GetDecodingCallStatistics(stats); | 73 channelPtr->GetDecodingCallStatistics(stats); |
84 return 0; | 74 return 0; |
85 } | 75 } |
86 | 76 |
87 #endif // #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API | |
88 | |
89 } // namespace webrtc | 77 } // namespace webrtc |
OLD | NEW |