OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2008 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 |
11 #include <stdio.h> | 11 #include <stdio.h> |
12 | 12 |
13 #include <memory> | 13 #include <memory> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "webrtc/base/gunit.h" | |
17 #include "webrtc/base/logging.h" | |
18 #include "webrtc/base/thread.h" | |
19 #include "webrtc/media/base/fakevideocapturer.h" | 16 #include "webrtc/media/base/fakevideocapturer.h" |
20 #include "webrtc/media/base/fakevideorenderer.h" | 17 #include "webrtc/media/base/fakevideorenderer.h" |
21 #include "webrtc/media/base/testutils.h" | 18 #include "webrtc/media/base/testutils.h" |
22 #include "webrtc/media/base/videocapturer.h" | 19 #include "webrtc/media/base/videocapturer.h" |
| 20 #include "webrtc/rtc_base/gunit.h" |
| 21 #include "webrtc/rtc_base/logging.h" |
| 22 #include "webrtc/rtc_base/thread.h" |
23 | 23 |
24 using cricket::FakeVideoCapturer; | 24 using cricket::FakeVideoCapturer; |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 const int kMsCallbackWait = 500; | 28 const int kMsCallbackWait = 500; |
29 // For HD only the height matters. | 29 // For HD only the height matters. |
30 const int kMinHdHeight = 720; | 30 const int kMinHdHeight = 720; |
31 | 31 |
32 } // namespace | 32 } // namespace |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 capturer_->set_enable_camera_list(true); | 777 capturer_->set_enable_camera_list(true); |
778 capturer_->ConstrainSupportedFormats(vga_format); | 778 capturer_->ConstrainSupportedFormats(vga_format); |
779 EXPECT_EQ(2u, capturer_->GetSupportedFormats()->size()); | 779 EXPECT_EQ(2u, capturer_->GetSupportedFormats()->size()); |
780 // To make sure it's not just the camera list being broken, add in VGA and | 780 // To make sure it's not just the camera list being broken, add in VGA and |
781 // try again. This time, only the VGA format should be there. | 781 // try again. This time, only the VGA format should be there. |
782 supported_formats.push_back(vga_format); | 782 supported_formats.push_back(vga_format); |
783 capturer_->ResetSupportedFormats(supported_formats); | 783 capturer_->ResetSupportedFormats(supported_formats); |
784 ASSERT_EQ(1u, capturer_->GetSupportedFormats()->size()); | 784 ASSERT_EQ(1u, capturer_->GetSupportedFormats()->size()); |
785 EXPECT_EQ(vga_format.height, capturer_->GetSupportedFormats()->at(0).height); | 785 EXPECT_EQ(vga_format.height, capturer_->GetSupportedFormats()->at(0).height); |
786 } | 786 } |
OLD | NEW |