OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2016 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_VIDEO_BAD_CALL_THRESHOLD_H_ | |
12 #define WEBRTC_VIDEO_BAD_CALL_THRESHOLD_H_ | |
13 | |
14 #include <memory> | |
15 | |
16 namespace webrtc { | |
17 | |
18 class BadCallThreshold { | |
palmkvist
2016/11/15 15:01:01
I am by the way rather unhappy with this name, so
sprang_webrtc
2016/11/16 13:20:09
Hm, dunno. How about QualityThreshold?
| |
19 public: | |
20 BadCallThreshold(int threshold, | |
21 int default_measurement, | |
22 float fraction, | |
23 int max_measurements); | |
24 | |
25 enum BadCallState { | |
26 NEWLY_LOW, | |
27 STILL_LOW, | |
28 NEWLY_HIGH, | |
29 STILL_HIGH, | |
30 }; | |
sprang_webrtc
2016/11/14 13:14:15
Could you add a short comment explaining these?
Al
| |
31 | |
32 BadCallState AddMeasurement(int measurement); | |
33 | |
34 private: | |
35 const std::unique_ptr<int[]> buffer_; | |
sprang_webrtc
2016/11/14 13:14:15
Unless we want to be able to dynamically change th
palmkvist
2016/11/15 15:01:01
We do need the values to calculate the variance th
sprang_webrtc
2016/11/16 13:20:09
True. Though I think just keeping a sum of squares
| |
36 const int max_measurements_; | |
37 float fraction_; | |
38 int threshold_; | |
39 int next_index_; | |
40 bool is_high_; | |
41 }; | |
42 | |
43 } // namespace webrtc | |
44 | |
45 #endif // WEBRTC_VIDEO_BAD_CALL_THRESHOLD_H_ | |
OLD | NEW |