Reland "[GetStats] Expose video codec implementation in standardized metrics."

This is a reland of 2b9fa09fa3e3379fd8e76490c394f25670352ef2.

It got reverted because I forgot to whitelist the new metrics in chromium,
which has now been done:
https://chromium-review.googlesource.com/c/chromium/src/+/1760209
Relanding requires no changes to the CL.

Original change's description:
> [GetStats] Expose video codec implementation in standardized metrics.
>
> Spec issue: https://github.com/w3c/webrtc-stats/issues/445
> Spec PR: https://github.com/w3c/webrtc-stats/pull/473
>
> Now that the spec's RTCCodecStats.implementation has moved to
> RTCOutboundRtpStreamStats.encoderImplementation and
> RTCInboundRtpStreamStats.decoderImplementation, this CL implements them
> using the same string that the legacy getStats() API used.
>
> Bug: webrtc:10890
> Change-Id: Ic43ce44735453626791959df3061ee253356015a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149168
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28877}

TBR=ilnik@webrtc.org

Bug: webrtc:10890
Change-Id: Ib874b608856c2795b1ca08f6af43c61dd859ea21
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149800
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28887}
This commit is contained in:
Henrik Boström
2019-08-16 13:09:51 +02:00
committed by Commit Bot
parent d05edecf4c
commit 6b430867b8
6 changed files with 42 additions and 17 deletions

View File

@ -122,8 +122,6 @@ class RTC_EXPORT RTCCodecStats final : public RTCStats {
RTCStatsMember<uint32_t> channels;
// TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7061
RTCStatsMember<std::string> sdp_fmtp_line;
// TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7061
RTCStatsMember<std::string> implementation;
};
// https://w3c.github.io/webrtc-stats/#dcstats-dict*
@ -447,6 +445,9 @@ class RTC_EXPORT RTCInboundRTPStreamStats final : public RTCRTPStreamStats {
RTCStatsMember<double> total_decode_time;
// https://henbos.github.io/webrtc-provisional-stats/#dom-rtcinboundrtpstreamstats-contenttype
RTCStatsMember<std::string> content_type;
// TODO(hbos): This is only implemented for video; implement it for audio as
// well.
RTCStatsMember<std::string> decoder_implementation;
};
// https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict*
@ -482,6 +483,9 @@ class RTC_EXPORT RTCOutboundRTPStreamStats final : public RTCRTPStreamStats {
RTCStatsMember<std::string> quality_limitation_reason;
// https://henbos.github.io/webrtc-provisional-stats/#dom-rtcoutboundrtpstreamstats-contenttype
RTCStatsMember<std::string> content_type;
// TODO(hbos): This is only implemented for video; implement it for audio as
// well.
RTCStatsMember<std::string> encoder_implementation;
};
// TODO(https://crbug.com/webrtc/10671): Refactor the stats dictionaries to have