diff --git a/api/stats/rtcstats_objects.h b/api/stats/rtcstats_objects.h index ccaf095e3d..bcf606f848 100644 --- a/api/stats/rtcstats_objects.h +++ b/api/stats/rtcstats_objects.h @@ -518,7 +518,7 @@ class RTC_EXPORT RTCInboundRTPStreamStats final // TODO(hbos): This is only implemented for video; implement it for audio as // well. RTCStatsMember decoder_implementation; - // FIR and PLI counts are only defined for |media_type == "video"|. + // FIR and PLI counts are only defined for |kind == "video"|. RTCStatsMember fir_count; RTCStatsMember pli_count; RTCStatsMember nack_count; @@ -569,7 +569,7 @@ class RTC_EXPORT RTCOutboundRTPStreamStats final : public RTCRTPStreamStats { // TODO(hbos): This is only implemented for video; implement it for audio as // well. RTCStatsMember encoder_implementation; - // FIR and PLI counts are only defined for |media_type == "video"|. + // FIR and PLI counts are only defined for |kind == "video"|. RTCStatsMember fir_count; RTCStatsMember pli_count; RTCStatsMember nack_count; diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc index 21acf3a87c..956f414109 100644 --- a/pc/rtc_stats_integrationtest.cc +++ b/pc/rtc_stats_integrationtest.cc @@ -810,11 +810,11 @@ class RTCStatsReportVerifier { const RTCInboundRTPStreamStats& inbound_stream) { RTCStatsVerifier verifier(report_.get(), &inbound_stream); VerifyRTCReceivedRtpStreamStats(inbound_stream, verifier, - inbound_stream.media_type.is_defined() && + inbound_stream.kind.is_defined() && *inbound_stream.media_type == "audio"); verifier.TestMemberIsOptionalIDReference( inbound_stream.remote_id, RTCRemoteOutboundRtpStreamStats::kType); - if (inbound_stream.media_type.is_defined() && + if (inbound_stream.kind.is_defined() && *inbound_stream.media_type == "video") { verifier.TestMemberIsNonNegative(inbound_stream.qp_sum); verifier.TestMemberIsDefined(inbound_stream.decoder_implementation); @@ -823,7 +823,7 @@ class RTCStatsReportVerifier { verifier.TestMemberIsUndefined(inbound_stream.decoder_implementation); } verifier.TestMemberIsNonNegative(inbound_stream.packets_received); - if (inbound_stream.media_type.is_defined() && + if (inbound_stream.kind.is_defined() && *inbound_stream.media_type == "audio") { verifier.TestMemberIsNonNegative( inbound_stream.fec_packets_received); @@ -855,7 +855,7 @@ class RTCStatsReportVerifier { inbound_stream.jitter_buffer_delay); verifier.TestMemberIsNonNegative( inbound_stream.jitter_buffer_emitted_count); - if (inbound_stream.media_type.is_defined() && + if (inbound_stream.kind.is_defined() && *inbound_stream.media_type == "video") { verifier.TestMemberIsUndefined(inbound_stream.total_samples_received); verifier.TestMemberIsUndefined(inbound_stream.concealed_samples); @@ -907,7 +907,7 @@ class RTCStatsReportVerifier { // Test runtime too short to get an estimate (at least two RTCP sender // reports need to be received). verifier.MarkMemberTested(inbound_stream.estimated_playout_timestamp, true); - if (inbound_stream.media_type.is_defined() && + if (inbound_stream.kind.is_defined() && *inbound_stream.media_type == "video") { verifier.TestMemberIsDefined(inbound_stream.frames_decoded); verifier.TestMemberIsDefined(inbound_stream.key_frames_decoded); @@ -938,7 +938,7 @@ class RTCStatsReportVerifier { const RTCOutboundRTPStreamStats& outbound_stream) { RTCStatsVerifier verifier(report_.get(), &outbound_stream); VerifyRTCRTPStreamStats(outbound_stream, verifier); - if (outbound_stream.media_type.is_defined() && + if (outbound_stream.kind.is_defined() && *outbound_stream.media_type == "video") { verifier.TestMemberIsIDReference(outbound_stream.media_source_id, RTCVideoSourceStats::kType); @@ -967,7 +967,7 @@ class RTCStatsReportVerifier { outbound_stream.header_bytes_sent); verifier.TestMemberIsNonNegative( outbound_stream.retransmitted_bytes_sent); - if (outbound_stream.media_type.is_defined() && + if (outbound_stream.kind.is_defined() && *outbound_stream.media_type == "video") { verifier.TestMemberIsDefined(outbound_stream.frames_encoded); verifier.TestMemberIsDefined(outbound_stream.key_frames_encoded); diff --git a/test/pc/e2e/analyzer/video/video_quality_metrics_reporter.cc b/test/pc/e2e/analyzer/video/video_quality_metrics_reporter.cc index cc675cc2df..7a27ae0680 100644 --- a/test/pc/e2e/analyzer/video/video_quality_metrics_reporter.cc +++ b/test/pc/e2e/analyzer/video/video_quality_metrics_reporter.cc @@ -47,10 +47,10 @@ void VideoQualityMetricsReporter::OnStatsReports( auto outbound_rtp_stats = report->GetStatsOfType(); StatsSample sample; for (auto& s : outbound_rtp_stats) { - if (!s->media_type.is_defined()) { + if (!s->kind.is_defined()) { continue; } - if (!(*s->media_type == RTCMediaStreamTrackKind::kVideo)) { + if (!(*s->kind == RTCMediaStreamTrackKind::kVideo)) { continue; } if (s->timestamp_us() > sample.sample_time.us()) {