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

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

Issue 2580343002: Now expect the correct number of streams in EndToEndTest.GetStats. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2744 matching lines...) Expand 10 before | Expand all | Expand 10 after
2755 stats.current_payload_type == kFakeVideoSendPayloadType; 2755 stats.current_payload_type == kFakeVideoSendPayloadType;
2756 } 2756 }
2757 2757
2758 return AllStatsFilled(receive_stats_filled_); 2758 return AllStatsFilled(receive_stats_filled_);
2759 } 2759 }
2760 2760
2761 bool CheckSendStats() { 2761 bool CheckSendStats() {
2762 RTC_DCHECK(send_stream_); 2762 RTC_DCHECK(send_stream_);
2763 VideoSendStream::Stats stats = send_stream_->GetStats(); 2763 VideoSendStream::Stats stats = send_stream_->GetStats();
2764 2764
2765 size_t expected_num_streams = kNumSsrcs + expected_send_ssrcs_.size();
2765 send_stats_filled_["NumStreams"] |= 2766 send_stats_filled_["NumStreams"] |=
2766 stats.substreams.size() == expected_send_ssrcs_.size(); 2767 stats.substreams.size() == expected_num_streams;
2767 2768
2768 send_stats_filled_["CpuOveruseMetrics"] |= 2769 send_stats_filled_["CpuOveruseMetrics"] |=
2769 stats.avg_encode_time_ms != 0 && stats.encode_usage_percent != 0; 2770 stats.avg_encode_time_ms != 0 && stats.encode_usage_percent != 0;
2770 2771
2771 send_stats_filled_["EncoderImplementationName"] |= 2772 send_stats_filled_["EncoderImplementationName"] |=
2772 stats.encoder_implementation_name == 2773 stats.encoder_implementation_name ==
2773 test::FakeEncoder::kImplementationName; 2774 test::FakeEncoder::kImplementationName;
2774 2775
2775 send_stats_filled_["EncoderPreferredBitrate"] |= 2776 send_stats_filled_["EncoderPreferredBitrate"] |=
2776 stats.preferred_media_bitrate_bps > 0; 2777 stats.preferred_media_bitrate_bps > 0;
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
4060 std::unique_ptr<VideoEncoder> encoder_; 4061 std::unique_ptr<VideoEncoder> encoder_;
4061 std::unique_ptr<VideoDecoder> decoder_; 4062 std::unique_ptr<VideoDecoder> decoder_;
4062 rtc::CriticalSection crit_; 4063 rtc::CriticalSection crit_;
4063 int recorded_frames_ GUARDED_BY(crit_); 4064 int recorded_frames_ GUARDED_BY(crit_);
4064 } test(this); 4065 } test(this);
4065 4066
4066 RunBaseTest(&test); 4067 RunBaseTest(&test);
4067 } 4068 }
4068 4069
4069 } // namespace webrtc 4070 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698