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 #ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_INTERFACE_NETEQ_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_INTERFACE_NETEQ_H_ |
12 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_INTERFACE_NETEQ_H_ | 12 #define WEBRTC_MODULES_AUDIO_CODING_NETEQ_INTERFACE_NETEQ_H_ |
13 | 13 |
14 #include <string.h> // Provide access to size_t. | 14 #include <string.h> // Provide access to size_t. |
15 | 15 |
16 #include <string> | 16 #include <string> |
17 #include <vector> | |
18 | 17 |
19 #include "webrtc/base/constructormagic.h" | 18 #include "webrtc/base/constructormagic.h" |
20 #include "webrtc/common_types.h" | 19 #include "webrtc/common_types.h" |
21 #include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h" | 20 #include "webrtc/modules/audio_coding/neteq/audio_decoder_impl.h" |
22 #include "webrtc/typedefs.h" | 21 #include "webrtc/typedefs.h" |
23 | 22 |
24 namespace webrtc { | 23 namespace webrtc { |
25 | 24 |
26 // Forward declarations. | 25 // Forward declarations. |
27 struct WebRtcRTPHeader; | 26 struct WebRtcRTPHeader; |
(...skipping 11 matching lines...) Expand all Loading... |
39 // speech inserted through expansion (in Q14). | 38 // speech inserted through expansion (in Q14). |
40 uint16_t preemptive_rate; // Fraction of data inserted through pre-emptive | 39 uint16_t preemptive_rate; // Fraction of data inserted through pre-emptive |
41 // expansion (in Q14). | 40 // expansion (in Q14). |
42 uint16_t accelerate_rate; // Fraction of data removed through acceleration | 41 uint16_t accelerate_rate; // Fraction of data removed through acceleration |
43 // (in Q14). | 42 // (in Q14). |
44 uint16_t secondary_decoded_rate; // Fraction of data coming from secondary | 43 uint16_t secondary_decoded_rate; // Fraction of data coming from secondary |
45 // decoding (in Q14). | 44 // decoding (in Q14). |
46 int32_t clockdrift_ppm; // Average clock-drift in parts-per-million | 45 int32_t clockdrift_ppm; // Average clock-drift in parts-per-million |
47 // (positive or negative). | 46 // (positive or negative). |
48 int added_zero_samples; // Number of zero samples added in "off" mode. | 47 int added_zero_samples; // Number of zero samples added in "off" mode. |
| 48 // Statistics for packet waiting times, i.e., the time between a packet |
| 49 // arrives until it is decoded. |
| 50 int mean_waiting_time_ms; |
| 51 int median_waiting_time_ms; |
| 52 int min_waiting_time_ms; |
| 53 int max_waiting_time_ms; |
49 }; | 54 }; |
50 | 55 |
51 enum NetEqOutputType { | 56 enum NetEqOutputType { |
52 kOutputNormal, | 57 kOutputNormal, |
53 kOutputPLC, | 58 kOutputPLC, |
54 kOutputCNG, | 59 kOutputCNG, |
55 kOutputPLCtoCNG, | 60 kOutputPLCtoCNG, |
56 kOutputVADPassive | 61 kOutputVADPassive |
57 }; | 62 }; |
58 | 63 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 225 |
221 // Returns the current playout mode. | 226 // Returns the current playout mode. |
222 // Deprecated. | 227 // Deprecated. |
223 // TODO(henrik.lundin) Delete. | 228 // TODO(henrik.lundin) Delete. |
224 virtual NetEqPlayoutMode PlayoutMode() const = 0; | 229 virtual NetEqPlayoutMode PlayoutMode() const = 0; |
225 | 230 |
226 // Writes the current network statistics to |stats|. The statistics are reset | 231 // Writes the current network statistics to |stats|. The statistics are reset |
227 // after the call. | 232 // after the call. |
228 virtual int NetworkStatistics(NetEqNetworkStatistics* stats) = 0; | 233 virtual int NetworkStatistics(NetEqNetworkStatistics* stats) = 0; |
229 | 234 |
230 // Writes the last packet waiting times (in ms) to |waiting_times|. The number | |
231 // of values written is no more than 100, but may be smaller if the interface | |
232 // is polled again before 100 packets has arrived. | |
233 virtual void WaitingTimes(std::vector<int>* waiting_times) = 0; | |
234 | |
235 // Writes the current RTCP statistics to |stats|. The statistics are reset | 235 // Writes the current RTCP statistics to |stats|. The statistics are reset |
236 // and a new report period is started with the call. | 236 // and a new report period is started with the call. |
237 virtual void GetRtcpStatistics(RtcpStatistics* stats) = 0; | 237 virtual void GetRtcpStatistics(RtcpStatistics* stats) = 0; |
238 | 238 |
239 // Same as RtcpStatistics(), but does not reset anything. | 239 // Same as RtcpStatistics(), but does not reset anything. |
240 virtual void GetRtcpStatisticsNoReset(RtcpStatistics* stats) = 0; | 240 virtual void GetRtcpStatisticsNoReset(RtcpStatistics* stats) = 0; |
241 | 241 |
242 // Enables post-decode VAD. When enabled, GetAudio() will return | 242 // Enables post-decode VAD. When enabled, GetAudio() will return |
243 // kOutputVADPassive when the signal contains no speech. | 243 // kOutputVADPassive when the signal contains no speech. |
244 virtual void EnableVad() = 0; | 244 virtual void EnableVad() = 0; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 | 279 |
280 protected: | 280 protected: |
281 NetEq() {} | 281 NetEq() {} |
282 | 282 |
283 private: | 283 private: |
284 DISALLOW_COPY_AND_ASSIGN(NetEq); | 284 DISALLOW_COPY_AND_ASSIGN(NetEq); |
285 }; | 285 }; |
286 | 286 |
287 } // namespace webrtc | 287 } // namespace webrtc |
288 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INTERFACE_NETEQ_H_ | 288 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_INTERFACE_NETEQ_H_ |
OLD | NEW |