Makes send time information in feedback non-optional.
This makes it safer to reason about the common case where send time information is available. We don't have to either assume that it's available, or check it everywhere the PacketResult struct is used. To achieve this, a new field is added to TransportPacketsFeedback and a new interface is introduced to clearly separate which field is used. A possible followup would be to introduce a separate struct. That would complicate the signature of ProcessTransportFeedback. Bug: webrtc:9934 Change-Id: I2b319e4df2b557fbd4de66b812744bca7d91ca15 Reviewed-on: https://webrtc-review.googlesource.com/c/107080 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25465}
This commit is contained in:
committed by
Commit Bot
parent
be837ac3bc
commit
af6d741fe1
@ -144,7 +144,7 @@ TransportPacketsFeedback SimulatedSender::PullFeedbackReport(
|
||||
}
|
||||
}
|
||||
|
||||
data_in_flight_ -= feedback.sent_packet->size;
|
||||
data_in_flight_ -= feedback.sent_packet.size;
|
||||
report.packet_feedbacks.push_back(feedback);
|
||||
}
|
||||
}
|
||||
@ -284,9 +284,9 @@ bool SimulatedTimeClient::TryDeliverPacket(rtc::CopyOnWriteBuffer raw_buffer,
|
||||
for (PacketResult& feedback : report.packet_feedbacks) {
|
||||
if (packet_log_)
|
||||
fprintf(packet_log_, "%" PRId64 " %" PRId64 " %.3lf %.3lf %.3lf\n",
|
||||
feedback.sent_packet->sequence_number,
|
||||
feedback.sent_packet->size.bytes(),
|
||||
feedback.sent_packet->send_time.seconds<double>(),
|
||||
feedback.sent_packet.sequence_number,
|
||||
feedback.sent_packet.size.bytes(),
|
||||
feedback.sent_packet.send_time.seconds<double>(),
|
||||
feedback.receive_time.seconds<double>(),
|
||||
at_time.seconds<double>());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user