| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 | 11 |
| 12 // Implementation of Network-Assisted Dynamic Adaptation's (NADA's) proposal | 12 // Implementation of Network-Assisted Dynamic Adaptation's (NADA's) proposal |
| 13 // Version according to Draft Document (mentioned in references) | 13 // Version according to Draft Document (mentioned in references) |
| 14 // http://tools.ietf.org/html/draft-zhu-rmcat-nada-06 | 14 // http://tools.ietf.org/html/draft-zhu-rmcat-nada-06 |
| 15 // From March 26, 2015. | 15 // From March 26, 2015. |
| 16 | 16 |
| 17 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_NADA_H_ | 17 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_NADA_H_ |
| 18 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_NADA_H_ | 18 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_NADA_H_ |
| 19 | 19 |
| 20 #include <list> | 20 #include <list> |
| 21 #include <map> | 21 #include <map> |
| 22 #include <memory> |
| 22 | 23 |
| 23 #include "webrtc/modules/include/module_common_types.h" | 24 #include "webrtc/modules/include/module_common_types.h" |
| 24 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" | 25 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" |
| 25 #include "webrtc/voice_engine/channel.h" | 26 #include "webrtc/voice_engine/channel.h" |
| 26 | 27 |
| 27 namespace webrtc { | 28 namespace webrtc { |
| 28 | 29 |
| 29 class ReceiveStatistics; | 30 class ReceiveStatistics; |
| 30 | 31 |
| 31 namespace testing { | 32 namespace testing { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 43 static int64_t MedianFilter(int64_t* v, int size); | 44 static int64_t MedianFilter(int64_t* v, int size); |
| 44 static int64_t ExponentialSmoothingFilter(int64_t new_value, | 45 static int64_t ExponentialSmoothingFilter(int64_t new_value, |
| 45 int64_t last_smoothed_value, | 46 int64_t last_smoothed_value, |
| 46 float alpha); | 47 float alpha); |
| 47 | 48 |
| 48 static const int64_t kReceivingRateTimeWindowMs; | 49 static const int64_t kReceivingRateTimeWindowMs; |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 SimulatedClock clock_; | 52 SimulatedClock clock_; |
| 52 int64_t last_feedback_ms_; | 53 int64_t last_feedback_ms_; |
| 53 rtc::scoped_ptr<ReceiveStatistics> recv_stats_; | 54 std::unique_ptr<ReceiveStatistics> recv_stats_; |
| 54 int64_t baseline_delay_ms_; // Referred as d_f. | 55 int64_t baseline_delay_ms_; // Referred as d_f. |
| 55 int64_t delay_signal_ms_; // Referred as d_n. | 56 int64_t delay_signal_ms_; // Referred as d_n. |
| 56 int64_t last_congestion_signal_ms_; | 57 int64_t last_congestion_signal_ms_; |
| 57 int last_delays_index_; | 58 int last_delays_index_; |
| 58 int64_t exp_smoothed_delay_ms_; // Referred as d_hat_n. | 59 int64_t exp_smoothed_delay_ms_; // Referred as d_hat_n. |
| 59 int64_t est_queuing_delay_signal_ms_; // Referred as d_tilde_n. | 60 int64_t est_queuing_delay_signal_ms_; // Referred as d_tilde_n. |
| 60 int64_t last_delays_ms_[5]; // Used for Median Filter. | 61 int64_t last_delays_ms_[5]; // Used for Median Filter. |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 class NadaBweSender : public BweSender { | 64 class NadaBweSender : public BweSender { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 bool original_operating_mode_; | 101 bool original_operating_mode_; |
| 101 | 102 |
| 102 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(NadaBweSender); | 103 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(NadaBweSender); |
| 103 }; | 104 }; |
| 104 | 105 |
| 105 } // namespace bwe | 106 } // namespace bwe |
| 106 } // namespace testing | 107 } // namespace testing |
| 107 } // namespace webrtc | 108 } // namespace webrtc |
| 108 | 109 |
| 109 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_NADA_H_ | 110 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_NADA_H_ |
| OLD | NEW |