| 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 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_RECEIVER_H_ | 11 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_RECEIVER_H_ |
| 12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_RECEIVER_H_ | 12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_RECEIVER_H_ |
| 13 | 13 |
| 14 #include <memory> |
| 14 #include <string> | 15 #include <string> |
| 15 | 16 |
| 16 #include "webrtc/base/constructormagic.h" | 17 #include "webrtc/base/constructormagic.h" |
| 17 #include "webrtc/base/scoped_ptr.h" | |
| 18 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" | 18 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" |
| 19 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h" | 19 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h" |
| 20 #include "webrtc/modules/remote_bitrate_estimator/test/metric_recorder.h" | 20 #include "webrtc/modules/remote_bitrate_estimator/test/metric_recorder.h" |
| 21 | 21 |
| 22 namespace webrtc { | 22 namespace webrtc { |
| 23 namespace testing { | 23 namespace testing { |
| 24 namespace bwe { | 24 namespace bwe { |
| 25 | 25 |
| 26 class PacketReceiver : public PacketProcessor { | 26 class PacketReceiver : public PacketProcessor { |
| 27 public: | 27 public: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 46 Stats<double> GetDelayStats() const; | 46 Stats<double> GetDelayStats() const; |
| 47 | 47 |
| 48 float GlobalPacketLoss(); | 48 float GlobalPacketLoss(); |
| 49 | 49 |
| 50 protected: | 50 protected: |
| 51 void UpdateMetrics(int64_t arrival_time_ms, | 51 void UpdateMetrics(int64_t arrival_time_ms, |
| 52 int64_t send_time_ms, | 52 int64_t send_time_ms, |
| 53 size_t payload_size); | 53 size_t payload_size); |
| 54 | 54 |
| 55 Stats<double> delay_stats_; | 55 Stats<double> delay_stats_; |
| 56 rtc::scoped_ptr<BweReceiver> bwe_receiver_; | 56 std::unique_ptr<BweReceiver> bwe_receiver_; |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 void PlotDelay(int64_t arrival_time_ms, int64_t send_time_ms); | 59 void PlotDelay(int64_t arrival_time_ms, int64_t send_time_ms); |
| 60 MetricRecorder* metric_recorder_; | 60 MetricRecorder* metric_recorder_; |
| 61 bool plot_delay_; // Used in case there isn't a metric recorder. | 61 bool plot_delay_; // Used in case there isn't a metric recorder. |
| 62 int64_t last_delay_plot_ms_; | 62 int64_t last_delay_plot_ms_; |
| 63 std::string delay_prefix_; | 63 std::string delay_prefix_; |
| 64 BandwidthEstimatorType bwe_type_; | 64 BandwidthEstimatorType bwe_type_; |
| 65 | 65 |
| 66 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(PacketReceiver); | 66 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(PacketReceiver); |
| 67 }; | 67 }; |
| 68 } // namespace bwe | 68 } // namespace bwe |
| 69 } // namespace testing | 69 } // namespace testing |
| 70 } // namespace webrtc | 70 } // namespace webrtc |
| 71 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_RECEIVER_H_ | 71 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_RECEIVER_H_ |
| OLD | NEW |