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