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

Unified Diff: webrtc/modules/pacing/paced_sender.cc

Issue 2825333002: Replace first_packet_sent_ms_ in Call. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/pacing/paced_sender.h ('k') | webrtc/modules/pacing/paced_sender_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/paced_sender.cc
diff --git a/webrtc/modules/pacing/paced_sender.cc b/webrtc/modules/pacing/paced_sender.cc
index a57ec05149a6c5d732a7f6980f07cef66112e376..7c24301b95f0d830af5effde988a9a182ac36d48 100644
--- a/webrtc/modules/pacing/paced_sender.cc
+++ b/webrtc/modules/pacing/paced_sender.cc
@@ -262,6 +262,7 @@ PacedSender::PacedSender(const Clock* clock,
max_padding_bitrate_kbps_(0u),
pacing_bitrate_kbps_(0),
time_last_update_us_(clock->TimeInMicroseconds()),
+ first_sent_packet_ms_(-1),
packets_(new paced_sender::PacketQueue(clock)),
packet_counter_(0) {
UpdateBudgetWithElapsedTime(kMinPacketLimitMs);
@@ -368,6 +369,11 @@ size_t PacedSender::QueueSizePackets() const {
return packets_->SizeInPackets();
}
+int64_t PacedSender::FirstSentPacketTimeMs() const {
+ rtc::CritScope cs(&critsect_);
+ return first_sent_packet_ms_;
+}
+
int64_t PacedSender::QueueInMs() const {
rtc::CritScope cs(&critsect_);
@@ -442,6 +448,8 @@ void PacedSender::Process() {
if (SendPacket(packet, pacing_info)) {
// Send succeeded, remove it from the queue.
+ if (first_sent_packet_ms_ == -1)
+ first_sent_packet_ms_ = clock_->TimeInMilliseconds();
bytes_sent += packet.bytes;
packets_->FinalizePop(packet);
if (is_probing && bytes_sent > recommended_probe_size)
« no previous file with comments | « webrtc/modules/pacing/paced_sender.h ('k') | webrtc/modules/pacing/paced_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698