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_SEND_SIDE_H_ | 11 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_SEND_SIDE_H_ |
12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_SEND_SIDE_H_ | 12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_SEND_SIDE_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h" | 17 #include "webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h" |
18 #include "webrtc/modules/congestion_controller/acknowledge_bitrate_estimator.h" | |
19 #include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h" | 18 #include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.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 namespace testing { | 22 namespace testing { |
24 namespace bwe { | 23 namespace bwe { |
25 | 24 |
26 class SendSideBweSender : public BweSender, public RemoteBitrateObserver { | 25 class SendSideBweSender : public BweSender, public RemoteBitrateObserver { |
27 public: | 26 public: |
28 SendSideBweSender(int kbps, BitrateObserver* observer, Clock* clock); | 27 SendSideBweSender(int kbps, BitrateObserver* observer, Clock* clock); |
29 virtual ~SendSideBweSender(); | 28 virtual ~SendSideBweSender(); |
30 | 29 |
31 int GetFeedbackIntervalMs() const override; | 30 int GetFeedbackIntervalMs() const override; |
32 void GiveFeedback(const FeedbackPacket& feedback) override; | 31 void GiveFeedback(const FeedbackPacket& feedback) override; |
33 void OnPacketsSent(const Packets& packets) override; | 32 void OnPacketsSent(const Packets& packets) override; |
34 void OnReceiveBitrateChanged(const std::vector<uint32_t>& ssrcs, | 33 void OnReceiveBitrateChanged(const std::vector<uint32_t>& ssrcs, |
35 uint32_t bitrate) override; | 34 uint32_t bitrate) override; |
36 int64_t TimeUntilNextProcess() override; | 35 int64_t TimeUntilNextProcess() override; |
37 void Process() override; | 36 void Process() override; |
38 | 37 |
39 protected: | 38 protected: |
40 std::unique_ptr<BitrateController> bitrate_controller_; | 39 std::unique_ptr<BitrateController> bitrate_controller_; |
41 std::unique_ptr<AcknowledgedBitrateEstimator> acknowledged_bitrate_estimator_; | |
42 std::unique_ptr<DelayBasedBwe> bwe_; | 40 std::unique_ptr<DelayBasedBwe> bwe_; |
43 std::unique_ptr<RtcpBandwidthObserver> feedback_observer_; | 41 std::unique_ptr<RtcpBandwidthObserver> feedback_observer_; |
44 | 42 |
45 private: | 43 private: |
46 Clock* const clock_; | 44 Clock* const clock_; |
47 RTCPReportBlock report_block_; | 45 RTCPReportBlock report_block_; |
48 SendTimeHistory send_time_history_; | 46 SendTimeHistory send_time_history_; |
49 bool has_received_ack_; | 47 bool has_received_ack_; |
50 uint16_t last_acked_seq_num_; | 48 uint16_t last_acked_seq_num_; |
51 int64_t last_log_time_ms_; | 49 int64_t last_log_time_ms_; |
(...skipping 15 matching lines...) Expand all Loading... |
67 private: | 65 private: |
68 int64_t last_feedback_ms_; | 66 int64_t last_feedback_ms_; |
69 std::vector<PacketFeedback> packet_feedback_vector_; | 67 std::vector<PacketFeedback> packet_feedback_vector_; |
70 }; | 68 }; |
71 | 69 |
72 } // namespace bwe | 70 } // namespace bwe |
73 } // namespace testing | 71 } // namespace testing |
74 } // namespace webrtc | 72 } // namespace webrtc |
75 | 73 |
76 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_SEND_SIDE_H_ | 74 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_ESTIMATORS_SEND_SIDE_H_ |
OLD | NEW |