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

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

Issue 2351633002: Let ViEEncoder handle resolution changes. (Closed)
Patch Set: Fix build on Win Created 4 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
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 "webrtc/video/video_quality_test.h" 10 #include "webrtc/video/video_quality_test.h"
(...skipping 10 matching lines...) Expand all
21 #include "webrtc/base/checks.h" 21 #include "webrtc/base/checks.h"
22 #include "webrtc/base/event.h" 22 #include "webrtc/base/event.h"
23 #include "webrtc/base/format_macros.h" 23 #include "webrtc/base/format_macros.h"
24 #include "webrtc/base/optional.h" 24 #include "webrtc/base/optional.h"
25 #include "webrtc/base/timeutils.h" 25 #include "webrtc/base/timeutils.h"
26 #include "webrtc/call.h" 26 #include "webrtc/call.h"
27 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 27 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
28 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 28 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
29 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" 29 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
30 #include "webrtc/system_wrappers/include/cpu_info.h" 30 #include "webrtc/system_wrappers/include/cpu_info.h"
31 #include "webrtc/test/encoder_settings.h"
31 #include "webrtc/test/layer_filtering_transport.h" 32 #include "webrtc/test/layer_filtering_transport.h"
32 #include "webrtc/test/run_loop.h" 33 #include "webrtc/test/run_loop.h"
33 #include "webrtc/test/statistics.h" 34 #include "webrtc/test/statistics.h"
34 #include "webrtc/test/testsupport/fileutils.h" 35 #include "webrtc/test/testsupport/fileutils.h"
35 #include "webrtc/test/vcm_capturer.h" 36 #include "webrtc/test/vcm_capturer.h"
36 #include "webrtc/test/video_renderer.h" 37 #include "webrtc/test/video_renderer.h"
37 #include "webrtc/voice_engine/include/voe_base.h" 38 #include "webrtc/voice_engine/include/voe_base.h"
38 #include "webrtc/voice_engine/include/voe_codec.h" 39 #include "webrtc/voice_engine/include/voe_codec.h"
39 40
40 namespace { 41 namespace {
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 video_send_config_.rtp.extensions.push_back( 1006 video_send_config_.rtp.extensions.push_back(
1006 RtpExtension(RtpExtension::kTransportSequenceNumberUri, 1007 RtpExtension(RtpExtension::kTransportSequenceNumberUri,
1007 test::kTransportSequenceNumberExtensionId)); 1008 test::kTransportSequenceNumberExtensionId));
1008 } else { 1009 } else {
1009 video_send_config_.rtp.extensions.push_back(RtpExtension( 1010 video_send_config_.rtp.extensions.push_back(RtpExtension(
1010 RtpExtension::kAbsSendTimeUri, test::kAbsSendTimeExtensionId)); 1011 RtpExtension::kAbsSendTimeUri, test::kAbsSendTimeExtensionId));
1011 } 1012 }
1012 1013
1013 video_encoder_config_.min_transmit_bitrate_bps = 1014 video_encoder_config_.min_transmit_bitrate_bps =
1014 params_.common.min_transmit_bps; 1015 params_.common.min_transmit_bps;
1015 video_encoder_config_.streams = params_.ss.streams; 1016 test::FillEncoderConfiguration(params_.ss.streams.size(),
1017 &video_encoder_config_);
1016 video_encoder_config_.spatial_layers = params_.ss.spatial_layers; 1018 video_encoder_config_.spatial_layers = params_.ss.spatial_layers;
1017 1019
1018 CreateMatchingReceiveConfigs(recv_transport); 1020 CreateMatchingReceiveConfigs(recv_transport);
1019 1021
1020 for (size_t i = 0; i < num_streams; ++i) { 1022 for (size_t i = 0; i < num_streams; ++i) {
1021 video_receive_configs_[i].rtp.nack.rtp_history_ms = kNackRtpHistoryMs; 1023 video_receive_configs_[i].rtp.nack.rtp_history_ms = kNackRtpHistoryMs;
1022 video_receive_configs_[i].rtp.rtx[payload_type].ssrc = kSendRtxSsrcs[i]; 1024 video_receive_configs_[i].rtp.rtx[payload_type].ssrc = kSendRtxSsrcs[i];
1023 video_receive_configs_[i].rtp.rtx[payload_type].payload_type = 1025 video_receive_configs_[i].rtp.rtx[payload_type].payload_type =
1024 kSendRtxPayloadType; 1026 kSendRtxPayloadType;
1025 video_receive_configs_[i].rtp.transport_cc = params_.common.send_side_bwe; 1027 video_receive_configs_[i].rtp.transport_cc = params_.common.send_side_bwe;
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 audio_config.rtp.local_ssrc = kReceiverLocalAudioSsrc; 1306 audio_config.rtp.local_ssrc = kReceiverLocalAudioSsrc;
1305 audio_config.rtcp_send_transport = &transport; 1307 audio_config.rtcp_send_transport = &transport;
1306 audio_config.voe_channel_id = voe.receive_channel_id; 1308 audio_config.voe_channel_id = voe.receive_channel_id;
1307 audio_config.rtp.remote_ssrc = audio_send_config_.rtp.ssrc; 1309 audio_config.rtp.remote_ssrc = audio_send_config_.rtp.ssrc;
1308 audio_config.rtp.transport_cc = params_.common.send_side_bwe; 1310 audio_config.rtp.transport_cc = params_.common.send_side_bwe;
1309 audio_config.rtp.extensions = audio_send_config_.rtp.extensions; 1311 audio_config.rtp.extensions = audio_send_config_.rtp.extensions;
1310 audio_config.decoder_factory = decoder_factory_; 1312 audio_config.decoder_factory = decoder_factory_;
1311 if (params_.audio_video_sync) 1313 if (params_.audio_video_sync)
1312 audio_config.sync_group = kSyncGroup; 1314 audio_config.sync_group = kSyncGroup;
1313 1315
1314 audio_receive_stream =call->CreateAudioReceiveStream(audio_config); 1316 audio_receive_stream = call->CreateAudioReceiveStream(audio_config);
1315 1317
1316 const CodecInst kOpusInst = {120, "OPUS", 48000, 960, 2, 64000}; 1318 const CodecInst kOpusInst = {120, "OPUS", 48000, 960, 2, 64000};
1317 EXPECT_EQ(0, voe.codec->SetSendCodec(voe.send_channel_id, kOpusInst)); 1319 EXPECT_EQ(0, voe.codec->SetSendCodec(voe.send_channel_id, kOpusInst));
1318 } 1320 }
1319 1321
1320 // Start sending and receiving video. 1322 // Start sending and receiving video.
1321 video_receive_stream->Start(); 1323 video_receive_stream->Start();
1322 video_send_stream_->Start(); 1324 video_send_stream_->Start();
1323 capturer_->Start(); 1325 capturer_->Start();
1324 1326
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 call->DestroyAudioSendStream(audio_send_stream_); 1360 call->DestroyAudioSendStream(audio_send_stream_);
1359 call->DestroyAudioReceiveStream(audio_receive_stream); 1361 call->DestroyAudioReceiveStream(audio_receive_stream);
1360 } 1362 }
1361 1363
1362 transport.StopSending(); 1364 transport.StopSending();
1363 if (params_.audio) 1365 if (params_.audio)
1364 DestroyVoiceEngine(&voe); 1366 DestroyVoiceEngine(&voe);
1365 } 1367 }
1366 1368
1367 } // namespace webrtc 1369 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698