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

Side by Side Diff: webrtc/modules/video_coding/main/source/video_sender_unittest.cc

Issue 1171033002: Ensures that modules_unittests runs on iOS (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebased Created 5 years, 6 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) 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 10
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 return packetization_callback_.CalculateVp8StreamInfo(); 379 return packetization_callback_.CalculateVp8StreamInfo();
380 } 380 }
381 381
382 protected: 382 protected:
383 VideoCodec codec_; 383 VideoCodec codec_;
384 int codec_bitrate_kbps_; 384 int codec_bitrate_kbps_;
385 int available_bitrate_kbps_; 385 int available_bitrate_kbps_;
386 }; 386 };
387 387
388 TEST_F(TestVideoSenderWithVp8, 388 TEST_F(TestVideoSenderWithVp8,
389 DISABLED_ON_ANDROID(FixedTemporalLayersStrategy)) { 389 DISABLED_ON_IOS(DISABLED_ON_ANDROID(FixedTemporalLayersStrategy))) {
390 const int low_b = codec_bitrate_kbps_ * kVp8LayerRateAlloction[2][0]; 390 const int low_b = codec_bitrate_kbps_ * kVp8LayerRateAlloction[2][0];
391 const int mid_b = codec_bitrate_kbps_ * kVp8LayerRateAlloction[2][1]; 391 const int mid_b = codec_bitrate_kbps_ * kVp8LayerRateAlloction[2][1];
392 const int high_b = codec_bitrate_kbps_ * kVp8LayerRateAlloction[2][2]; 392 const int high_b = codec_bitrate_kbps_ * kVp8LayerRateAlloction[2][2];
393 { 393 {
394 Vp8StreamInfo expected = {{7.5, 15.0, 30.0}, {low_b, mid_b, high_b}}; 394 Vp8StreamInfo expected = {{7.5, 15.0, 30.0}, {low_b, mid_b, high_b}};
395 EXPECT_THAT(SimulateWithFramerate(30.0), MatchesVp8StreamInfo(expected)); 395 EXPECT_THAT(SimulateWithFramerate(30.0), MatchesVp8StreamInfo(expected));
396 } 396 }
397 { 397 {
398 Vp8StreamInfo expected = {{3.75, 7.5, 15.0}, {low_b, mid_b, high_b}}; 398 Vp8StreamInfo expected = {{3.75, 7.5, 15.0}, {low_b, mid_b, high_b}};
399 EXPECT_THAT(SimulateWithFramerate(15.0), MatchesVp8StreamInfo(expected)); 399 EXPECT_THAT(SimulateWithFramerate(15.0), MatchesVp8StreamInfo(expected));
400 } 400 }
401 } 401 }
402 402
403 TEST_F(TestVideoSenderWithVp8, 403 TEST_F(TestVideoSenderWithVp8,
404 DISABLED_ON_ANDROID(RealTimeTemporalLayersStrategy)) { 404 DISABLED_ON_IOS(DISABLED_ON_ANDROID(RealTimeTemporalLayersStrategy))) {
405 Config extra_options; 405 Config extra_options;
406 extra_options.Set<TemporalLayers::Factory>( 406 extra_options.Set<TemporalLayers::Factory>(
407 new RealTimeTemporalLayersFactory()); 407 new RealTimeTemporalLayersFactory());
408 VideoCodec codec = MakeVp8VideoCodec(352, 288, 3); 408 VideoCodec codec = MakeVp8VideoCodec(352, 288, 3);
409 codec.extra_options = &extra_options; 409 codec.extra_options = &extra_options;
410 codec.minBitrate = 10; 410 codec.minBitrate = 10;
411 codec.startBitrate = codec_bitrate_kbps_; 411 codec.startBitrate = codec_bitrate_kbps_;
412 codec.maxBitrate = codec_bitrate_kbps_; 412 codec.maxBitrate = codec_bitrate_kbps_;
413 EXPECT_EQ(0, sender_->RegisterSendCodec(&codec, 1, 1200)); 413 EXPECT_EQ(0, sender_->RegisterSendCodec(&codec, 1, 1200));
414 414
(...skipping 19 matching lines...) Expand all
434 } 434 }
435 { 435 {
436 // TODO(andresp): Find out why this fails with framerate = 7.5 436 // TODO(andresp): Find out why this fails with framerate = 7.5
437 Vp8StreamInfo expected = {{7.0, 7.0, 7.0}, {high_b, high_b, high_b}}; 437 Vp8StreamInfo expected = {{7.0, 7.0, 7.0}, {high_b, high_b, high_b}};
438 EXPECT_THAT(SimulateWithFramerate(7.0), MatchesVp8StreamInfo(expected)); 438 EXPECT_THAT(SimulateWithFramerate(7.0), MatchesVp8StreamInfo(expected));
439 } 439 }
440 } 440 }
441 } // namespace 441 } // namespace
442 } // namespace vcm 442 } // namespace vcm
443 } // namespace webrtc 443 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698