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

Unified Diff: webrtc/modules/remote_bitrate_estimator/include/send_time_history.h

Issue 1288033008: Update SendTimeHistory to store complete PacketInfo, not just send time (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years, 3 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
Index: webrtc/modules/remote_bitrate_estimator/include/send_time_history.h
diff --git a/webrtc/modules/remote_bitrate_estimator/include/send_time_history.h b/webrtc/modules/remote_bitrate_estimator/include/send_time_history.h
index 8835856353c285d93c7ac7cf3b031438dbf5096f..b01a62bdd73a76e7c6b018834644c6dfaf10b1a6 100644
--- a/webrtc/modules/remote_bitrate_estimator/include/send_time_history.h
+++ b/webrtc/modules/remote_bitrate_estimator/include/send_time_history.h
@@ -15,6 +15,7 @@
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/basictypes.h"
+#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
namespace webrtc {
@@ -23,8 +24,12 @@ class SendTimeHistory {
explicit SendTimeHistory(int64_t packet_age_limit);
virtual ~SendTimeHistory();
- void AddAndRemoveOldSendTimes(uint16_t sequence_number, int64_t timestamp);
- bool GetSendTime(uint16_t sequence_number, int64_t* timestamp, bool remove);
+ void AddAndRemoveOld(const PacketInfo& packet);
+ bool UpdateSendTime(uint16_t sequence_number, int64_t timestamp);
+ // Look up PacketInfo for a sent packet, based on the sequence number, and
+ // populate all fields except for receive_time. The packet parameter must
+ // thus be non-null and have the sequence_number field set.
+ bool GetInfo(PacketInfo* packet, bool remove);
void Clear();
private:
@@ -33,7 +38,7 @@ class SendTimeHistory {
const int64_t packet_age_limit_;
uint16_t oldest_sequence_number_; // Oldest may not be lowest.
- std::map<uint16_t, int64_t> history_;
+ std::map<uint16_t, PacketInfo> history_;
DISALLOW_COPY_AND_ASSIGN(SendTimeHistory);
};
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/BUILD.gn ('k') | webrtc/modules/remote_bitrate_estimator/send_time_history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698