Adds packet_size to rtc::SentPacket in testing code.
Bug: webrtc:9796 Change-Id: Id67bb02858164dba696474b1b60ebfa1597a2577 Reviewed-on: https://webrtc-review.googlesource.com/102685 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24901}
This commit is contained in:

committed by
Commit Bot

parent
9eeff94860
commit
156d11ddd9
@ -181,10 +181,12 @@ bool DegradedCall::SendRtp(const uint8_t* packet,
|
|||||||
// been sent, so that the bandwidth estimator sees the delay we add.
|
// been sent, so that the bandwidth estimator sees the delay we add.
|
||||||
send_pipe_->SendRtp(packet, length, options);
|
send_pipe_->SendRtp(packet, length, options);
|
||||||
if (options.packet_id != -1) {
|
if (options.packet_id != -1) {
|
||||||
rtc::SentPacket packet_info;
|
rtc::SentPacket sent_packet;
|
||||||
packet_info.packet_id = options.packet_id;
|
sent_packet.packet_id = options.packet_id;
|
||||||
packet_info.send_time_ms = clock_->TimeInMilliseconds();
|
sent_packet.send_time_ms = clock_->TimeInMilliseconds();
|
||||||
call_->OnSentPacket(packet_info);
|
sent_packet.info.packet_size_bytes = length;
|
||||||
|
sent_packet.info.packet_type = rtc::PacketType::kData;
|
||||||
|
call_->OnSentPacket(sent_packet);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,8 @@ bool DirectTransport::SendRtp(const uint8_t* data,
|
|||||||
if (send_call_) {
|
if (send_call_) {
|
||||||
rtc::SentPacket sent_packet(options.packet_id,
|
rtc::SentPacket sent_packet(options.packet_id,
|
||||||
clock_->TimeInMilliseconds());
|
clock_->TimeInMilliseconds());
|
||||||
|
sent_packet.info.packet_size_bytes = length;
|
||||||
|
sent_packet.info.packet_type = rtc::PacketType::kData;
|
||||||
send_call_->OnSentPacket(sent_packet);
|
send_call_->OnSentPacket(sent_packet);
|
||||||
}
|
}
|
||||||
SendPacket(data, length);
|
SendPacket(data, length);
|
||||||
|
@ -182,9 +182,15 @@ NetworkNodeTransport::~NetworkNodeTransport() = default;
|
|||||||
bool NetworkNodeTransport::SendRtp(const uint8_t* packet,
|
bool NetworkNodeTransport::SendRtp(const uint8_t* packet,
|
||||||
size_t length,
|
size_t length,
|
||||||
const PacketOptions& options) {
|
const PacketOptions& options) {
|
||||||
sender_->call_->OnSentPacket(rtc::SentPacket(
|
int64_t send_time_ms = sender_->clock_->TimeInMilliseconds();
|
||||||
options.packet_id, sender_->clock_->TimeInMilliseconds()));
|
rtc::SentPacket sent_packet;
|
||||||
Timestamp send_time = Timestamp::ms(sender_->clock_->TimeInMilliseconds());
|
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,
|
rtc::CopyOnWriteBuffer buffer(packet, length,
|
||||||
length + packet_overhead_.bytes());
|
length + packet_overhead_.bytes());
|
||||||
buffer.SetSize(length + packet_overhead_.bytes());
|
buffer.SetSize(length + packet_overhead_.bytes());
|
||||||
|
Reference in New Issue
Block a user