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}
This commit is contained in:
parent
6a21eb4753
commit
b3e5969658
@ -398,7 +398,7 @@ class RTC_EXPORT RTCSentRtpStreamStats : public RTCRtpStreamStats {
|
||||
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 @@ class RTC_EXPORT RTCInboundRtpStreamStats final
|
||||
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 @@ class RTC_EXPORT RTCInboundRtpStreamStats final
|
||||
// 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;
|
||||
|
||||
@ -70,7 +70,7 @@ struct CallReceiveStatistics {
|
||||
// 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;
|
||||
|
||||
@ -94,7 +94,7 @@ class AudioReceiveStreamInterface : public MediaReceiveStreamInterface {
|
||||
// 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;
|
||||
|
||||
@ -551,7 +551,7 @@ struct VoiceReceiverInfo : public MediaReceiverInfo {
|
||||
// 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;
|
||||
|
||||
@ -342,7 +342,7 @@ struct RtpPacketCounter {
|
||||
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();
|
||||
|
||||
@ -738,8 +738,8 @@ class RTCStatsReportVerifier {
|
||||
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 @@ class RTCStatsReportVerifier {
|
||||
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 @@ class RTCStatsReportVerifier {
|
||||
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>(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user