| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 } | 465 } |
| 466 | 466 |
| 467 // Test frame rate and no picture alarm. | 467 // Test frame rate and no picture alarm. |
| 468 // Flaky on Win32, see webrtc:3270. | 468 // Flaky on Win32, see webrtc:3270. |
| 469 #if defined(WEBRTC_WIN) || defined(WEBRTC_MAC) | 469 #if defined(WEBRTC_WIN) || defined(WEBRTC_MAC) |
| 470 #define MAYBE_FrameRate DISABLED_FrameRate | 470 #define MAYBE_FrameRate DISABLED_FrameRate |
| 471 #else | 471 #else |
| 472 #define MAYBE_FrameRate FrameRate | 472 #define MAYBE_FrameRate FrameRate |
| 473 #endif | 473 #endif |
| 474 TEST_F(VideoCaptureExternalTest, MAYBE_FrameRate) { | 474 TEST_F(VideoCaptureExternalTest, MAYBE_FrameRate) { |
| 475 uint64_t testTime = 3 * rtc::kNumNanosecsPerSec; | 475 int64_t testTime = 3 * rtc::kNumNanosecsPerSec; |
| 476 uint64_t startTime = rtc::TimeNanos(); | 476 int64_t startTime = rtc::TimeNanos(); |
| 477 | 477 |
| 478 while ((rtc::TimeNanos() - startTime) < testTime) { | 478 while ((rtc::TimeNanos() - startTime) < testTime) { |
| 479 size_t length = webrtc::CalcBufferSize(webrtc::kI420, | 479 size_t length = webrtc::CalcBufferSize(webrtc::kI420, |
| 480 test_frame_->width(), | 480 test_frame_->width(), |
| 481 test_frame_->height()); | 481 test_frame_->height()); |
| 482 std::unique_ptr<uint8_t[]> test_buffer(new uint8_t[length]); | 482 std::unique_ptr<uint8_t[]> test_buffer(new uint8_t[length]); |
| 483 webrtc::ExtractBuffer(*test_frame_, length, test_buffer.get()); | 483 webrtc::ExtractBuffer(*test_frame_, length, test_buffer.get()); |
| 484 EXPECT_EQ( | 484 EXPECT_EQ( |
| 485 0, capture_input_interface_->IncomingFrame( | 485 0, capture_input_interface_->IncomingFrame( |
| 486 test_buffer.get(), length, capture_callback_.capability(), 0)); | 486 test_buffer.get(), length, capture_callback_.capability(), 0)); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 length, capture_callback_.capability(), 0)); | 524 length, capture_callback_.capability(), 0)); |
| 525 EXPECT_EQ(0, capture_module_->SetCaptureRotation(webrtc::kVideoRotation_180)); | 525 EXPECT_EQ(0, capture_module_->SetCaptureRotation(webrtc::kVideoRotation_180)); |
| 526 capture_callback_.SetExpectedCaptureRotation(webrtc::kVideoRotation_180); | 526 capture_callback_.SetExpectedCaptureRotation(webrtc::kVideoRotation_180); |
| 527 EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), | 527 EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), |
| 528 length, capture_callback_.capability(), 0)); | 528 length, capture_callback_.capability(), 0)); |
| 529 EXPECT_EQ(0, capture_module_->SetCaptureRotation(webrtc::kVideoRotation_270)); | 529 EXPECT_EQ(0, capture_module_->SetCaptureRotation(webrtc::kVideoRotation_270)); |
| 530 capture_callback_.SetExpectedCaptureRotation(webrtc::kVideoRotation_270); | 530 capture_callback_.SetExpectedCaptureRotation(webrtc::kVideoRotation_270); |
| 531 EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), | 531 EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), |
| 532 length, capture_callback_.capability(), 0)); | 532 length, capture_callback_.capability(), 0)); |
| 533 } | 533 } |
| OLD | NEW |