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 |
(...skipping 29 matching lines...) Expand all Loading... |
40 "VoENetEqStatsImpl::VoENetEqStatsImpl() - ctor"); | 40 "VoENetEqStatsImpl::VoENetEqStatsImpl() - ctor"); |
41 } | 41 } |
42 | 42 |
43 VoENetEqStatsImpl::~VoENetEqStatsImpl() { | 43 VoENetEqStatsImpl::~VoENetEqStatsImpl() { |
44 WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_shared->instance_id(), -1), | 44 WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_shared->instance_id(), -1), |
45 "VoENetEqStatsImpl::~VoENetEqStatsImpl() - dtor"); | 45 "VoENetEqStatsImpl::~VoENetEqStatsImpl() - dtor"); |
46 } | 46 } |
47 | 47 |
48 int VoENetEqStatsImpl::GetNetworkStatistics(int channel, | 48 int VoENetEqStatsImpl::GetNetworkStatistics(int channel, |
49 NetworkStatistics& stats) { | 49 NetworkStatistics& stats) { |
50 WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1), | |
51 "GetNetworkStatistics(channel=%d, stats=?)", channel); | |
52 | |
53 if (!_shared->statistics().Initialized()) { | 50 if (!_shared->statistics().Initialized()) { |
54 _shared->SetLastError(VE_NOT_INITED, kTraceError); | 51 _shared->SetLastError(VE_NOT_INITED, kTraceError); |
55 return -1; | 52 return -1; |
56 } | 53 } |
57 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); | 54 voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel); |
58 voe::Channel* channelPtr = ch.channel(); | 55 voe::Channel* channelPtr = ch.channel(); |
59 if (channelPtr == NULL) { | 56 if (channelPtr == NULL) { |
60 _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, | 57 _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError, |
61 "GetNetworkStatistics() failed to locate channel"); | 58 "GetNetworkStatistics() failed to locate channel"); |
62 return -1; | 59 return -1; |
(...skipping 17 matching lines...) Expand all Loading... |
80 return -1; | 77 return -1; |
81 } | 78 } |
82 | 79 |
83 channelPtr->GetDecodingCallStatistics(stats); | 80 channelPtr->GetDecodingCallStatistics(stats); |
84 return 0; | 81 return 0; |
85 } | 82 } |
86 | 83 |
87 #endif // #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API | 84 #endif // #ifdef WEBRTC_VOICE_ENGINE_NETEQ_STATS_API |
88 | 85 |
89 } // namespace webrtc | 86 } // namespace webrtc |
OLD | NEW |