From f4abcc0bbbf86df02771c7eebb4ebf03a0122d4d Mon Sep 17 00:00:00 2001 From: Evan Shrubsole Date: Mon, 31 Oct 2022 11:04:22 +0000 Subject: [PATCH] [stats] Mark codec implementation stats as exposing hardware capability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This means that these stats will be filtered out by JavaScript unless the conditions for exposing hardware capabilities are met. These conditions are described in the webrtc-stats spec at https://w3c.github.io/webrtc-stats/#limiting-exposure-of-hardware-capabilities. R=hbos@webrtc.org Bug: chromium:1369050,chromium:1369049 Change-Id: I05bdb72ef6789417488c7e786e8713ce99a91f8a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279960 Reviewed-by: Henrik Boström Commit-Queue: Evan Shrubsole Cr-Commit-Position: refs/heads/main@{#38594} --- api/stats/rtcstats_objects.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/stats/rtcstats_objects.h b/api/stats/rtcstats_objects.h index 42553c1b7c..6f8178407f 100644 --- a/api/stats/rtcstats_objects.h +++ b/api/stats/rtcstats_objects.h @@ -483,7 +483,9 @@ class RTC_EXPORT RTCInboundRTPStreamStats final RTCStatsMember estimated_playout_timestamp; // Only implemented for video. // TODO(https://crbug.com/webrtc/14178): Also implement for audio. - RTCStatsMember decoder_implementation; + RTCRestrictedStatsMember + decoder_implementation; // FIR and PLI counts are only defined for |kind == "video"|. RTCStatsMember fir_count; RTCStatsMember pli_count; @@ -548,7 +550,9 @@ class RTC_EXPORT RTCOutboundRTPStreamStats final : public RTCRTPStreamStats { RTCStatsMember content_type; // Only implemented for video. // TODO(https://crbug.com/webrtc/14178): Implement for audio as well. - RTCStatsMember encoder_implementation; + RTCRestrictedStatsMember + encoder_implementation; // FIR and PLI counts are only defined for |kind == "video"|. RTCStatsMember fir_count; RTCStatsMember pli_count;