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/modules/pacing/mock/mock_paced_sender.h" |
19 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" | 19 #include "webrtc/modules/remote_bitrate_estimator/test/bwe.h" |
20 | 20 |
21 namespace webrtc { | 21 namespace webrtc { |
22 | 22 |
23 class BitrateObserver; | 23 class BitrateObserver; |
24 class BitrateController; | 24 class BitrateController; |
25 class ReceiveStatistics; | 25 class ReceiveStatistics; |
26 class StreamStatistician; | 26 class StreamStatistician; |
27 | 27 |
28 namespace testing { | 28 namespace testing { |
29 namespace bwe { | 29 namespace bwe { |
30 | 30 |
31 class RembBweSender : public BweSender { | 31 class RembBweSender : public BweSender { |
32 public: | 32 public: |
33 RembBweSender(int kbps, BitrateObserver* observer, Clock* clock); | 33 RembBweSender(int kbps, BitrateObserver* observer, Clock* clock); |
34 virtual ~RembBweSender(); | 34 virtual ~RembBweSender(); |
35 | 35 |
36 int GetFeedbackIntervalMs() const override; | 36 int GetFeedbackIntervalMs() const override; |
37 void GiveFeedback(const FeedbackPacket& feedback) override; | 37 void GiveFeedback(const FeedbackPacket& feedback) override; |
38 void OnPacketsSent(const Packets& packets) override {} | 38 void OnPacketsSent(const Packets& packets) override {} |
39 int64_t TimeUntilNextProcess() override; | 39 int64_t TimeUntilNextProcess() override; |
40 void Process() override; | 40 void Process() override; |
41 | 41 |
42 protected: | 42 protected: |
| 43 ::testing::NiceMock<MockPacedSender> pacer_; |
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_; |
48 | 49 |
49 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RembBweSender); | 50 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RembBweSender); |
50 }; | 51 }; |
51 | 52 |
52 class RembReceiver : public BweReceiver, public RemoteBitrateObserver { | 53 class RembReceiver : public BweReceiver, public RemoteBitrateObserver { |
(...skipping 23 matching lines...) Loading... |
76 std::unique_ptr<RemoteBitrateEstimator> estimator_; | 77 std::unique_ptr<RemoteBitrateEstimator> estimator_; |
77 | 78 |
78 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RembReceiver); | 79 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RembReceiver); |
79 }; | 80 }; |
80 | 81 |
81 } // namespace bwe | 82 } // namespace bwe |
82 } // namespace testing | 83 } // namespace testing |
83 } // namespace webrtc | 84 } // namespace webrtc |
84 | 85 |
85 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_REMB_H_ | 86 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_REMB_H_ |
OLD | NEW |