Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(896)

Side by Side Diff: webrtc/modules/congestion_controller/transport_feedback_adapter.h

Issue 3001653002: Revert of Add functionality which limits the number of bytes on the network. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_ 11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_
12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_ 12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_
13 13
14 #include <deque>
15 #include <vector> 14 #include <vector>
16 15
17 #include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h" 16 #include "webrtc/modules/remote_bitrate_estimator/include/send_time_history.h"
18 #include "webrtc/rtc_base/criticalsection.h" 17 #include "webrtc/rtc_base/criticalsection.h"
19 #include "webrtc/rtc_base/thread_annotations.h" 18 #include "webrtc/rtc_base/thread_annotations.h"
20 #include "webrtc/rtc_base/thread_checker.h" 19 #include "webrtc/rtc_base/thread_checker.h"
21 #include "webrtc/system_wrappers/include/clock.h" 20 #include "webrtc/system_wrappers/include/clock.h"
22 21
23 namespace webrtc { 22 namespace webrtc {
24 23
(...skipping 15 matching lines...) Expand all
40 uint16_t sequence_number, 39 uint16_t sequence_number,
41 size_t length, 40 size_t length,
42 const PacedPacketInfo& pacing_info); 41 const PacedPacketInfo& pacing_info);
43 void OnSentPacket(uint16_t sequence_number, int64_t send_time_ms); 42 void OnSentPacket(uint16_t sequence_number, int64_t send_time_ms);
44 43
45 // TODO(holmer): This method should return DelayBasedBwe::Result so that we 44 // TODO(holmer): This method should return DelayBasedBwe::Result so that we
46 // can get rid of the dependency on BitrateController. Requires changes 45 // can get rid of the dependency on BitrateController. Requires changes
47 // to the CongestionController interface. 46 // to the CongestionController interface.
48 void OnTransportFeedback(const rtcp::TransportFeedback& feedback); 47 void OnTransportFeedback(const rtcp::TransportFeedback& feedback);
49 std::vector<PacketFeedback> GetTransportFeedbackVector() const; 48 std::vector<PacketFeedback> GetTransportFeedbackVector() const;
50 rtc::Optional<int64_t> GetMinFeedbackLoopRtt() const;
51 49
52 void SetTransportOverhead(int transport_overhead_bytes_per_packet); 50 void SetTransportOverhead(int transport_overhead_bytes_per_packet);
53 51
54 void SetNetworkIds(uint16_t local_id, uint16_t remote_id); 52 void SetNetworkIds(uint16_t local_id, uint16_t remote_id);
55 53
56 size_t GetOutstandingBytes() const;
57
58 private: 54 private:
59 std::vector<PacketFeedback> GetPacketFeedbackVector( 55 std::vector<PacketFeedback> GetPacketFeedbackVector(
60 const rtcp::TransportFeedback& feedback); 56 const rtcp::TransportFeedback& feedback);
61 57
62 const bool send_side_bwe_with_overhead_; 58 const bool send_side_bwe_with_overhead_;
63 rtc::CriticalSection lock_; 59 rtc::CriticalSection lock_;
64 int transport_overhead_bytes_per_packet_ GUARDED_BY(&lock_); 60 int transport_overhead_bytes_per_packet_ GUARDED_BY(&lock_);
65 SendTimeHistory send_time_history_ GUARDED_BY(&lock_); 61 SendTimeHistory send_time_history_ GUARDED_BY(&lock_);
66 const Clock* const clock_; 62 const Clock* const clock_;
67 int64_t current_offset_ms_; 63 int64_t current_offset_ms_;
68 int64_t last_timestamp_us_; 64 int64_t last_timestamp_us_;
69 std::vector<PacketFeedback> last_packet_feedback_vector_; 65 std::vector<PacketFeedback> last_packet_feedback_vector_;
70 uint16_t local_net_id_ GUARDED_BY(&lock_); 66 uint16_t local_net_id_ GUARDED_BY(&lock_);
71 uint16_t remote_net_id_ GUARDED_BY(&lock_); 67 uint16_t remote_net_id_ GUARDED_BY(&lock_);
72 std::deque<int64_t> feedback_rtts_ GUARDED_BY(&lock_);
73 rtc::Optional<int64_t> min_feedback_rtt_ GUARDED_BY(&lock_);
74 68
75 rtc::CriticalSection observers_lock_; 69 rtc::CriticalSection observers_lock_;
76 std::vector<PacketFeedbackObserver*> observers_ GUARDED_BY(&observers_lock_); 70 std::vector<PacketFeedbackObserver*> observers_ GUARDED_BY(&observers_lock_);
77 }; 71 };
78 72
79 } // namespace webrtc 73 } // namespace webrtc
80 74
81 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_ 75 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_TRANSPORT_FEEDBACK_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698