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

Side by Side Diff: webrtc/call/call_perf_tests.cc

Issue 2764133002: Revert of Add framerate to VideoSinkWants and ability to signal on overuse (Closed)
Patch Set: Created 3 years, 9 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/call/bitrate_estimator_tests.cc ('k') | webrtc/media/base/adaptedvideotracksource.cc » ('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 10
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 frame_generator_capturer->ChangeResolution(1920, 1080); 487 frame_generator_capturer->ChangeResolution(1920, 1080);
488 } 488 }
489 489
490 // OnSinkWantsChanged is called when FrameGeneratorCapturer::AddOrUpdateSink 490 // OnSinkWantsChanged is called when FrameGeneratorCapturer::AddOrUpdateSink
491 // is called. 491 // is called.
492 void OnSinkWantsChanged(rtc::VideoSinkInterface<VideoFrame>* sink, 492 void OnSinkWantsChanged(rtc::VideoSinkInterface<VideoFrame>* sink,
493 const rtc::VideoSinkWants& wants) override { 493 const rtc::VideoSinkWants& wants) override {
494 // First expect CPU overuse. Then expect CPU underuse when the encoder 494 // First expect CPU overuse. Then expect CPU underuse when the encoder
495 // delay has been decreased. 495 // delay has been decreased.
496 if (wants.target_pixel_count && 496 if (wants.target_pixel_count &&
497 *wants.target_pixel_count < wants.max_pixel_count) { 497 *wants.target_pixel_count <
498 wants.max_pixel_count.value_or(std::numeric_limits<int>::max())) {
498 // On adapting up, ViEEncoder::VideoSourceProxy will set the target 499 // On adapting up, ViEEncoder::VideoSourceProxy will set the target
499 // pixel count to a step up from the current and the max value to 500 // pixel count to a step up from the current and the max value to
500 // something higher than the target. 501 // something higher than the target.
501 EXPECT_FALSE(expect_lower_resolution_wants_); 502 EXPECT_FALSE(expect_lower_resolution_wants_);
502 observation_complete_.Set(); 503 observation_complete_.Set();
503 } else if (wants.max_pixel_count < std::numeric_limits<int>::max()) { 504 } else if (wants.max_pixel_count) {
504 // On adapting down, ViEEncoder::VideoSourceProxy will set only the max 505 // On adapting down, ViEEncoder::VideoSourceProxy will set only the max
505 // pixel count, leaving the target unset. 506 // pixel count, leaving the target unset.
506 EXPECT_TRUE(expect_lower_resolution_wants_); 507 EXPECT_TRUE(expect_lower_resolution_wants_);
507 expect_lower_resolution_wants_ = false; 508 expect_lower_resolution_wants_ = false;
508 encoder_.SetDelay(2); 509 encoder_.SetDelay(2);
509 } 510 }
510 } 511 }
511 512
512 void ModifyVideoConfigs( 513 void ModifyVideoConfigs(
513 VideoSendStream::Config* send_config, 514 VideoSendStream::Config* send_config,
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 uint32_t last_set_bitrate_kbps_; 738 uint32_t last_set_bitrate_kbps_;
738 VideoSendStream* send_stream_; 739 VideoSendStream* send_stream_;
739 test::FrameGeneratorCapturer* frame_generator_; 740 test::FrameGeneratorCapturer* frame_generator_;
740 VideoEncoderConfig encoder_config_; 741 VideoEncoderConfig encoder_config_;
741 } test; 742 } test;
742 743
743 RunBaseTest(&test); 744 RunBaseTest(&test);
744 } 745 }
745 746
746 } // namespace webrtc 747 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/bitrate_estimator_tests.cc ('k') | webrtc/media/base/adaptedvideotracksource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698