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

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: report what we fell back from 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 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 for (size_t i = 0; i < receive_streams_.size(); ++i) { 2332 for (size_t i = 0; i < receive_streams_.size(); ++i) {
2333 VideoReceiveStream::Stats stats = receive_streams_[i]->GetStats(); 2333 VideoReceiveStream::Stats stats = receive_streams_[i]->GetStats();
2334 EXPECT_EQ(expected_receive_ssrcs_[i], stats.ssrc); 2334 EXPECT_EQ(expected_receive_ssrcs_[i], stats.ssrc);
2335 2335
2336 // Make sure all fields have been populated. 2336 // Make sure all fields have been populated.
2337 // TODO(pbos): Use CompoundKey if/when we ever know that all stats are 2337 // TODO(pbos): Use CompoundKey if/when we ever know that all stats are
2338 // always filled for all receivers. 2338 // always filled for all receivers.
2339 receive_stats_filled_["IncomingRate"] |= 2339 receive_stats_filled_["IncomingRate"] |=
2340 stats.network_frame_rate != 0 || stats.total_bitrate_bps != 0; 2340 stats.network_frame_rate != 0 || stats.total_bitrate_bps != 0;
2341 2341
2342 send_stats_filled_["DecoderImplementationName"] |=
2343 stats.decoder_implementation_name ==
2344 test::FakeDecoder::kImplementationName;
2342 receive_stats_filled_["RenderDelayAsHighAsExpected"] |= 2345 receive_stats_filled_["RenderDelayAsHighAsExpected"] |=
2343 stats.render_delay_ms >= kExpectedRenderDelayMs; 2346 stats.render_delay_ms >= kExpectedRenderDelayMs;
2344 2347
2345 receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0; 2348 receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0;
2346 2349
2347 receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0; 2350 receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0;
2348 2351
2349 receive_stats_filled_["StatisticsUpdated"] |= 2352 receive_stats_filled_["StatisticsUpdated"] |=
2350 stats.rtcp_stats.cumulative_lost != 0 || 2353 stats.rtcp_stats.cumulative_lost != 0 ||
2351 stats.rtcp_stats.extended_max_sequence_number != 0 || 2354 stats.rtcp_stats.extended_max_sequence_number != 0 ||
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2387 bool CheckSendStats() { 2390 bool CheckSendStats() {
2388 RTC_DCHECK(send_stream_ != nullptr); 2391 RTC_DCHECK(send_stream_ != nullptr);
2389 VideoSendStream::Stats stats = send_stream_->GetStats(); 2392 VideoSendStream::Stats stats = send_stream_->GetStats();
2390 2393
2391 send_stats_filled_["NumStreams"] |= 2394 send_stats_filled_["NumStreams"] |=
2392 stats.substreams.size() == expected_send_ssrcs_.size(); 2395 stats.substreams.size() == expected_send_ssrcs_.size();
2393 2396
2394 send_stats_filled_["CpuOveruseMetrics"] |= 2397 send_stats_filled_["CpuOveruseMetrics"] |=
2395 stats.avg_encode_time_ms != 0 || stats.encode_usage_percent != 0; 2398 stats.avg_encode_time_ms != 0 || stats.encode_usage_percent != 0;
2396 2399
2400 send_stats_filled_["EncoderImplementationName"] |=
2401 stats.encoder_implementation_name ==
2402 test::FakeEncoder::kImplementationName;
2403
2397 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it = 2404 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it =
2398 stats.substreams.begin(); 2405 stats.substreams.begin();
2399 it != stats.substreams.end(); ++it) { 2406 it != stats.substreams.end(); ++it) {
2400 EXPECT_TRUE(expected_send_ssrcs_.find(it->first) != 2407 EXPECT_TRUE(expected_send_ssrcs_.find(it->first) !=
2401 expected_send_ssrcs_.end()); 2408 expected_send_ssrcs_.end());
2402 2409
2403 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |= 2410 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |=
2404 stats.input_frame_rate != 0; 2411 stats.input_frame_rate != 0;
2405 2412
2406 const VideoSendStream::StreamStats& stream_stats = it->second; 2413 const VideoSendStream::StreamStats& stream_stats = it->second;
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
3198 EXPECT_TRUE(default_receive_config.rtp.rtx.empty()) 3205 EXPECT_TRUE(default_receive_config.rtp.rtx.empty())
3199 << "Enabling RTX requires rtpmap: rtx negotiation."; 3206 << "Enabling RTX requires rtpmap: rtx negotiation.";
3200 EXPECT_TRUE(default_receive_config.rtp.extensions.empty()) 3207 EXPECT_TRUE(default_receive_config.rtp.extensions.empty())
3201 << "Enabling RTP extensions require negotiation."; 3208 << "Enabling RTP extensions require negotiation.";
3202 3209
3203 VerifyEmptyNackConfig(default_receive_config.rtp.nack); 3210 VerifyEmptyNackConfig(default_receive_config.rtp.nack);
3204 VerifyEmptyFecConfig(default_receive_config.rtp.fec); 3211 VerifyEmptyFecConfig(default_receive_config.rtp.fec);
3205 } 3212 }
3206 3213
3207 } // namespace webrtc 3214 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698