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

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

Issue 2035383002: Implementing auto pausing of video streams. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed comment. Created 4 years, 6 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
« no previous file with comments | « webrtc/video/video_send_stream.cc ('k') | webrtc/video/vie_encoder.h » ('j') | 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> // max 10 #include <algorithm> // max
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 std::vector<VideoReceiveStream::Config>* receive_configs, 898 std::vector<VideoReceiveStream::Config>* receive_configs,
899 VideoEncoderConfig* encoder_config) override { 899 VideoEncoderConfig* encoder_config) override {
900 transport_adapter_.reset( 900 transport_adapter_.reset(
901 new internal::TransportAdapter(send_config->send_transport)); 901 new internal::TransportAdapter(send_config->send_transport));
902 transport_adapter_->Enable(); 902 transport_adapter_->Enable();
903 send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs; 903 send_config->rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
904 send_config->pre_encode_callback = this; 904 send_config->pre_encode_callback = this;
905 send_config->suspend_below_min_bitrate = true; 905 send_config->suspend_below_min_bitrate = true;
906 int min_bitrate_bps = encoder_config->streams[0].min_bitrate_bps; 906 int min_bitrate_bps = encoder_config->streams[0].min_bitrate_bps;
907 set_low_remb_bps(min_bitrate_bps - 10000); 907 set_low_remb_bps(min_bitrate_bps - 10000);
908 int threshold_window = std::max(min_bitrate_bps / 10, 10000); 908 int threshold_window = std::max(min_bitrate_bps / 10, 20000);
909 ASSERT_GT(encoder_config->streams[0].max_bitrate_bps, 909 ASSERT_GT(encoder_config->streams[0].max_bitrate_bps,
910 min_bitrate_bps + threshold_window + 5000); 910 min_bitrate_bps + threshold_window + 5000);
911 set_high_remb_bps(min_bitrate_bps + threshold_window + 5000); 911 set_high_remb_bps(min_bitrate_bps + threshold_window + 5000);
912 } 912 }
913 913
914 void PerformTest() override { 914 void PerformTest() override {
915 EXPECT_TRUE(Wait()) << "Timed out during suspend-below-min-bitrate test."; 915 EXPECT_TRUE(Wait()) << "Timed out during suspend-below-min-bitrate test.";
916 } 916 }
917 917
918 enum TestState { 918 enum TestState {
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after
2296 observation_complete_.Set(); 2296 observation_complete_.Set();
2297 } 2297 }
2298 } 2298 }
2299 } test; 2299 } test;
2300 2300
2301 RunBaseTest(&test); 2301 RunBaseTest(&test);
2302 } 2302 }
2303 #endif // !defined(RTC_DISABLE_VP9) 2303 #endif // !defined(RTC_DISABLE_VP9)
2304 2304
2305 } // namespace webrtc 2305 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream.cc ('k') | webrtc/video/vie_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698