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

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

Issue 2304363002: Let ViEEncoder express resolution requests as Sinkwants (Closed)
Patch Set: Rebased and fixed. 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 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 for (auto& config : video_receive_configs_) 1203 for (auto& config : video_receive_configs_)
1204 config.pre_decode_callback = &analyzer; 1204 config.pre_decode_callback = &analyzer;
1205 RTC_DCHECK(!video_send_config_.post_encode_callback); 1205 RTC_DCHECK(!video_send_config_.post_encode_callback);
1206 video_send_config_.post_encode_callback = analyzer.encode_timing_proxy(); 1206 video_send_config_.post_encode_callback = analyzer.encode_timing_proxy();
1207 1207
1208 if (params_.screenshare.enabled) 1208 if (params_.screenshare.enabled)
1209 SetupScreenshare(); 1209 SetupScreenshare();
1210 1210
1211 CreateVideoStreams(); 1211 CreateVideoStreams();
1212 analyzer.SetSendStream(video_send_stream_); 1212 analyzer.SetSendStream(video_send_stream_);
1213 video_send_stream_->SetSource(analyzer.OutputInterface()); 1213 video_send_stream_->SetSource(analyzer.OutputInterface(), false);
1214 1214
1215 CreateCapturer(); 1215 CreateCapturer();
1216 rtc::VideoSinkWants wants; 1216 rtc::VideoSinkWants wants;
1217 capturer_->AddOrUpdateSink(analyzer.InputInterface(), wants); 1217 capturer_->AddOrUpdateSink(analyzer.InputInterface(), wants);
1218 1218
1219 StartEncodedFrameLogs(video_send_stream_); 1219 StartEncodedFrameLogs(video_send_stream_);
1220 StartEncodedFrameLogs(video_receive_streams_[0]); 1220 StartEncodedFrameLogs(video_receive_streams_[0]);
1221 video_send_stream_->Start(); 1221 video_send_stream_->Start();
1222 for (VideoReceiveStream* receive_stream : video_receive_streams_) 1222 for (VideoReceiveStream* receive_stream : video_receive_streams_)
1223 receive_stream->Start(); 1223 receive_stream->Start();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 } 1302 }
1303 1303
1304 if (params_.screenshare.enabled) 1304 if (params_.screenshare.enabled)
1305 SetupScreenshare(); 1305 SetupScreenshare();
1306 1306
1307 video_send_stream_ = call->CreateVideoSendStream( 1307 video_send_stream_ = call->CreateVideoSendStream(
1308 video_send_config_.Copy(), video_encoder_config_.Copy()); 1308 video_send_config_.Copy(), video_encoder_config_.Copy());
1309 VideoReceiveStream* video_receive_stream = 1309 VideoReceiveStream* video_receive_stream =
1310 call->CreateVideoReceiveStream(video_receive_configs_[stream_id].Copy()); 1310 call->CreateVideoReceiveStream(video_receive_configs_[stream_id].Copy());
1311 CreateCapturer(); 1311 CreateCapturer();
1312 video_send_stream_->SetSource(capturer_.get()); 1312 video_send_stream_->SetSource(capturer_.get(), false);
1313 1313
1314 AudioReceiveStream* audio_receive_stream = nullptr; 1314 AudioReceiveStream* audio_receive_stream = nullptr;
1315 if (params_.audio) { 1315 if (params_.audio) {
1316 audio_send_config_ = AudioSendStream::Config(&transport); 1316 audio_send_config_ = AudioSendStream::Config(&transport);
1317 audio_send_config_.voe_channel_id = voe.send_channel_id; 1317 audio_send_config_.voe_channel_id = voe.send_channel_id;
1318 audio_send_config_.rtp.ssrc = kAudioSendSsrc; 1318 audio_send_config_.rtp.ssrc = kAudioSendSsrc;
1319 1319
1320 // Add extension to enable audio send side BWE, and allow audio bit rate 1320 // Add extension to enable audio send side BWE, and allow audio bit rate
1321 // adaptation. 1321 // adaptation.
1322 audio_send_config_.rtp.extensions.clear(); 1322 audio_send_config_.rtp.extensions.clear();
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 std::ostringstream str; 1416 std::ostringstream str;
1417 str << receive_logs_++; 1417 str << receive_logs_++;
1418 std::string path = 1418 std::string path =
1419 params_.common.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; 1419 params_.common.encoded_frame_base_path + "." + str.str() + ".recv.ivf";
1420 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), 1420 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path),
1421 10000000); 1421 10000000);
1422 } 1422 }
1423 } 1423 }
1424 1424
1425 } // namespace webrtc 1425 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698