Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1651)

Unified Diff: webrtc/video/send_statistics_proxy.cc

Issue 2253563002: Add codec name to CodecSpecificInfo and get the codec name stats from there instead. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix fake_encoder.cc Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/send_statistics_proxy.cc
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc
index 9325b2f7dde07ec5ae65f3fdadf3d43194e51c13..72417f2f5de8f66a8486d33936acdd720337083b 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -349,14 +349,11 @@ void SendStatisticsProxy::SetContentType(
}
}
-void SendStatisticsProxy::OnEncoderStatsUpdate(
- uint32_t framerate,
- uint32_t bitrate,
- const std::string& encoder_name) {
+void SendStatisticsProxy::OnEncoderStatsUpdate(uint32_t framerate,
+ uint32_t bitrate) {
rtc::CritScope lock(&crit_);
stats_.encode_frame_rate = framerate;
stats_.media_bitrate_bps = bitrate;
- stats_.encoder_implementation_name = encoder_name;
}
void SendStatisticsProxy::OnEncodedFrameTimeMeasured(
@@ -441,12 +438,16 @@ void SendStatisticsProxy::OnSendEncodedImage(
const CodecSpecificInfo* codec_info) {
size_t simulcast_idx = 0;
+ rtc::CritScope lock(&crit_);
if (codec_info) {
if (codec_info->codecType == kVideoCodecVP8) {
simulcast_idx = codec_info->codecSpecific.VP8.simulcastIdx;
} else if (codec_info->codecType == kVideoCodecGeneric) {
simulcast_idx = codec_info->codecSpecific.generic.simulcast_idx;
}
+ if (codec_info->codec_name) {
+ stats_.encoder_implementation_name = codec_info->codec_name;
+ }
}
if (simulcast_idx >= config_.rtp.ssrcs.size()) {
@@ -456,7 +457,6 @@ void SendStatisticsProxy::OnSendEncodedImage(
}
uint32_t ssrc = config_.rtp.ssrcs[simulcast_idx];
- rtc::CritScope lock(&crit_);
VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc);
if (!stats)
return;
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698