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