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

Side by Side Diff: webrtc/call/bitrate_estimator_tests.cc

Issue 2351633002: Let ViEEncoder handle resolution changes. (Closed)
Patch Set: rebased 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
« no previous file with comments | « webrtc/api/videocapturertracksource_unittest.cc ('k') | webrtc/call/call_perf_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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 <functional> 10 #include <functional>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 receive_transport_.reset(new test::DirectTransport(receiver_call_.get())); 119 receive_transport_.reset(new test::DirectTransport(receiver_call_.get()));
120 receive_transport_->SetReceiver(sender_call_->Receiver()); 120 receive_transport_->SetReceiver(sender_call_->Receiver());
121 121
122 video_send_config_ = VideoSendStream::Config(send_transport_.get()); 122 video_send_config_ = VideoSendStream::Config(send_transport_.get());
123 video_send_config_.rtp.ssrcs.push_back(kVideoSendSsrcs[0]); 123 video_send_config_.rtp.ssrcs.push_back(kVideoSendSsrcs[0]);
124 // Encoders will be set separately per stream. 124 // Encoders will be set separately per stream.
125 video_send_config_.encoder_settings.encoder = nullptr; 125 video_send_config_.encoder_settings.encoder = nullptr;
126 video_send_config_.encoder_settings.payload_name = "FAKE"; 126 video_send_config_.encoder_settings.payload_name = "FAKE";
127 video_send_config_.encoder_settings.payload_type = 127 video_send_config_.encoder_settings.payload_type =
128 kFakeVideoSendPayloadType; 128 kFakeVideoSendPayloadType;
129 video_encoder_config_.streams = test::CreateVideoStreams(1); 129 test::FillEncoderConfiguration(1, &video_encoder_config_);
130 130
131 receive_config_ = VideoReceiveStream::Config(receive_transport_.get()); 131 receive_config_ = VideoReceiveStream::Config(receive_transport_.get());
132 // receive_config_.decoders will be set by every stream separately. 132 // receive_config_.decoders will be set by every stream separately.
133 receive_config_.rtp.remote_ssrc = video_send_config_.rtp.ssrcs[0]; 133 receive_config_.rtp.remote_ssrc = video_send_config_.rtp.ssrcs[0];
134 receive_config_.rtp.local_ssrc = kReceiverLocalVideoSsrc; 134 receive_config_.rtp.local_ssrc = kReceiverLocalVideoSsrc;
135 receive_config_.rtp.remb = true; 135 receive_config_.rtp.remb = true;
136 receive_config_.rtp.extensions.push_back( 136 receive_config_.rtp.extensions.push_back(
137 RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId)); 137 RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId));
138 receive_config_.rtp.extensions.push_back( 138 receive_config_.rtp.extensions.push_back(
139 RtpExtension(RtpExtension::kAbsSendTimeUri, kASTExtensionId)); 139 RtpExtension(RtpExtension::kAbsSendTimeUri, kASTExtensionId));
(...skipping 27 matching lines...) Expand all
167 audio_receive_stream_(nullptr), 167 audio_receive_stream_(nullptr),
168 video_receive_stream_(nullptr), 168 video_receive_stream_(nullptr),
169 frame_generator_capturer_(), 169 frame_generator_capturer_(),
170 fake_encoder_(Clock::GetRealTimeClock()), 170 fake_encoder_(Clock::GetRealTimeClock()),
171 fake_decoder_() { 171 fake_decoder_() {
172 test_->video_send_config_.rtp.ssrcs[0]++; 172 test_->video_send_config_.rtp.ssrcs[0]++;
173 test_->video_send_config_.encoder_settings.encoder = &fake_encoder_; 173 test_->video_send_config_.encoder_settings.encoder = &fake_encoder_;
174 send_stream_ = test_->sender_call_->CreateVideoSendStream( 174 send_stream_ = test_->sender_call_->CreateVideoSendStream(
175 test_->video_send_config_.Copy(), 175 test_->video_send_config_.Copy(),
176 test_->video_encoder_config_.Copy()); 176 test_->video_encoder_config_.Copy());
177 RTC_DCHECK_EQ(1u, test_->video_encoder_config_.streams.size()); 177 RTC_DCHECK_EQ(1u, test_->video_encoder_config_.number_of_streams);
178 frame_generator_capturer_.reset(test::FrameGeneratorCapturer::Create( 178 frame_generator_capturer_.reset(test::FrameGeneratorCapturer::Create(
179 test_->video_encoder_config_.streams[0].width, 179 kDefaultWidth, kDefaultHeight, kDefaultFramerate,
180 test_->video_encoder_config_.streams[0].height, 30,
181 Clock::GetRealTimeClock())); 180 Clock::GetRealTimeClock()));
182 send_stream_->SetSource(frame_generator_capturer_.get()); 181 send_stream_->SetSource(frame_generator_capturer_.get());
183 send_stream_->Start(); 182 send_stream_->Start();
184 frame_generator_capturer_->Start(); 183 frame_generator_capturer_->Start();
185 184
186 if (receive_audio) { 185 if (receive_audio) {
187 AudioReceiveStream::Config receive_config; 186 AudioReceiveStream::Config receive_config;
188 receive_config.rtp.remote_ssrc = test_->video_send_config_.rtp.ssrcs[0]; 187 receive_config.rtp.remote_ssrc = test_->video_send_config_.rtp.ssrcs[0];
189 // Bogus non-default id to prevent hitting a RTC_DCHECK when creating 188 // Bogus non-default id to prevent hitting a RTC_DCHECK when creating
190 // the AudioReceiveStream. Every receive stream has to correspond to 189 // the AudioReceiveStream. Every receive stream has to correspond to
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId); 323 RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId);
325 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); 324 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog);
326 receiver_log_.PushExpectedLogLine( 325 receiver_log_.PushExpectedLogLine(
327 "WrappingBitrateEstimator: Switching to transmission time offset RBE."); 326 "WrappingBitrateEstimator: Switching to transmission time offset RBE.");
328 streams_.push_back(new Stream(this, false)); 327 streams_.push_back(new Stream(this, false));
329 streams_[0]->StopSending(); 328 streams_[0]->StopSending();
330 streams_[1]->StopSending(); 329 streams_[1]->StopSending();
331 EXPECT_TRUE(receiver_log_.Wait()); 330 EXPECT_TRUE(receiver_log_.Wait());
332 } 331 }
333 } // namespace webrtc 332 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/videocapturertracksource_unittest.cc ('k') | webrtc/call/call_perf_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698