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

Side by Side Diff: webrtc/video/end_to_end_tests.cc

Issue 1406903002: Expose codec implementation names in stats. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after
2265 for (size_t i = 0; i < receive_streams_.size(); ++i) { 2265 for (size_t i = 0; i < receive_streams_.size(); ++i) {
2266 VideoReceiveStream::Stats stats = receive_streams_[i]->GetStats(); 2266 VideoReceiveStream::Stats stats = receive_streams_[i]->GetStats();
2267 EXPECT_EQ(expected_receive_ssrcs_[i], stats.ssrc); 2267 EXPECT_EQ(expected_receive_ssrcs_[i], stats.ssrc);
2268 2268
2269 // Make sure all fields have been populated. 2269 // Make sure all fields have been populated.
2270 // TODO(pbos): Use CompoundKey if/when we ever know that all stats are 2270 // TODO(pbos): Use CompoundKey if/when we ever know that all stats are
2271 // always filled for all receivers. 2271 // always filled for all receivers.
2272 receive_stats_filled_["IncomingRate"] |= 2272 receive_stats_filled_["IncomingRate"] |=
2273 stats.network_frame_rate != 0 || stats.total_bitrate_bps != 0; 2273 stats.network_frame_rate != 0 || stats.total_bitrate_bps != 0;
2274 2274
2275 send_stats_filled_["DecoderImplementationName"] |=
2276 stats.decoder_implementation_name ==
2277 test::FakeDecoder::kImplementationName;
2275 receive_stats_filled_["RenderDelayAsHighAsExpected"] |= 2278 receive_stats_filled_["RenderDelayAsHighAsExpected"] |=
2276 stats.render_delay_ms >= kExpectedRenderDelayMs; 2279 stats.render_delay_ms >= kExpectedRenderDelayMs;
2277 2280
2278 receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0; 2281 receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0;
2279 2282
2280 receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0; 2283 receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0;
2281 2284
2282 receive_stats_filled_["StatisticsUpdated"] |= 2285 receive_stats_filled_["StatisticsUpdated"] |=
2283 stats.rtcp_stats.cumulative_lost != 0 || 2286 stats.rtcp_stats.cumulative_lost != 0 ||
2284 stats.rtcp_stats.extended_max_sequence_number != 0 || 2287 stats.rtcp_stats.extended_max_sequence_number != 0 ||
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2320 bool CheckSendStats() { 2323 bool CheckSendStats() {
2321 RTC_DCHECK(send_stream_ != nullptr); 2324 RTC_DCHECK(send_stream_ != nullptr);
2322 VideoSendStream::Stats stats = send_stream_->GetStats(); 2325 VideoSendStream::Stats stats = send_stream_->GetStats();
2323 2326
2324 send_stats_filled_["NumStreams"] |= 2327 send_stats_filled_["NumStreams"] |=
2325 stats.substreams.size() == expected_send_ssrcs_.size(); 2328 stats.substreams.size() == expected_send_ssrcs_.size();
2326 2329
2327 send_stats_filled_["CpuOveruseMetrics"] |= 2330 send_stats_filled_["CpuOveruseMetrics"] |=
2328 stats.avg_encode_time_ms != 0 || stats.encode_usage_percent != 0; 2331 stats.avg_encode_time_ms != 0 || stats.encode_usage_percent != 0;
2329 2332
2333 send_stats_filled_["EncoderImplementationName"] |=
2334 stats.encoder_implementation_name ==
2335 test::FakeEncoder::kImplementationName;
2336
2330 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it = 2337 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it =
2331 stats.substreams.begin(); 2338 stats.substreams.begin();
2332 it != stats.substreams.end(); ++it) { 2339 it != stats.substreams.end(); ++it) {
2333 EXPECT_TRUE(expected_send_ssrcs_.find(it->first) != 2340 EXPECT_TRUE(expected_send_ssrcs_.find(it->first) !=
2334 expected_send_ssrcs_.end()); 2341 expected_send_ssrcs_.end());
2335 2342
2336 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |= 2343 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |=
2337 stats.input_frame_rate != 0; 2344 stats.input_frame_rate != 0;
2338 2345
2339 const VideoSendStream::StreamStats& stream_stats = it->second; 2346 const VideoSendStream::StreamStats& stream_stats = it->second;
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
3131 EXPECT_TRUE(default_receive_config.rtp.rtx.empty()) 3138 EXPECT_TRUE(default_receive_config.rtp.rtx.empty())
3132 << "Enabling RTX requires rtpmap: rtx negotiation."; 3139 << "Enabling RTX requires rtpmap: rtx negotiation.";
3133 EXPECT_TRUE(default_receive_config.rtp.extensions.empty()) 3140 EXPECT_TRUE(default_receive_config.rtp.extensions.empty())
3134 << "Enabling RTP extensions require negotiation."; 3141 << "Enabling RTP extensions require negotiation.";
3135 3142
3136 VerifyEmptyNackConfig(default_receive_config.rtp.nack); 3143 VerifyEmptyNackConfig(default_receive_config.rtp.nack);
3137 VerifyEmptyFecConfig(default_receive_config.rtp.fec); 3144 VerifyEmptyFecConfig(default_receive_config.rtp.fec);
3138 } 3145 }
3139 3146
3140 } // namespace webrtc 3147 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698