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

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

Issue 2304363002: Let ViEEncoder express resolution requests as Sinkwants (Closed)
Patch Set: Revert changes to OveruseFrameDetector. Fix merge mistake Created 4 years, 1 month 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 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 for (auto& config : video_receive_configs_) 1216 for (auto& config : video_receive_configs_)
1217 config.pre_decode_callback = &analyzer; 1217 config.pre_decode_callback = &analyzer;
1218 RTC_DCHECK(!video_send_config_.post_encode_callback); 1218 RTC_DCHECK(!video_send_config_.post_encode_callback);
1219 video_send_config_.post_encode_callback = analyzer.encode_timing_proxy(); 1219 video_send_config_.post_encode_callback = analyzer.encode_timing_proxy();
1220 1220
1221 if (params_.screenshare.enabled) 1221 if (params_.screenshare.enabled)
1222 SetupScreenshare(); 1222 SetupScreenshare();
1223 1223
1224 CreateVideoStreams(); 1224 CreateVideoStreams();
1225 analyzer.SetSendStream(video_send_stream_); 1225 analyzer.SetSendStream(video_send_stream_);
1226 video_send_stream_->SetSource(analyzer.OutputInterface()); 1226 video_send_stream_->SetSource(
1227 analyzer.OutputInterface(),
1228 VideoSendStream::DegradationPreference::kBalanced);
1227 1229
1228 CreateCapturer(); 1230 CreateCapturer();
1229 rtc::VideoSinkWants wants; 1231 rtc::VideoSinkWants wants;
1230 capturer_->AddOrUpdateSink(analyzer.InputInterface(), wants); 1232 capturer_->AddOrUpdateSink(analyzer.InputInterface(), wants);
1231 1233
1232 StartEncodedFrameLogs(video_send_stream_); 1234 StartEncodedFrameLogs(video_send_stream_);
1233 StartEncodedFrameLogs(video_receive_streams_[0]); 1235 StartEncodedFrameLogs(video_receive_streams_[0]);
1234 video_send_stream_->Start(); 1236 video_send_stream_->Start();
1235 for (VideoReceiveStream* receive_stream : video_receive_streams_) 1237 for (VideoReceiveStream* receive_stream : video_receive_streams_)
1236 receive_stream->Start(); 1238 receive_stream->Start();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 } 1318 }
1317 1319
1318 if (params_.screenshare.enabled) 1320 if (params_.screenshare.enabled)
1319 SetupScreenshare(); 1321 SetupScreenshare();
1320 1322
1321 video_send_stream_ = call->CreateVideoSendStream( 1323 video_send_stream_ = call->CreateVideoSendStream(
1322 video_send_config_.Copy(), video_encoder_config_.Copy()); 1324 video_send_config_.Copy(), video_encoder_config_.Copy());
1323 VideoReceiveStream* video_receive_stream = 1325 VideoReceiveStream* video_receive_stream =
1324 call->CreateVideoReceiveStream(video_receive_configs_[stream_id].Copy()); 1326 call->CreateVideoReceiveStream(video_receive_configs_[stream_id].Copy());
1325 CreateCapturer(); 1327 CreateCapturer();
1326 video_send_stream_->SetSource(capturer_.get()); 1328 video_send_stream_->SetSource(
1329 capturer_.get(), VideoSendStream::DegradationPreference::kBalanced);
1327 1330
1328 AudioReceiveStream* audio_receive_stream = nullptr; 1331 AudioReceiveStream* audio_receive_stream = nullptr;
1329 if (params_.audio.enabled) { 1332 if (params_.audio.enabled) {
1330 audio_send_config_ = AudioSendStream::Config(&transport); 1333 audio_send_config_ = AudioSendStream::Config(&transport);
1331 audio_send_config_.voe_channel_id = voe.send_channel_id; 1334 audio_send_config_.voe_channel_id = voe.send_channel_id;
1332 audio_send_config_.rtp.ssrc = kAudioSendSsrc; 1335 audio_send_config_.rtp.ssrc = kAudioSendSsrc;
1333 1336
1334 // Add extension to enable audio send side BWE, and allow audio bit rate 1337 // Add extension to enable audio send side BWE, and allow audio bit rate
1335 // adaptation. 1338 // adaptation.
1336 audio_send_config_.rtp.extensions.clear(); 1339 audio_send_config_.rtp.extensions.clear();
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 std::ostringstream str; 1433 std::ostringstream str;
1431 str << receive_logs_++; 1434 str << receive_logs_++;
1432 std::string path = 1435 std::string path =
1433 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; 1436 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf";
1434 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), 1437 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path),
1435 10000000); 1438 10000000);
1436 } 1439 }
1437 } 1440 }
1438 1441
1439 } // namespace webrtc 1442 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698