OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2008 Google Inc. | 3 * Copyright 2008 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 10 matching lines...) Expand all Loading... |
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 */ | 26 */ |
27 | 27 |
28 #include <stdio.h> | 28 #include <stdio.h> |
29 #include <vector> | 29 #include <vector> |
30 | 30 |
31 #include "talk/media/base/fakevideocapturer.h" | |
32 #include "talk/media/base/fakevideorenderer.h" | |
33 #include "talk/media/base/testutils.h" | |
34 #include "talk/media/base/videocapturer.h" | |
35 #include "webrtc/base/gunit.h" | 31 #include "webrtc/base/gunit.h" |
36 #include "webrtc/base/logging.h" | 32 #include "webrtc/base/logging.h" |
37 #include "webrtc/base/thread.h" | 33 #include "webrtc/base/thread.h" |
| 34 #include "webrtc/media/base/fakevideocapturer.h" |
| 35 #include "webrtc/media/base/fakevideorenderer.h" |
| 36 #include "webrtc/media/base/testutils.h" |
| 37 #include "webrtc/media/base/videocapturer.h" |
38 | 38 |
39 using cricket::FakeVideoCapturer; | 39 using cricket::FakeVideoCapturer; |
40 | 40 |
41 namespace { | 41 namespace { |
42 | 42 |
43 const int kMsCallbackWait = 500; | 43 const int kMsCallbackWait = 500; |
44 // For HD only the height matters. | 44 // For HD only the height matters. |
45 const int kMinHdHeight = 720; | 45 const int kMinHdHeight = 720; |
46 const uint32_t kTimeout = 5000U; | 46 const uint32_t kTimeout = 5000U; |
47 | 47 |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 capturer_.set_enable_camera_list(true); | 808 capturer_.set_enable_camera_list(true); |
809 capturer_.ConstrainSupportedFormats(vga_format); | 809 capturer_.ConstrainSupportedFormats(vga_format); |
810 EXPECT_EQ(2u, capturer_.GetSupportedFormats()->size()); | 810 EXPECT_EQ(2u, capturer_.GetSupportedFormats()->size()); |
811 // To make sure it's not just the camera list being broken, add in VGA and | 811 // To make sure it's not just the camera list being broken, add in VGA and |
812 // try again. This time, only the VGA format should be there. | 812 // try again. This time, only the VGA format should be there. |
813 supported_formats.push_back(vga_format); | 813 supported_formats.push_back(vga_format); |
814 capturer_.ResetSupportedFormats(supported_formats); | 814 capturer_.ResetSupportedFormats(supported_formats); |
815 ASSERT_EQ(1u, capturer_.GetSupportedFormats()->size()); | 815 ASSERT_EQ(1u, capturer_.GetSupportedFormats()->size()); |
816 EXPECT_EQ(vga_format.height, capturer_.GetSupportedFormats()->at(0).height); | 816 EXPECT_EQ(vga_format.height, capturer_.GetSupportedFormats()->at(0).height); |
817 } | 817 } |
OLD | NEW |