Post stats updates in RtpSenderEgress to the worker.

On the way remove need for lock for
rtp_sequence_number_map_ and timestamp_offset_.

Change-Id: I21a5cbf6208620435a1a16fff68c33c0cb84f51d
Bug: webrtc:11581
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177424
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31581}
This commit is contained in:
Tomas Gunnarsson
2020-06-29 13:56:15 +02:00
committed by Commit Bot
parent 6fb7004f33
commit 096c0b0921
7 changed files with 148 additions and 93 deletions

View File

@ -44,6 +44,12 @@ bool IsLegalRsidName(absl::string_view name) {
StreamDataCounters::StreamDataCounters() : first_packet_time_ms(-1) {}
RtpPacketCounter::RtpPacketCounter(const RtpPacket& packet)
: header_bytes(packet.headers_size()),
payload_bytes(packet.payload_size()),
padding_bytes(packet.padding_size()),
packets(1) {}
void RtpPacketCounter::AddPacket(const RtpPacket& packet) {
++packets;
header_bytes += packet.headers_size();