Add reporting of googContentType via GetStats on send side

BUG=webrtc:8174

Review-Url: https://codereview.webrtc.org/3005193002
Cr-Commit-Position: refs/heads/master@{#19719}
This commit is contained in:
ilnik 2017-09-06 12:32:35 -07:00 committed by Commit Bot
parent d7b3d390c7
commit 50864a8f4b
5 changed files with 14 additions and 1 deletions

View File

@ -82,6 +82,8 @@ class VideoSendStream {
int number_of_cpu_adapt_changes = 0;
int number_of_quality_adapt_changes = 0;
std::map<uint32_t, StreamStats> substreams;
webrtc::VideoContentType content_type =
webrtc::VideoContentType::UNSPECIFIED;
};
struct Config {

View File

@ -731,7 +731,8 @@ struct VideoSenderInfo : public MediaSenderInfo {
adapt_changes(0),
avg_encode_ms(0),
encode_usage_percent(0),
frames_encoded(0) {}
frames_encoded(0),
content_type(webrtc::VideoContentType::UNSPECIFIED) {}
std::vector<SsrcGroup> ssrc_groups;
// TODO(hbos): Move this to |VideoMediaInfo::send_codecs|?
@ -752,6 +753,7 @@ struct VideoSenderInfo : public MediaSenderInfo {
int encode_usage_percent;
uint32_t frames_encoded;
rtc::Optional<uint64_t> qp_sum;
webrtc::VideoContentType content_type;
};
struct VideoReceiverInfo : public MediaReceiverInfo {

View File

@ -1976,6 +1976,8 @@ VideoSenderInfo WebRtcVideoChannel::WebRtcVideoSendStream::GetVideoSenderInfo(
info.nominal_bitrate = stats.media_bitrate_bps;
info.preferred_bitrate = stats.preferred_media_bitrate_bps;
info.content_type = stats.content_type;
info.send_frame_width = 0;
info.send_frame_height = 0;
for (std::map<uint32_t, webrtc::VideoSendStream::StreamStats>::iterator it =

View File

@ -310,6 +310,9 @@ void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) {
for (const auto& i : ints)
report->AddInt(i.name, i.value);
report->AddString(StatsReport::kStatsValueNameMediaType, "video");
report->AddString(
StatsReport::kStatsValueNameContentType,
webrtc::videocontenttypehelpers::ToString(info.content_type));
}
void ExtractStats(const cricket::BandwidthEstimationInfo& info,

View File

@ -539,6 +539,10 @@ VideoSendStream::Stats SendStatisticsProxy::GetStats() {
PurgeOldStats();
stats_.input_frame_rate =
round(uma_container_->input_frame_rate_tracker_.ComputeRate());
stats_.content_type =
content_type_ == VideoEncoderConfig::ContentType::kRealtimeVideo
? VideoContentType::UNSPECIFIED
: VideoContentType::SCREENSHARE;
return stats_;
}