Index: webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h |
diff --git a/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h b/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h |
index 364d9718372f5aeb4641abc268f54e40a36f65da..a489018d28f05a5928ce28ff8be98cc263e54a63 100644 |
--- a/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h |
+++ b/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h |
@@ -251,32 +251,46 @@ struct PacketInfo { |
-1, |
sequence_number, |
0, |
- PacedPacketInfo::kNotAProbe) {} |
+ PacedPacketInfo()) {} |
PacketInfo(int64_t arrival_time_ms, |
int64_t send_time_ms, |
uint16_t sequence_number, |
size_t payload_size, |
- int probe_cluster_id) |
+ const PacedPacketInfo& pacing_info) |
: PacketInfo(-1, |
arrival_time_ms, |
send_time_ms, |
sequence_number, |
payload_size, |
- probe_cluster_id) {} |
+ pacing_info) {} |
PacketInfo(int64_t creation_time_ms, |
int64_t arrival_time_ms, |
int64_t send_time_ms, |
uint16_t sequence_number, |
size_t payload_size, |
- int probe_cluster_id) |
+ const PacedPacketInfo& pacing_info) |
: creation_time_ms(creation_time_ms), |
arrival_time_ms(arrival_time_ms), |
send_time_ms(send_time_ms), |
sequence_number(sequence_number), |
payload_size(payload_size), |
- probe_cluster_id(probe_cluster_id) {} |
+ pacing_info(pacing_info) {} |
+ |
+ static constexpr int kNotAProbe = -1; |
+ |
+ // NOTE! The variable |creation_time_ms| is not used when testing equality. |
+ // This is due to |creation_time_ms| only being used by SendTimeHistory |
+ // for book-keeping, and is of no interest outside that class. |
+ // TODO(philipel): Remove |creation_time_ms| from PacketInfo when cleaning up |
+ // SendTimeHistory. |
+ bool operator==(const PacketInfo& rhs) const { |
+ return arrival_time_ms == rhs.arrival_time_ms && |
+ send_time_ms == rhs.send_time_ms && |
+ sequence_number == rhs.sequence_number && |
+ payload_size == rhs.payload_size && pacing_info == rhs.pacing_info; |
+ } |
// Time corresponding to when this object was created. |
int64_t creation_time_ms; |
@@ -291,9 +305,8 @@ struct PacketInfo { |
uint16_t sequence_number; |
// Size of the packet excluding RTP headers. |
size_t payload_size; |
- // Which probing cluster this packets belongs to. |
- // TODO(philipel): replace this with pacing information when it is available. |
- int probe_cluster_id; |
+ // Pacing information about this packet. |
+ PacedPacketInfo pacing_info; |
}; |
class TransportFeedbackObserver { |
@@ -301,11 +314,10 @@ class TransportFeedbackObserver { |
TransportFeedbackObserver() {} |
virtual ~TransportFeedbackObserver() {} |
- // Note: Transport-wide sequence number as sequence number. Arrival time |
- // must be set to 0. |
+ // Note: Transport-wide sequence number as sequence number. |
virtual void AddPacket(uint16_t sequence_number, |
size_t length, |
- int probe_cluster_id) = 0; |
+ const PacedPacketInfo& pacing_info) = 0; |
virtual void OnTransportFeedback(const rtcp::TransportFeedback& feedback) = 0; |