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

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

Issue 1325263002: Make LoadObserver settable per video send stream. Gives client flexibility and makes the implementa… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 3 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/call.cc ('k') | webrtc/video/video_send_stream.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> 10 #include <algorithm>
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 LoadObserver(LoadObserver::Load tested_load, int encode_delay_ms) 481 LoadObserver(LoadObserver::Load tested_load, int encode_delay_ms)
482 : SendTest(kLongTimeoutMs), 482 : SendTest(kLongTimeoutMs),
483 tested_load_(tested_load), 483 tested_load_(tested_load),
484 encoder_(Clock::GetRealTimeClock(), encode_delay_ms) {} 484 encoder_(Clock::GetRealTimeClock(), encode_delay_ms) {}
485 485
486 void OnLoadUpdate(Load load) override { 486 void OnLoadUpdate(Load load) override {
487 if (load == tested_load_) 487 if (load == tested_load_)
488 observation_complete_->Set(); 488 observation_complete_->Set();
489 } 489 }
490 490
491 Call::Config GetSenderCallConfig() override {
492 Call::Config config;
493 config.overuse_callback = this;
494 return config;
495 }
496
497 void ModifyConfigs(VideoSendStream::Config* send_config, 491 void ModifyConfigs(VideoSendStream::Config* send_config,
498 std::vector<VideoReceiveStream::Config>* receive_configs, 492 std::vector<VideoReceiveStream::Config>* receive_configs,
499 VideoEncoderConfig* encoder_config) override { 493 VideoEncoderConfig* encoder_config) override {
494 send_config->overuse_callback = this;
500 send_config->encoder_settings.encoder = &encoder_; 495 send_config->encoder_settings.encoder = &encoder_;
501 } 496 }
502 497
503 void PerformTest() override { 498 void PerformTest() override {
504 EXPECT_EQ(kEventSignaled, Wait()) 499 EXPECT_EQ(kEventSignaled, Wait())
505 << "Timed out before receiving an overuse callback."; 500 << "Timed out before receiving an overuse callback.";
506 } 501 }
507 502
508 LoadObserver::Load tested_load_; 503 LoadObserver::Load tested_load_;
509 test::DelayedEncoder encoder_; 504 test::DelayedEncoder encoder_;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 int encoder_inits_; 699 int encoder_inits_;
705 uint32_t last_set_bitrate_; 700 uint32_t last_set_bitrate_;
706 VideoSendStream* send_stream_; 701 VideoSendStream* send_stream_;
707 VideoEncoderConfig encoder_config_; 702 VideoEncoderConfig encoder_config_;
708 } test; 703 } test;
709 704
710 RunBaseTest(&test); 705 RunBaseTest(&test);
711 } 706 }
712 707
713 } // namespace webrtc 708 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/call.cc ('k') | webrtc/video/video_send_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698