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

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

Issue 1394463002: Fixing perf regression caused by refactoring full stack tests (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 <stdio.h> 10 #include <stdio.h>
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 776
777 SetupFullStack(params, &analyzer, &recv_transport); 777 SetupFullStack(params, &analyzer, &recv_transport);
778 send_config_.encoding_time_observer = &analyzer; 778 send_config_.encoding_time_observer = &analyzer;
779 receive_configs_[0].renderer = &analyzer; 779 receive_configs_[0].renderer = &analyzer;
780 for (auto& config : receive_configs_) 780 for (auto& config : receive_configs_)
781 config.pre_decode_callback = &analyzer; 781 config.pre_decode_callback = &analyzer;
782 782
783 if (params.screenshare.enabled) 783 if (params.screenshare.enabled)
784 SetupScreenshare(params); 784 SetupScreenshare(params);
785 785
786 CreateCapturer(params, &analyzer);
787
788 CreateStreams(); 786 CreateStreams();
789 analyzer.input_ = send_stream_->Input(); 787 analyzer.input_ = send_stream_->Input();
790 analyzer.send_stream_ = send_stream_; 788 analyzer.send_stream_ = send_stream_;
791 789
790 CreateCapturer(params, &analyzer);
791
792 send_stream_->Start(); 792 send_stream_->Start();
793 for (size_t i = 0; i < receive_streams_.size(); ++i) 793 for (size_t i = 0; i < receive_streams_.size(); ++i)
794 receive_streams_[i]->Start(); 794 receive_streams_[i]->Start();
795 capturer_->Start(); 795 capturer_->Start();
796 796
797 analyzer.Wait(); 797 analyzer.Wait();
798 798
799 send_transport.StopSending(); 799 send_transport.StopSending();
800 recv_transport.StopSending(); 800 recv_transport.StopSending();
801 801
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 transport.SetReceiver(call->Receiver()); 835 transport.SetReceiver(call->Receiver());
836 836
837 SetupFullStack(params, &transport, &transport); 837 SetupFullStack(params, &transport, &transport);
838 send_config_.local_renderer = local_preview.get(); 838 send_config_.local_renderer = local_preview.get();
839 receive_configs_[0].renderer = loopback_video.get(); 839 receive_configs_[0].renderer = loopback_video.get();
840 840
841 if (params.screenshare.enabled) 841 if (params.screenshare.enabled)
842 SetupScreenshare(params); 842 SetupScreenshare(params);
843 843
844 send_stream_ = call->CreateVideoSendStream(send_config_, encoder_config_); 844 send_stream_ = call->CreateVideoSendStream(send_config_, encoder_config_);
845 CreateCapturer(params, send_stream_->Input());
846
847 VideoReceiveStream* receive_stream = 845 VideoReceiveStream* receive_stream =
848 call->CreateVideoReceiveStream(receive_configs_[0]); 846 call->CreateVideoReceiveStream(receive_configs_[0]);
847 CreateCapturer(params, send_stream_->Input());
849 848
850 receive_stream->Start(); 849 receive_stream->Start();
851 send_stream_->Start(); 850 send_stream_->Start();
852 capturer_->Start(); 851 capturer_->Start();
853 852
854 test::PressEnterToContinue(); 853 test::PressEnterToContinue();
855 854
856 capturer_->Stop(); 855 capturer_->Stop();
857 send_stream_->Stop(); 856 send_stream_->Stop();
858 receive_stream->Stop(); 857 receive_stream->Stop();
859 858
860 call->DestroyVideoReceiveStream(receive_stream); 859 call->DestroyVideoReceiveStream(receive_stream);
861 call->DestroyVideoSendStream(send_stream_); 860 call->DestroyVideoSendStream(send_stream_);
862 861
863 transport.StopSending(); 862 transport.StopSending();
864 } 863 }
865 864
866 } // namespace webrtc 865 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698