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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
422 EXPECT_EQ(0, module2->StopCapture()); | 422 EXPECT_EQ(0, module2->StopCapture()); |
423 EXPECT_EQ(0, module1->StopCapture()); | 423 EXPECT_EQ(0, module1->StopCapture()); |
424 } | 424 } |
425 | 425 |
426 // Test class for testing external capture and capture feedback information | 426 // Test class for testing external capture and capture feedback information |
427 // such as frame rate and picture alarm. | 427 // such as frame rate and picture alarm. |
428 class VideoCaptureExternalTest : public testing::Test { | 428 class VideoCaptureExternalTest : public testing::Test { |
429 public: | 429 public: |
430 void SetUp() { | 430 void SetUp() { |
431 capture_module_ = VideoCaptureFactory::Create(0, capture_input_interface_); | 431 capture_module_ = VideoCaptureFactory::Create(0, capture_input_interface_); |
432 process_module_ = webrtc::ProcessThread::Create(); | 432 process_module_ = webrtc::ProcessThread::Create("ProcessThread"); |
tommi
2015/09/12 09:49:32
nit: use "VideoCaptureExternalTest"?
stefan-webrtc
2015/09/14 11:42:53
Do you mean renaming the process thread to VideoCa
| |
433 process_module_->Start(); | 433 process_module_->Start(); |
434 process_module_->RegisterModule(capture_module_); | 434 process_module_->RegisterModule(capture_module_); |
435 | 435 |
436 VideoCaptureCapability capability; | 436 VideoCaptureCapability capability; |
437 capability.width = kTestWidth; | 437 capability.width = kTestWidth; |
438 capability.height = kTestHeight; | 438 capability.height = kTestHeight; |
439 capability.rawType = webrtc::kVideoYV12; | 439 capability.rawType = webrtc::kVideoYV12; |
440 capability.maxFPS = kTestFramerate; | 440 capability.maxFPS = kTestFramerate; |
441 capture_callback_.SetExpectedCapability(capability); | 441 capture_callback_.SetExpectedCapability(capability); |
442 | 442 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
533 length, capture_callback_.capability(), 0)); | 533 length, capture_callback_.capability(), 0)); |
534 EXPECT_EQ(0, capture_module_->SetCaptureRotation(webrtc::kVideoRotation_180)); | 534 EXPECT_EQ(0, capture_module_->SetCaptureRotation(webrtc::kVideoRotation_180)); |
535 capture_callback_.SetExpectedCaptureRotation(webrtc::kVideoRotation_180); | 535 capture_callback_.SetExpectedCaptureRotation(webrtc::kVideoRotation_180); |
536 EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), | 536 EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), |
537 length, capture_callback_.capability(), 0)); | 537 length, capture_callback_.capability(), 0)); |
538 EXPECT_EQ(0, capture_module_->SetCaptureRotation(webrtc::kVideoRotation_270)); | 538 EXPECT_EQ(0, capture_module_->SetCaptureRotation(webrtc::kVideoRotation_270)); |
539 capture_callback_.SetExpectedCaptureRotation(webrtc::kVideoRotation_270); | 539 capture_callback_.SetExpectedCaptureRotation(webrtc::kVideoRotation_270); |
540 EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), | 540 EXPECT_EQ(0, capture_input_interface_->IncomingFrame(test_buffer.get(), |
541 length, capture_callback_.capability(), 0)); | 541 length, capture_callback_.capability(), 0)); |
542 } | 542 } |
OLD | NEW |