| 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_ESTIMATORS_REMB_H_ | 11 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_REMB_H_ |
| 12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_REMB_H_ | 12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_REMB_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 #include <string> | 15 #include <string> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "webrtc/call/mock/mock_rtc_event_log.h" |
| 18 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" | 19 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" |
| 19 | 20 |
| 20 namespace webrtc { | 21 namespace webrtc { |
| 21 | 22 |
| 22 class BitrateObserver; | 23 class BitrateObserver; |
| 23 class BitrateController; | 24 class BitrateController; |
| 24 class ReceiveStatistics; | 25 class ReceiveStatistics; |
| 25 class StreamStatistician; | 26 class StreamStatistician; |
| 26 | 27 |
| 27 namespace testing { | 28 namespace testing { |
| 28 namespace bwe { | 29 namespace bwe { |
| 29 | 30 |
| 30 class RembBweSender : public BweSender { | 31 class RembBweSender : public BweSender { |
| 31 public: | 32 public: |
| 32 RembBweSender(int kbps, BitrateObserver* observer, Clock* clock); | 33 RembBweSender(int kbps, BitrateObserver* observer, Clock* clock); |
| 33 virtual ~RembBweSender(); | 34 virtual ~RembBweSender(); |
| 34 | 35 |
| 35 int GetFeedbackIntervalMs() const override; | 36 int GetFeedbackIntervalMs() const override; |
| 36 void GiveFeedback(const FeedbackPacket& feedback) override; | 37 void GiveFeedback(const FeedbackPacket& feedback) override; |
| 37 void OnPacketsSent(const Packets& packets) override {} | 38 void OnPacketsSent(const Packets& packets) override {} |
| 38 int64_t TimeUntilNextProcess() override; | 39 int64_t TimeUntilNextProcess() override; |
| 39 void Process() override; | 40 void Process() override; |
| 40 | 41 |
| 41 protected: | 42 protected: |
| 42 std::unique_ptr<BitrateController> bitrate_controller_; | 43 std::unique_ptr<BitrateController> bitrate_controller_; |
| 43 std::unique_ptr<RtcpBandwidthObserver> feedback_observer_; | 44 std::unique_ptr<RtcpBandwidthObserver> feedback_observer_; |
| 44 | 45 |
| 45 private: | 46 private: |
| 46 Clock* clock_; | 47 Clock* clock_; |
| 48 MockRtcEventLog event_log_; |
| 47 | 49 |
| 48 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RembBweSender); | 50 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RembBweSender); |
| 49 }; | 51 }; |
| 50 | 52 |
| 51 class RembReceiver : public BweReceiver, public RemoteBitrateObserver { | 53 class RembReceiver : public BweReceiver, public RemoteBitrateObserver { |
| 52 public: | 54 public: |
| 53 static const uint32_t kRemoteBitrateEstimatorMinBitrateBps = 30000; | 55 static const uint32_t kRemoteBitrateEstimatorMinBitrateBps = 30000; |
| 54 | 56 |
| 55 RembReceiver(int flow_id, bool plot); | 57 RembReceiver(int flow_id, bool plot); |
| 56 virtual ~RembReceiver(); | 58 virtual ~RembReceiver(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 75 std::unique_ptr<RemoteBitrateEstimator> estimator_; | 77 std::unique_ptr<RemoteBitrateEstimator> estimator_; |
| 76 | 78 |
| 77 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RembReceiver); | 79 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RembReceiver); |
| 78 }; | 80 }; |
| 79 | 81 |
| 80 } // namespace bwe | 82 } // namespace bwe |
| 81 } // namespace testing | 83 } // namespace testing |
| 82 } // namespace webrtc | 84 } // namespace webrtc |
| 83 | 85 |
| 84 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_REMB_H_ | 86 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_REMB_H_ |
| OLD | NEW |