Correcting payload size to NetEq simulator in RTC event log analyzer.
Bug: webrtc:9171, b/77841364 Change-Id: Ia56b61df1cb824d9d1bf9ec7d93770082803b642 Reviewed-on: https://webrtc-review.googlesource.com/71140 Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Commit-Queue: Minyue Li <minyue@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22948}
This commit is contained in:
@ -514,8 +514,8 @@ EventLogAnalyzer::EventLogAnalyzer(const ParsedRtcEventLog& log)
|
||||
}
|
||||
uint64_t timestamp = parsed_log_.GetTimestamp(i);
|
||||
StreamId stream(parsed_header.ssrc, direction);
|
||||
rtp_packets_[stream].push_back(
|
||||
LoggedRtpPacket(timestamp, parsed_header, total_length));
|
||||
rtp_packets_[stream].push_back(LoggedRtpPacket(
|
||||
timestamp, parsed_header, header_length, total_length));
|
||||
break;
|
||||
}
|
||||
case ParsedRtcEventLog::RTCP_EVENT: {
|
||||
@ -1911,7 +1911,8 @@ class NetEqStreamInput : public test::NetEqInput {
|
||||
|
||||
// This is a header-only "dummy" packet. Set the payload to all zeros, with
|
||||
// length according to the virtual length.
|
||||
packet_data->payload.SetSize(packet_stream_it_->total_length);
|
||||
packet_data->payload.SetSize(packet_stream_it_->total_length -
|
||||
packet_stream_it_->header_length);
|
||||
std::fill_n(packet_data->payload.data(), packet_data->payload.size(), 0);
|
||||
|
||||
++packet_stream_it_;
|
||||
|
@ -30,11 +30,18 @@ namespace webrtc {
|
||||
namespace plotting {
|
||||
|
||||
struct LoggedRtpPacket {
|
||||
LoggedRtpPacket(uint64_t timestamp, RTPHeader header, size_t total_length)
|
||||
: timestamp(timestamp), header(header), total_length(total_length) {}
|
||||
LoggedRtpPacket(uint64_t timestamp,
|
||||
RTPHeader header,
|
||||
size_t header_length,
|
||||
size_t total_length)
|
||||
: timestamp(timestamp),
|
||||
header(header),
|
||||
header_length(header_length),
|
||||
total_length(total_length) {}
|
||||
uint64_t timestamp;
|
||||
// TODO(terelius): This allocates space for 15 CSRCs even if none are used.
|
||||
RTPHeader header;
|
||||
size_t header_length;
|
||||
size_t total_length;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user