1/*
2 *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 *
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
6 *  tree. An additional intellectual property rights grant can be found
7 *  in the file PATENTS.  All contributing project authors may
8 *  be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef WEBRTC_VOICE_ENGINE_VOE_NETEQ_STATS_H
12#define WEBRTC_VOICE_ENGINE_VOE_NETEQ_STATS_H
13
14#include "webrtc/common_types.h"
15
16namespace webrtc {
17
18class VoiceEngine;
19
20class WEBRTC_DLLEXPORT VoENetEqStats
21{
22public:
23    // Factory for the VoENetEqStats sub-API. Increases an internal
24    // reference counter if successful. Returns NULL if the API is not
25    // supported or if construction fails.
26    static VoENetEqStats* GetInterface(VoiceEngine* voiceEngine);
27
28    // Releases the VoENetEqStats sub-API and decreases an internal
29    // reference counter. Returns the new reference count. This value should
30    // be zero for all sub-API:s before the VoiceEngine object can be safely
31    // deleted.
32    virtual int Release() = 0;
33
34    // Get the "in-call" statistics from NetEQ.
35    // The statistics are reset after the query.
36    virtual int GetNetworkStatistics(int channel, NetworkStatistics& stats) = 0;
37
38    // Get statistics of calls to AudioCodingModule::PlayoutData10Ms().
39    virtual int GetDecodingCallStatistics(
40        int channel, AudioDecodingCallStats* stats) const = 0;
41
42protected:
43    VoENetEqStats() {}
44    virtual ~VoENetEqStats() {}
45};
46
47}  // namespace webrtc
48
49#endif    // #ifndef WEBRTC_VOICE_ENGINE_VOE_NETEQ_STATS_H
50