stats: use uint64_t for RTCSentRtpStreamStats.packetsSent

spec update from https://github.com/w3c/webrtc-stats/pull/744

BUG=webrtc:14989

Change-Id: I9d0adcf951501bc281054c77bb6bc03e47192523
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295505
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39575}
diff --git a/api/stats/rtcstats_objects.h b/api/stats/rtcstats_objects.h
index 790b3b1..eacd8ee 100644
--- a/api/stats/rtcstats_objects.h
+++ b/api/stats/rtcstats_objects.h
@@ -398,7 +398,7 @@
   RTCSentRtpStreamStats(const RTCSentRtpStreamStats& other);
   ~RTCSentRtpStreamStats() override;
 
-  RTCStatsMember<uint32_t> packets_sent;
+  RTCStatsMember<uint64_t> packets_sent;
   RTCStatsMember<uint64_t> bytes_sent;
 
  protected:
@@ -415,8 +415,6 @@
   RTCInboundRtpStreamStats(const RTCInboundRtpStreamStats& other);
   ~RTCInboundRtpStreamStats() override;
 
-  // TODO(https://crbug.com/webrtc/14174): Implement trackIdentifier and kind.
-
   RTCStatsMember<std::string> playout_id;
   RTCStatsMember<std::string> track_identifier;
   RTCStatsMember<std::string> mid;
@@ -464,8 +462,7 @@
   // Only populated if audio/video sync is enabled.
   // TODO(https://crbug.com/webrtc/14177): Expose even if A/V sync is off?
   RTCStatsMember<double> estimated_playout_timestamp;
-  // Only implemented for video.
-  // TODO(https://crbug.com/webrtc/14178): Also implement for audio.
+  // Only defined for video.
   RTCRestrictedStatsMember<std::string,
                            StatExposureCriteria::kHardwareCapability>
       decoder_implementation;
diff --git a/audio/channel_receive.h b/audio/channel_receive.h
index b47a4b5..d1d24e5 100644
--- a/audio/channel_receive.h
+++ b/audio/channel_receive.h
@@ -70,7 +70,7 @@
   // https://w3c.github.io/webrtc-stats/#remoteoutboundrtpstats-dict*
   absl::optional<int64_t> last_sender_report_timestamp_ms;
   absl::optional<int64_t> last_sender_report_remote_timestamp_ms;
-  uint32_t sender_reports_packets_sent = 0;
+  uint64_t sender_reports_packets_sent = 0;
   uint64_t sender_reports_bytes_sent = 0;
   uint64_t sender_reports_reports_count = 0;
   absl::optional<TimeDelta> round_trip_time;
diff --git a/call/audio_receive_stream.h b/call/audio_receive_stream.h
index 1d33bf2e..64fdf66 100644
--- a/call/audio_receive_stream.h
+++ b/call/audio_receive_stream.h
@@ -94,7 +94,7 @@
     // https://w3c.github.io/webrtc-stats/#remoteoutboundrtpstats-dict*
     absl::optional<int64_t> last_sender_report_timestamp_ms;
     absl::optional<int64_t> last_sender_report_remote_timestamp_ms;
-    uint32_t sender_reports_packets_sent = 0;
+    uint64_t sender_reports_packets_sent = 0;
     uint64_t sender_reports_bytes_sent = 0;
     uint64_t sender_reports_reports_count = 0;
     absl::optional<TimeDelta> round_trip_time;
diff --git a/media/base/media_channel.h b/media/base/media_channel.h
index 5ff3861..76dc946 100644
--- a/media/base/media_channel.h
+++ b/media/base/media_channel.h
@@ -551,7 +551,7 @@
   // https://w3c.github.io/webrtc-stats/#remoteoutboundrtpstats-dict*
   absl::optional<int64_t> last_sender_report_timestamp_ms;
   absl::optional<int64_t> last_sender_report_remote_timestamp_ms;
-  uint32_t sender_reports_packets_sent = 0;
+  uint64_t sender_reports_packets_sent = 0;
   uint64_t sender_reports_bytes_sent = 0;
   uint64_t sender_reports_reports_count = 0;
   absl::optional<webrtc::TimeDelta> round_trip_time;
diff --git a/modules/rtp_rtcp/include/rtp_rtcp_defines.h b/modules/rtp_rtcp/include/rtp_rtcp_defines.h
index 43bba3e..6e558e1 100644
--- a/modules/rtp_rtcp/include/rtp_rtcp_defines.h
+++ b/modules/rtp_rtcp/include/rtp_rtcp_defines.h
@@ -342,7 +342,7 @@
   size_t header_bytes;   // Number of bytes used by RTP headers.
   size_t payload_bytes;  // Payload bytes, excluding RTP headers and padding.
   size_t padding_bytes;  // Number of padding bytes.
-  uint32_t packets;      // Number of packets.
+  size_t packets;        // Number of packets.
   // The total delay of all `packets`. For RtpPacketToSend packets, this is
   // `time_in_send_queue()`. For receive packets, this is zero.
   webrtc::TimeDelta total_packet_delay = webrtc::TimeDelta::Zero();
diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc
index b0bc810..2a59d2c 100644
--- a/pc/rtc_stats_integrationtest.cc
+++ b/pc/rtc_stats_integrationtest.cc
@@ -738,8 +738,8 @@
   void VerifyRTCSentRtpStreamStats(const RTCSentRtpStreamStats& sent_stream,
                                    RTCStatsVerifier& verifier) {
     VerifyRTCRtpStreamStats(sent_stream, verifier);
-    verifier.TestMemberIsDefined(sent_stream.packets_sent);
-    verifier.TestMemberIsDefined(sent_stream.bytes_sent);
+    verifier.TestMemberIsNonNegative<uint64_t>(sent_stream.packets_sent);
+    verifier.TestMemberIsNonNegative<uint64_t>(sent_stream.bytes_sent);
   }
 
   bool VerifyRTCInboundRtpStreamStats(
@@ -923,7 +923,8 @@
   bool VerifyRTCOutboundRtpStreamStats(
       const RTCOutboundRtpStreamStats& outbound_stream) {
     RTCStatsVerifier verifier(report_.get(), &outbound_stream);
-    VerifyRTCRtpStreamStats(outbound_stream, verifier);
+    VerifyRTCSentRtpStreamStats(outbound_stream, verifier);
+
     verifier.TestMemberIsDefined(outbound_stream.mid);
     verifier.TestMemberIsDefined(outbound_stream.active);
     if (outbound_stream.kind.is_defined() && *outbound_stream.kind == "video") {
@@ -946,12 +947,10 @@
     verifier.TestMemberIsNonNegative<uint32_t>(outbound_stream.nack_count);
     verifier.TestMemberIsOptionalIDReference(
         outbound_stream.remote_id, RTCRemoteInboundRtpStreamStats::kType);
-    verifier.TestMemberIsNonNegative<uint32_t>(outbound_stream.packets_sent);
     verifier.TestMemberIsNonNegative<double>(
         outbound_stream.total_packet_send_delay);
     verifier.TestMemberIsNonNegative<uint64_t>(
         outbound_stream.retransmitted_packets_sent);
-    verifier.TestMemberIsNonNegative<uint64_t>(outbound_stream.bytes_sent);
     verifier.TestMemberIsNonNegative<uint64_t>(
         outbound_stream.header_bytes_sent);
     verifier.TestMemberIsNonNegative<uint64_t>(