diff --git a/call/degraded_call.cc b/call/degraded_call.cc index fd289ebb9a..df9869729a 100644 --- a/call/degraded_call.cc +++ b/call/degraded_call.cc @@ -181,10 +181,12 @@ bool DegradedCall::SendRtp(const uint8_t* packet, // been sent, so that the bandwidth estimator sees the delay we add. send_pipe_->SendRtp(packet, length, options); if (options.packet_id != -1) { - rtc::SentPacket packet_info; - packet_info.packet_id = options.packet_id; - packet_info.send_time_ms = clock_->TimeInMilliseconds(); - call_->OnSentPacket(packet_info); + rtc::SentPacket sent_packet; + sent_packet.packet_id = options.packet_id; + sent_packet.send_time_ms = clock_->TimeInMilliseconds(); + sent_packet.info.packet_size_bytes = length; + sent_packet.info.packet_type = rtc::PacketType::kData; + call_->OnSentPacket(sent_packet); } return true; } diff --git a/test/direct_transport.cc b/test/direct_transport.cc index 0ae0730d82..6aa8c9158f 100644 --- a/test/direct_transport.cc +++ b/test/direct_transport.cc @@ -72,6 +72,8 @@ bool DirectTransport::SendRtp(const uint8_t* data, if (send_call_) { rtc::SentPacket sent_packet(options.packet_id, clock_->TimeInMilliseconds()); + sent_packet.info.packet_size_bytes = length; + sent_packet.info.packet_type = rtc::PacketType::kData; send_call_->OnSentPacket(sent_packet); } SendPacket(data, length); diff --git a/test/scenario/network_node.cc b/test/scenario/network_node.cc index eb215aa63c..6fec9eb659 100644 --- a/test/scenario/network_node.cc +++ b/test/scenario/network_node.cc @@ -182,9 +182,15 @@ NetworkNodeTransport::~NetworkNodeTransport() = default; bool NetworkNodeTransport::SendRtp(const uint8_t* packet, size_t length, const PacketOptions& options) { - sender_->call_->OnSentPacket(rtc::SentPacket( - options.packet_id, sender_->clock_->TimeInMilliseconds())); - Timestamp send_time = Timestamp::ms(sender_->clock_->TimeInMilliseconds()); + int64_t send_time_ms = sender_->clock_->TimeInMilliseconds(); + rtc::SentPacket sent_packet; + sent_packet.packet_id = options.packet_id; + sent_packet.send_time_ms = send_time_ms; + sent_packet.info.packet_size_bytes = length; + sent_packet.info.packet_type = rtc::PacketType::kData; + sender_->call_->OnSentPacket(sent_packet); + + Timestamp send_time = Timestamp::ms(send_time_ms); rtc::CopyOnWriteBuffer buffer(packet, length, length + packet_overhead_.bytes()); buffer.SetSize(length + packet_overhead_.bytes());