OLD | NEW |
---|---|
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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 | 183 |
184 if (receive_audio) { | 184 if (receive_audio) { |
185 AudioReceiveStream::Config receive_config; | 185 AudioReceiveStream::Config receive_config; |
186 receive_config.rtp.remote_ssrc = test_->video_send_config_.rtp.ssrcs[0]; | 186 receive_config.rtp.remote_ssrc = test_->video_send_config_.rtp.ssrcs[0]; |
187 // Bogus non-default id to prevent hitting a RTC_DCHECK when creating | 187 // Bogus non-default id to prevent hitting a RTC_DCHECK when creating |
188 // the AudioReceiveStream. Every receive stream has to correspond to | 188 // the AudioReceiveStream. Every receive stream has to correspond to |
189 // an underlying channel id. | 189 // an underlying channel id. |
190 receive_config.voe_channel_id = 0; | 190 receive_config.voe_channel_id = 0; |
191 receive_config.rtp.extensions.push_back( | 191 receive_config.rtp.extensions.push_back( |
192 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId)); | 192 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId)); |
193 receive_config.combined_audio_video_bwe = true; | |
194 audio_receive_stream_ = | 193 audio_receive_stream_ = |
195 test_->receiver_call_->CreateAudioReceiveStream(receive_config); | 194 test_->receiver_call_->CreateAudioReceiveStream(receive_config); |
196 } else { | 195 } else { |
197 VideoReceiveStream::Decoder decoder; | 196 VideoReceiveStream::Decoder decoder; |
198 decoder.decoder = &fake_decoder_; | 197 decoder.decoder = &fake_decoder_; |
199 decoder.payload_type = | 198 decoder.payload_type = |
200 test_->video_send_config_.encoder_settings.payload_type; | 199 test_->video_send_config_.encoder_settings.payload_type; |
201 decoder.payload_name = | 200 decoder.payload_name = |
202 test_->video_send_config_.encoder_settings.payload_name; | 201 test_->video_send_config_.encoder_settings.payload_name; |
203 test_->receive_config_.decoders.clear(); | 202 test_->receive_config_.decoders.clear(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
266 | 265 |
267 TEST_F(BitrateEstimatorTest, InstantiatesTOFPerDefaultForVideo) { | 266 TEST_F(BitrateEstimatorTest, InstantiatesTOFPerDefaultForVideo) { |
268 video_send_config_.rtp.extensions.push_back( | 267 video_send_config_.rtp.extensions.push_back( |
269 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId)); | 268 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId)); |
270 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 269 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
271 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 270 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
272 streams_.push_back(new Stream(this, false)); | 271 streams_.push_back(new Stream(this, false)); |
273 EXPECT_TRUE(receiver_log_.Wait()); | 272 EXPECT_TRUE(receiver_log_.Wait()); |
274 } | 273 } |
275 | 274 |
276 TEST_F(BitrateEstimatorTest, ImmediatelySwitchToASTForAudio) { | |
the sun
2016/01/26 10:26:55
Do you have more cleanup to do if AST is now depre
stefan-webrtc
2016/01/26 11:40:54
There is a lot of clean up that can be done, but o
| |
277 video_send_config_.rtp.extensions.push_back( | |
278 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId)); | |
279 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | |
280 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | |
281 receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE."); | |
282 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); | |
283 streams_.push_back(new Stream(this, true)); | |
284 EXPECT_TRUE(receiver_log_.Wait()); | |
285 } | |
286 | |
287 TEST_F(BitrateEstimatorTest, ImmediatelySwitchToASTForVideo) { | 275 TEST_F(BitrateEstimatorTest, ImmediatelySwitchToASTForVideo) { |
288 video_send_config_.rtp.extensions.push_back( | 276 video_send_config_.rtp.extensions.push_back( |
289 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId)); | 277 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId)); |
290 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 278 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
291 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 279 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
292 receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE."); | 280 receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE."); |
293 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); | 281 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); |
294 streams_.push_back(new Stream(this, false)); | 282 streams_.push_back(new Stream(this, false)); |
295 EXPECT_TRUE(receiver_log_.Wait()); | 283 EXPECT_TRUE(receiver_log_.Wait()); |
296 } | 284 } |
297 | 285 |
298 TEST_F(BitrateEstimatorTest, SwitchesToASTForAudio) { | |
299 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | |
300 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | |
301 streams_.push_back(new Stream(this, true)); | |
302 EXPECT_TRUE(receiver_log_.Wait()); | |
303 | |
304 video_send_config_.rtp.extensions.push_back( | |
305 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId)); | |
306 receiver_log_.PushExpectedLogLine("Switching to absolute send time RBE."); | |
307 receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); | |
308 streams_.push_back(new Stream(this, true)); | |
309 EXPECT_TRUE(receiver_log_.Wait()); | |
310 } | |
311 | |
312 TEST_F(BitrateEstimatorTest, SwitchesToASTForVideo) { | 286 TEST_F(BitrateEstimatorTest, SwitchesToASTForVideo) { |
313 video_send_config_.rtp.extensions.push_back( | 287 video_send_config_.rtp.extensions.push_back( |
314 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId)); | 288 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId)); |
315 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 289 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
316 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 290 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
317 streams_.push_back(new Stream(this, false)); | 291 streams_.push_back(new Stream(this, false)); |
318 EXPECT_TRUE(receiver_log_.Wait()); | 292 EXPECT_TRUE(receiver_log_.Wait()); |
319 | 293 |
320 video_send_config_.rtp.extensions[0] = | 294 video_send_config_.rtp.extensions[0] = |
321 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId); | 295 RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId); |
(...skipping 22 matching lines...) Expand all Loading... | |
344 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId); | 318 RtpExtension(RtpExtension::kTOffset, kTOFExtensionId); |
345 receiver_log_.PushExpectedLogLine( | 319 receiver_log_.PushExpectedLogLine( |
346 "WrappingBitrateEstimator: Switching to transmission time offset RBE."); | 320 "WrappingBitrateEstimator: Switching to transmission time offset RBE."); |
347 receiver_log_.PushExpectedLogLine(kSingleStreamLog); | 321 receiver_log_.PushExpectedLogLine(kSingleStreamLog); |
348 streams_.push_back(new Stream(this, false)); | 322 streams_.push_back(new Stream(this, false)); |
349 streams_[0]->StopSending(); | 323 streams_[0]->StopSending(); |
350 streams_[1]->StopSending(); | 324 streams_[1]->StopSending(); |
351 EXPECT_TRUE(receiver_log_.Wait()); | 325 EXPECT_TRUE(receiver_log_.Wait()); |
352 } | 326 } |
353 } // namespace webrtc | 327 } // namespace webrtc |
OLD | NEW |