Adds GetSentPacket to PacketResult.

This prepares for making sent_packet non-optional in a future cl:
https://webrtc-review.googlesource.com/c/src/+/107080

Bug: webrtc:9934
Change-Id: I9de9bccde83069c33f1b267c6c0c38de49141d7f
Reviewed-on: https://webrtc-review.googlesource.com/c/108281
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25411}
This commit is contained in:
Sebastian Jansson
2018-10-29 11:24:11 +01:00
committed by Commit Bot
parent 449c1c03a7
commit ef45669acf

View File

@ -128,6 +128,12 @@ struct PacketResult {
absl::optional<SentPacket> sent_packet;
Timestamp receive_time = Timestamp::PlusInfinity();
// TODO(bugs.webrtc.org/9934): Remove this when sent_packet is made
// non-optional.
const SentPacket& GetSentPacket() {
RTC_DCHECK(sent_packet.has_value());
return *sent_packet;
}
};
struct TransportPacketsFeedback {