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

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

Issue 2368223002: Add VideoSendStream::Stats::prefered_media_bitrate_bps (Closed)
Patch Set: Addressed nits 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 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after
2741 send_stats_filled_["NumStreams"] |= 2741 send_stats_filled_["NumStreams"] |=
2742 stats.substreams.size() == expected_send_ssrcs_.size(); 2742 stats.substreams.size() == expected_send_ssrcs_.size();
2743 2743
2744 send_stats_filled_["CpuOveruseMetrics"] |= 2744 send_stats_filled_["CpuOveruseMetrics"] |=
2745 stats.avg_encode_time_ms != 0 && stats.encode_usage_percent != 0; 2745 stats.avg_encode_time_ms != 0 && stats.encode_usage_percent != 0;
2746 2746
2747 send_stats_filled_["EncoderImplementationName"] |= 2747 send_stats_filled_["EncoderImplementationName"] |=
2748 stats.encoder_implementation_name == 2748 stats.encoder_implementation_name ==
2749 test::FakeEncoder::kImplementationName; 2749 test::FakeEncoder::kImplementationName;
2750 2750
2751 send_stats_filled_["EncoderPreferredBitrate"] |=
2752 stats.preferred_media_bitrate_bps > 0;
2753
2751 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it = 2754 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it =
2752 stats.substreams.begin(); 2755 stats.substreams.begin();
2753 it != stats.substreams.end(); ++it) { 2756 it != stats.substreams.end(); ++it) {
2754 if (expected_send_ssrcs_.find(it->first) == expected_send_ssrcs_.end()) 2757 if (expected_send_ssrcs_.find(it->first) == expected_send_ssrcs_.end())
2755 continue; // Probably RTX. 2758 continue; // Probably RTX.
2756 2759
2757 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |= 2760 send_stats_filled_[CompoundKey("CapturedFrameRate", it->first)] |=
2758 stats.input_frame_rate != 0; 2761 stats.input_frame_rate != 0;
2759 2762
2760 const VideoSendStream::StreamStats& stream_stats = it->second; 2763 const VideoSendStream::StreamStats& stream_stats = it->second;
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
3846 std::unique_ptr<VideoEncoder> encoder_; 3849 std::unique_ptr<VideoEncoder> encoder_;
3847 std::unique_ptr<VideoDecoder> decoder_; 3850 std::unique_ptr<VideoDecoder> decoder_;
3848 rtc::CriticalSection crit_; 3851 rtc::CriticalSection crit_;
3849 int recorded_frames_ GUARDED_BY(crit_); 3852 int recorded_frames_ GUARDED_BY(crit_);
3850 } test(this); 3853 } test(this);
3851 3854
3852 RunBaseTest(&test); 3855 RunBaseTest(&test);
3853 } 3856 }
3854 3857
3855 } // namespace webrtc 3858 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/utility/simulcast_rate_allocator_unittest.cc ('k') | webrtc/video/send_statistics_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698