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

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

Issue 1542653002: Add audio streams to CallTest and a first A/V call test. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comment addressed Created 4 years, 11 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/end_to_end_tests.cc ('k') | webrtc/video/video_send_stream_tests.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) 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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 params->ss.spatial_layers.push_back(layer); 774 params->ss.spatial_layers.push_back(layer);
775 } 775 }
776 } 776 }
777 777
778 void VideoQualityTest::SetupCommon(Transport* send_transport, 778 void VideoQualityTest::SetupCommon(Transport* send_transport,
779 Transport* recv_transport) { 779 Transport* recv_transport) {
780 if (params_.logs) 780 if (params_.logs)
781 trace_to_stderr_.reset(new test::TraceToStderr); 781 trace_to_stderr_.reset(new test::TraceToStderr);
782 782
783 size_t num_streams = params_.ss.streams.size(); 783 size_t num_streams = params_.ss.streams.size();
784 CreateSendConfig(num_streams, send_transport); 784 CreateSendConfig(num_streams, 0, send_transport);
785 785
786 int payload_type; 786 int payload_type;
787 if (params_.common.codec == "VP8") { 787 if (params_.common.codec == "VP8") {
788 encoder_.reset(VideoEncoder::Create(VideoEncoder::kVp8)); 788 encoder_.reset(VideoEncoder::Create(VideoEncoder::kVp8));
789 payload_type = kPayloadTypeVP8; 789 payload_type = kPayloadTypeVP8;
790 } else if (params_.common.codec == "VP9") { 790 } else if (params_.common.codec == "VP9") {
791 encoder_.reset(VideoEncoder::Create(VideoEncoder::kVp9)); 791 encoder_.reset(VideoEncoder::Create(VideoEncoder::kVp9));
792 payload_type = kPayloadTypeVP9; 792 payload_type = kPayloadTypeVP9;
793 } else { 793 } else {
794 RTC_NOTREACHED() << "Codec not supported!"; 794 RTC_NOTREACHED() << "Codec not supported!";
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 "Warning: Calculating PSNR and SSIM for downsized resolution " 957 "Warning: Calculating PSNR and SSIM for downsized resolution "
958 "not implemented yet! Skipping PSNR and SSIM calculations!"); 958 "not implemented yet! Skipping PSNR and SSIM calculations!");
959 } 959 }
960 960
961 VideoAnalyzer analyzer( 961 VideoAnalyzer analyzer(
962 &send_transport, params_.analyzer.test_label, 962 &send_transport, params_.analyzer.test_label,
963 disable_quality_check ? -1.1 : params_.analyzer.avg_psnr_threshold, 963 disable_quality_check ? -1.1 : params_.analyzer.avg_psnr_threshold,
964 disable_quality_check ? -1.1 : params_.analyzer.avg_ssim_threshold, 964 disable_quality_check ? -1.1 : params_.analyzer.avg_ssim_threshold,
965 params_.analyzer.test_durations_secs * params_.common.fps, 965 params_.analyzer.test_durations_secs * params_.common.fps,
966 graph_data_output_file, graph_title, 966 graph_data_output_file, graph_title,
967 kSendSsrcs[params_.ss.selected_stream]); 967 kVideoSendSsrcs[params_.ss.selected_stream]);
968 968
969 analyzer.SetReceiver(receiver_call_->Receiver()); 969 analyzer.SetReceiver(receiver_call_->Receiver());
970 send_transport.SetReceiver(&analyzer); 970 send_transport.SetReceiver(&analyzer);
971 recv_transport.SetReceiver(sender_call_->Receiver()); 971 recv_transport.SetReceiver(sender_call_->Receiver());
972 972
973 SetupCommon(&analyzer, &recv_transport); 973 SetupCommon(&analyzer, &recv_transport);
974 video_send_config_.encoding_time_observer = &analyzer; 974 video_send_config_.encoding_time_observer = &analyzer;
975 video_receive_configs_[params_.ss.selected_stream].renderer = &analyzer; 975 video_receive_configs_[params_.ss.selected_stream].renderer = &analyzer;
976 for (auto& config : video_receive_configs_) 976 for (auto& config : video_receive_configs_)
977 config.pre_decode_callback = &analyzer; 977 config.pre_decode_callback = &analyzer;
978 978
979 if (params_.screenshare.enabled) 979 if (params_.screenshare.enabled)
980 SetupScreenshare(); 980 SetupScreenshare();
981 981
982 CreateStreams(); 982 CreateVideoStreams();
983 analyzer.input_ = video_send_stream_->Input(); 983 analyzer.input_ = video_send_stream_->Input();
984 analyzer.send_stream_ = video_send_stream_; 984 analyzer.send_stream_ = video_send_stream_;
985 985
986 CreateCapturer(&analyzer); 986 CreateCapturer(&analyzer);
987 987
988 video_send_stream_->Start(); 988 video_send_stream_->Start();
989 for (VideoReceiveStream* receive_stream : video_receive_streams_) 989 for (VideoReceiveStream* receive_stream : video_receive_streams_)
990 receive_stream->Start(); 990 receive_stream->Start();
991 capturer_->Start(); 991 capturer_->Start();
992 992
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 video_send_stream_->Stop(); 1064 video_send_stream_->Stop();
1065 receive_stream->Stop(); 1065 receive_stream->Stop();
1066 1066
1067 call->DestroyVideoReceiveStream(receive_stream); 1067 call->DestroyVideoReceiveStream(receive_stream);
1068 call->DestroyVideoSendStream(video_send_stream_); 1068 call->DestroyVideoSendStream(video_send_stream_);
1069 1069
1070 transport.StopSending(); 1070 transport.StopSending();
1071 } 1071 }
1072 1072
1073 } // namespace webrtc 1073 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698