Change ReceiveStatistics to implement RtpPacketSinkInterface, part 2.

Delete the deprecated IncomingPacket method, and convert implementation
to use RtpPacketReceived rather than RTPHeader.

Part 1 was https://webrtc-review.googlesource.com/c/src/+/100104

Bug: webrtc:7135, webrtc:8016
Change-Id: Ib4840d947870403deea2f9067f847e4b0f182479
Reviewed-on: https://webrtc-review.googlesource.com/c/6762
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25648}
This commit is contained in:
Niels Möller
2018-11-15 08:05:16 +01:00
committed by Commit Bot
parent 7af4ac8937
commit dbb988b016
6 changed files with 59 additions and 80 deletions

View File

@ -9,6 +9,7 @@
*/
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "modules/rtp_rtcp/source/rtp_packet.h"
#include <ctype.h>
#include <string.h>
@ -130,4 +131,11 @@ bool PacketFeedback::operator==(const PacketFeedback& rhs) const {
payload_size == rhs.payload_size && pacing_info == rhs.pacing_info;
}
void RtpPacketCounter::AddPacket(const RtpPacket& packet) {
++packets;
header_bytes += packet.headers_size();
padding_bytes += packet.padding_size();
payload_bytes += packet.payload_size();
}
} // namespace webrtc