Add receive_timestamp to DatagramAcks.
Whenever a datagram is acked, the datagram transport will provide the
remote peer's receive timestamp in this field.
Bug: webrtc:9719
Change-Id: I516b9d602e62179a3deda001e0ee9b484aa20d37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139440
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28114}
diff --git a/api/BUILD.gn b/api/BUILD.gn
index 375cf9d..4bf0a3b 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -158,6 +158,7 @@
"transport/media:audio_interfaces",
"transport/media:video_interfaces",
"units:data_rate",
+ "units:timestamp",
"video:encoded_image",
"video:video_frame",
"//third_party/abseil-cpp/absl/algorithm:container",
diff --git a/api/datagram_transport_interface.h b/api/datagram_transport_interface.h
index 84acdfc..b1e851c 100644
--- a/api/datagram_transport_interface.h
+++ b/api/datagram_transport_interface.h
@@ -22,6 +22,7 @@
#include "api/media_transport_interface.h"
#include "api/rtc_error.h"
#include "api/units/data_rate.h"
+#include "api/units/timestamp.h"
namespace rtc {
class PacketTransportInternal;
@@ -31,11 +32,14 @@
typedef int64_t DatagramId;
-// TODO(mellem): Add receive timestamp.
struct DatagramAck {
// |datagram_id| is same as passed in
// DatagramTransportInterface::SendDatagram.
DatagramId datagram_id;
+
+ // The timestamp at which the remote peer received the identified datagram,
+ // according to that peer's clock.
+ Timestamp receive_timestamp;
};
// All sink methods are called on network thread.