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

Side by Side Diff: webrtc/modules/pacing/paced_sender.h

Issue 2032463003: Revert of Propagate probing cluster id to SendTimeHistory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | webrtc/modules/pacing/paced_sender.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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
(...skipping 28 matching lines...) Expand all
39 // module again. 39 // module again.
40 // Called when it's time to send a queued packet. 40 // Called when it's time to send a queued packet.
41 // Returns false if packet cannot be sent. 41 // Returns false if packet cannot be sent.
42 virtual bool TimeToSendPacket(uint32_t ssrc, 42 virtual bool TimeToSendPacket(uint32_t ssrc,
43 uint16_t sequence_number, 43 uint16_t sequence_number,
44 int64_t capture_time_ms, 44 int64_t capture_time_ms,
45 bool retransmission, 45 bool retransmission,
46 int probe_cluster_id) = 0; 46 int probe_cluster_id) = 0;
47 // Called when it's a good time to send a padding data. 47 // Called when it's a good time to send a padding data.
48 // Returns the number of bytes sent. 48 // Returns the number of bytes sent.
49 virtual size_t TimeToSendPadding(size_t bytes, int probe_cluster_id) = 0; 49 virtual size_t TimeToSendPadding(size_t bytes) = 0;
50 50
51 protected: 51 protected:
52 virtual ~PacketSender() {} 52 virtual ~PacketSender() {}
53 }; 53 };
54 54
55 // Expected max pacer delay in ms. If ExpectedQueueTimeMs() is higher than 55 // Expected max pacer delay in ms. If ExpectedQueueTimeMs() is higher than
56 // this value, the packet producers should wait (eg drop frames rather than 56 // this value, the packet producers should wait (eg drop frames rather than
57 // encoding them). Bitrate sent may temporarily exceed target set by 57 // encoding them). Bitrate sent may temporarily exceed target set by
58 // UpdateBitrate() so that this limit will be upheld. 58 // UpdateBitrate() so that this limit will be upheld.
59 static const int64_t kMaxQueueLengthMs; 59 static const int64_t kMaxQueueLengthMs;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Process any pending packets in the queue(s). 126 // Process any pending packets in the queue(s).
127 void Process() override; 127 void Process() override;
128 128
129 private: 129 private:
130 // Updates the number of bytes that can be sent for the next time interval. 130 // Updates the number of bytes that can be sent for the next time interval.
131 void UpdateBytesPerInterval(int64_t delta_time_in_ms) 131 void UpdateBytesPerInterval(int64_t delta_time_in_ms)
132 EXCLUSIVE_LOCKS_REQUIRED(critsect_); 132 EXCLUSIVE_LOCKS_REQUIRED(critsect_);
133 133
134 bool SendPacket(const paced_sender::Packet& packet, int probe_cluster_id) 134 bool SendPacket(const paced_sender::Packet& packet, int probe_cluster_id)
135 EXCLUSIVE_LOCKS_REQUIRED(critsect_); 135 EXCLUSIVE_LOCKS_REQUIRED(critsect_);
136 void SendPadding(size_t padding_needed, int probe_cluster_id) 136 void SendPadding(size_t padding_needed) EXCLUSIVE_LOCKS_REQUIRED(critsect_);
137 EXCLUSIVE_LOCKS_REQUIRED(critsect_);
138 137
139 Clock* const clock_; 138 Clock* const clock_;
140 PacketSender* const packet_sender_; 139 PacketSender* const packet_sender_;
141 140
142 std::unique_ptr<CriticalSectionWrapper> critsect_; 141 std::unique_ptr<CriticalSectionWrapper> critsect_;
143 bool paused_ GUARDED_BY(critsect_); 142 bool paused_ GUARDED_BY(critsect_);
144 bool probing_enabled_; 143 bool probing_enabled_;
145 // This is the media budget, keeping track of how many bits of media 144 // This is the media budget, keeping track of how many bits of media
146 // we can pace out during the current interval. 145 // we can pace out during the current interval.
147 std::unique_ptr<paced_sender::IntervalBudget> media_budget_ 146 std::unique_ptr<paced_sender::IntervalBudget> media_budget_
(...skipping 11 matching lines...) Expand all
159 uint32_t min_send_bitrate_kbps_ GUARDED_BY(critsect_); 158 uint32_t min_send_bitrate_kbps_ GUARDED_BY(critsect_);
160 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_); 159 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_);
161 160
162 int64_t time_last_update_us_ GUARDED_BY(critsect_); 161 int64_t time_last_update_us_ GUARDED_BY(critsect_);
163 162
164 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); 163 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_);
165 uint64_t packet_counter_; 164 uint64_t packet_counter_;
166 }; 165 };
167 } // namespace webrtc 166 } // namespace webrtc
168 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ 167 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/pacing/paced_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698