[stats] Mark codec implementation stats as exposing hardware capability

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 <hbos@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38594}
This commit is contained in:
Evan Shrubsole 2022-10-31 11:04:22 +00:00 committed by WebRTC LUCI CQ
parent e82d2a1773
commit f4abcc0bbb

View File

@ -483,7 +483,9 @@ class RTC_EXPORT RTCInboundRTPStreamStats final
RTCStatsMember<double> estimated_playout_timestamp; RTCStatsMember<double> estimated_playout_timestamp;
// Only implemented for video. // Only implemented for video.
// TODO(https://crbug.com/webrtc/14178): Also implement for audio. // TODO(https://crbug.com/webrtc/14178): Also implement for audio.
RTCStatsMember<std::string> decoder_implementation; RTCRestrictedStatsMember<std::string,
StatExposureCriteria::kHardwareCapability>
decoder_implementation;
// FIR and PLI counts are only defined for |kind == "video"|. // FIR and PLI counts are only defined for |kind == "video"|.
RTCStatsMember<uint32_t> fir_count; RTCStatsMember<uint32_t> fir_count;
RTCStatsMember<uint32_t> pli_count; RTCStatsMember<uint32_t> pli_count;
@ -548,7 +550,9 @@ class RTC_EXPORT RTCOutboundRTPStreamStats final : public RTCRTPStreamStats {
RTCStatsMember<std::string> content_type; RTCStatsMember<std::string> content_type;
// Only implemented for video. // Only implemented for video.
// TODO(https://crbug.com/webrtc/14178): Implement for audio as well. // TODO(https://crbug.com/webrtc/14178): Implement for audio as well.
RTCStatsMember<std::string> encoder_implementation; RTCRestrictedStatsMember<std::string,
StatExposureCriteria::kHardwareCapability>
encoder_implementation;
// FIR and PLI counts are only defined for |kind == "video"|. // FIR and PLI counts are only defined for |kind == "video"|.
RTCStatsMember<uint32_t> fir_count; RTCStatsMember<uint32_t> fir_count;
RTCStatsMember<uint32_t> pli_count; RTCStatsMember<uint32_t> pli_count;