stats: fix type of inbound-rtp frames_received

which gets assigned from a uint32_t VideoReceiverInfo::frames_received so should remain an unsigned type

BUG=None

Change-Id: I1db6a3f96c4ff49eee72dcce54eb6fff346c128c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302342
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@{#39958}
This commit is contained in:
Philipp Hancke 2023-04-21 14:22:43 +02:00 committed by WebRTC LUCI CQ
parent 2bd878180a
commit 2b72d84733
3 changed files with 4 additions and 3 deletions

View File

@ -440,7 +440,7 @@ class RTC_EXPORT RTCInboundRtpStreamStats final
RTCStatsMember<double> total_audio_energy;
RTCStatsMember<double> total_samples_duration;
// Stats below are only implemented or defined for video.
RTCStatsMember<int32_t> frames_received;
RTCStatsMember<uint32_t> frames_received;
RTCStatsMember<uint32_t> frame_width;
RTCStatsMember<uint32_t> frame_height;
RTCStatsMember<double> frames_per_second;

View File

@ -812,7 +812,8 @@ class RTCStatsReportVerifier {
verifier.TestMemberIsUndefined(inbound_stream.audio_level);
verifier.TestMemberIsUndefined(inbound_stream.total_audio_energy);
verifier.TestMemberIsUndefined(inbound_stream.total_samples_duration);
verifier.TestMemberIsNonNegative<int32_t>(inbound_stream.frames_received);
verifier.TestMemberIsNonNegative<uint32_t>(
inbound_stream.frames_received);
verifier.TestMemberIsNonNegative<uint32_t>(inbound_stream.fir_count);
verifier.TestMemberIsNonNegative<uint32_t>(inbound_stream.pli_count);
verifier.TestMemberIsNonNegative<uint32_t>(inbound_stream.nack_count);

View File

@ -116,7 +116,7 @@ TEST(BweRampupTest, RampUpWithUndemuxableRtpPackets) {
auto callee_inbound_stats =
GetStatsAndProcess(s, callee)->GetStatsOfType<RTCInboundRtpStreamStats>();
ASSERT_THAT(callee_inbound_stats, SizeIs(1));
ASSERT_EQ(*callee_inbound_stats[0]->frames_received, 0);
ASSERT_EQ(*callee_inbound_stats[0]->frames_received, 0u);
DataRate final_bwe = GetAvailableSendBitrate(GetStatsAndProcess(s, caller));
// Ensure BWE has increased from the initial BWE. BWE will not increase unless