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

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: remove conflict marker Created 5 years 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 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after
2365 for (size_t i = 0; i < receive_streams_.size(); ++i) { 2365 for (size_t i = 0; i < receive_streams_.size(); ++i) {
2366 VideoReceiveStream::Stats stats = receive_streams_[i]->GetStats(); 2366 VideoReceiveStream::Stats stats = receive_streams_[i]->GetStats();
2367 EXPECT_EQ(expected_receive_ssrcs_[i], stats.ssrc); 2367 EXPECT_EQ(expected_receive_ssrcs_[i], stats.ssrc);
2368 2368
2369 // Make sure all fields have been populated. 2369 // Make sure all fields have been populated.
2370 // TODO(pbos): Use CompoundKey if/when we ever know that all stats are 2370 // TODO(pbos): Use CompoundKey if/when we ever know that all stats are
2371 // always filled for all receivers. 2371 // always filled for all receivers.
2372 receive_stats_filled_["IncomingRate"] |= 2372 receive_stats_filled_["IncomingRate"] |=
2373 stats.network_frame_rate != 0 || stats.total_bitrate_bps != 0; 2373 stats.network_frame_rate != 0 || stats.total_bitrate_bps != 0;
2374 2374
2375 send_stats_filled_["DecoderImplementationName"] |=
2376 stats.decoder_implementation_name ==
2377 test::FakeDecoder::kImplementationName;
2375 receive_stats_filled_["RenderDelayAsHighAsExpected"] |= 2378 receive_stats_filled_["RenderDelayAsHighAsExpected"] |=
2376 stats.render_delay_ms >= kExpectedRenderDelayMs; 2379 stats.render_delay_ms >= kExpectedRenderDelayMs;
2377 2380
2378 receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0; 2381 receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0;
2379 2382
2380 receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0; 2383 receive_stats_filled_["FrameRendered"] |= stats.render_frame_rate != 0;
2381 2384
2382 receive_stats_filled_["StatisticsUpdated"] |= 2385 receive_stats_filled_["StatisticsUpdated"] |=
2383 stats.rtcp_stats.cumulative_lost != 0 || 2386 stats.rtcp_stats.cumulative_lost != 0 ||
2384 stats.rtcp_stats.extended_max_sequence_number != 0 || 2387 stats.rtcp_stats.extended_max_sequence_number != 0 ||
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2420 bool CheckSendStats() { 2423 bool CheckSendStats() {
2421 RTC_DCHECK(send_stream_ != nullptr); 2424 RTC_DCHECK(send_stream_ != nullptr);
2422 VideoSendStream::Stats stats = send_stream_->GetStats(); 2425 VideoSendStream::Stats stats = send_stream_->GetStats();
2423 2426
2424 send_stats_filled_["NumStreams"] |= 2427 send_stats_filled_["NumStreams"] |=
2425 stats.substreams.size() == expected_send_ssrcs_.size(); 2428 stats.substreams.size() == expected_send_ssrcs_.size();
2426 2429
2427 send_stats_filled_["CpuOveruseMetrics"] |= 2430 send_stats_filled_["CpuOveruseMetrics"] |=
2428 stats.avg_encode_time_ms != 0 || stats.encode_usage_percent != 0; 2431 stats.avg_encode_time_ms != 0 || stats.encode_usage_percent != 0;
2429 2432
2433 send_stats_filled_["EncoderImplementationName"] |=
2434 stats.encoder_implementation_name ==
2435 test::FakeEncoder::kImplementationName;
2436
2430 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it = 2437 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it =
2431 stats.substreams.begin(); 2438 stats.substreams.begin();
2432 it != stats.substreams.end(); ++it) { 2439 it != stats.substreams.end(); ++it) {
2433 EXPECT_TRUE(expected_send_ssrcs_.find(it->first) != 2440 EXPECT_TRUE(expected_send_ssrcs_.find(it->first) !=
2434 expected_send_ssrcs_.end()); 2441 expected_send_ssrcs_.end());
2435 2442
2436 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |= 2443 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |=
2437 stats.input_frame_rate != 0; 2444 stats.input_frame_rate != 0;
2438 2445
2439 const VideoSendStream::StreamStats& stream_stats = it->second; 2446 const VideoSendStream::StreamStats& stream_stats = it->second;
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
3204 EXPECT_TRUE(default_receive_config.rtp.rtx.empty()) 3211 EXPECT_TRUE(default_receive_config.rtp.rtx.empty())
3205 << "Enabling RTX requires rtpmap: rtx negotiation."; 3212 << "Enabling RTX requires rtpmap: rtx negotiation.";
3206 EXPECT_TRUE(default_receive_config.rtp.extensions.empty()) 3213 EXPECT_TRUE(default_receive_config.rtp.extensions.empty())
3207 << "Enabling RTP extensions require negotiation."; 3214 << "Enabling RTP extensions require negotiation.";
3208 3215
3209 VerifyEmptyNackConfig(default_receive_config.rtp.nack); 3216 VerifyEmptyNackConfig(default_receive_config.rtp.nack);
3210 VerifyEmptyFecConfig(default_receive_config.rtp.fec); 3217 VerifyEmptyFecConfig(default_receive_config.rtp.fec);
3211 } 3218 }
3212 3219
3213 } // namespace webrtc 3220 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698