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

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

Issue 2368223002: Add VideoSendStream::Stats::prefered_media_bitrate_bps (Closed)
Patch Set: Use SimulcastRateAllocator Created 4 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 2729 matching lines...) Expand 10 before | Expand all | Expand 10 after
2740 send_stats_filled_["NumStreams"] |= 2740 send_stats_filled_["NumStreams"] |=
2741 stats.substreams.size() == expected_send_ssrcs_.size(); 2741 stats.substreams.size() == expected_send_ssrcs_.size();
2742 2742
2743 send_stats_filled_["CpuOveruseMetrics"] |= 2743 send_stats_filled_["CpuOveruseMetrics"] |=
2744 stats.avg_encode_time_ms != 0 && stats.encode_usage_percent != 0; 2744 stats.avg_encode_time_ms != 0 && stats.encode_usage_percent != 0;
2745 2745
2746 send_stats_filled_["EncoderImplementationName"] |= 2746 send_stats_filled_["EncoderImplementationName"] |=
2747 stats.encoder_implementation_name == 2747 stats.encoder_implementation_name ==
2748 test::FakeEncoder::kImplementationName; 2748 test::FakeEncoder::kImplementationName;
2749 2749
2750 send_stats_filled_["EncoderPreferredBitrate"] |=
2751 stats.preferred_media_bitrate_bps > 0;
2752
2750 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it = 2753 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it =
2751 stats.substreams.begin(); 2754 stats.substreams.begin();
2752 it != stats.substreams.end(); ++it) { 2755 it != stats.substreams.end(); ++it) {
2753 if (expected_send_ssrcs_.find(it->first) == expected_send_ssrcs_.end()) 2756 if (expected_send_ssrcs_.find(it->first) == expected_send_ssrcs_.end())
2754 continue; // Probably RTX. 2757 continue; // Probably RTX.
2755 2758
2756 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |= 2759 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |=
2757 stats.input_frame_rate != 0; 2760 stats.input_frame_rate != 0;
2758 2761
2759 const VideoSendStream::StreamStats& stream_stats = it->second; 2762 const VideoSendStream::StreamStats& stream_stats = it->second;
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
3744 private: 3747 private:
3745 bool video_observed_; 3748 bool video_observed_;
3746 bool audio_observed_; 3749 bool audio_observed_;
3747 SequenceNumberUnwrapper unwrapper_; 3750 SequenceNumberUnwrapper unwrapper_;
3748 std::set<int64_t> received_packet_ids_; 3751 std::set<int64_t> received_packet_ids_;
3749 } test; 3752 } test;
3750 3753
3751 RunBaseTest(&test); 3754 RunBaseTest(&test);
3752 } 3755 }
3753 } // namespace webrtc 3756 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698