Implement RTC[In/Out]boundRtpStreamStats.contentType.

Spec: https://henbos.github.io/webrtc-provisional-stats/#dom-rtcinboundrtpstreamstats-contenttype

This already exists as a goog-stat. This CL only plumbs the value to the
new stats collector.

Note: There is currently no distinction between the extension being
missing and it being present but the value being "unspecified". Until
https://crbug.com/webrtc/10529 is fixed, this metric is only exposed if
SCREENSHARE was present.

Bug: webrtc:10452
Change-Id: Ic8723f4d0efb43ab72a560e954676facd3b90659
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131946
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27520}
diff --git a/pc/rtc_stats_collector_unittest.cc b/pc/rtc_stats_collector_unittest.cc
index ec2a9eb..5b0d164 100644
--- a/pc/rtc_stats_collector_unittest.cc
+++ b/pc/rtc_stats_collector_unittest.cc
@@ -1684,6 +1684,7 @@
   video_media_info.receivers[0].nacks_sent = 7;
   video_media_info.receivers[0].frames_decoded = 8;
   video_media_info.receivers[0].qp_sum = absl::nullopt;
+  video_media_info.receivers[0].content_type = VideoContentType::UNSPECIFIED;
 
   RtpCodecParameters codec_parameters;
   codec_parameters.payload_type = 42;
@@ -1718,6 +1719,7 @@
   expected_video.fraction_lost = 4.5;
   expected_video.frames_decoded = 8;
   // |expected_video.qp_sum| should be undefined.
+  // |expected_video.content_type| should be undefined.
 
   ASSERT_TRUE(report->Get(expected_video.id()));
   EXPECT_EQ(
@@ -1727,6 +1729,8 @@
   // Set previously undefined values and "GetStats" again.
   video_media_info.receivers[0].qp_sum = 9;
   expected_video.qp_sum = 9;
+  video_media_info.receivers[0].content_type = VideoContentType::SCREENSHARE;
+  expected_video.content_type = "screenshare";
   video_media_channel->SetStats(video_media_info);
 
   report = stats_->GetFreshStatsReport();
@@ -1806,6 +1810,7 @@
   video_media_info.senders[0].frames_encoded = 8;
   video_media_info.senders[0].total_encode_time_ms = 9000;
   video_media_info.senders[0].qp_sum = absl::nullopt;
+  video_media_info.senders[0].content_type = VideoContentType::UNSPECIFIED;
 
   RtpCodecParameters codec_parameters;
   codec_parameters.payload_type = 42;
@@ -1843,6 +1848,7 @@
   expected_video.bytes_sent = 6;
   expected_video.frames_encoded = 8;
   expected_video.total_encode_time = 9.0;
+  // |expected_video.content_type| should be undefined.
   // |expected_video.qp_sum| should be undefined.
   ASSERT_TRUE(report->Get(expected_video.id()));
 
@@ -1853,6 +1859,8 @@
   // Set previously undefined values and "GetStats" again.
   video_media_info.senders[0].qp_sum = 9;
   expected_video.qp_sum = 9;
+  video_media_info.senders[0].content_type = VideoContentType::SCREENSHARE;
+  expected_video.content_type = "screenshare";
   video_media_channel->SetStats(video_media_info);
 
   report = stats_->GetFreshStatsReport();