| 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/fakemediaprocessor.h" | |
| 32 #include "talk/media/base/fakevideocapturer.h" | 31 #include "talk/media/base/fakevideocapturer.h" |
| 33 #include "talk/media/base/fakevideorenderer.h" | 32 #include "talk/media/base/fakevideorenderer.h" |
| 34 #include "talk/media/base/testutils.h" | 33 #include "talk/media/base/testutils.h" |
| 35 #include "talk/media/base/videocapturer.h" | 34 #include "talk/media/base/videocapturer.h" |
| 36 #include "webrtc/base/gunit.h" | 35 #include "webrtc/base/gunit.h" |
| 37 #include "webrtc/base/logging.h" | 36 #include "webrtc/base/logging.h" |
| 38 #include "webrtc/base/thread.h" | 37 #include "webrtc/base/thread.h" |
| 39 | 38 |
| 40 using cricket::FakeVideoCapturer; | 39 using cricket::FakeVideoCapturer; |
| 41 | 40 |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 capturer_.set_enable_camera_list(true); | 843 capturer_.set_enable_camera_list(true); |
| 845 capturer_.ConstrainSupportedFormats(vga_format); | 844 capturer_.ConstrainSupportedFormats(vga_format); |
| 846 EXPECT_EQ(2u, capturer_.GetSupportedFormats()->size()); | 845 EXPECT_EQ(2u, capturer_.GetSupportedFormats()->size()); |
| 847 // To make sure it's not just the camera list being broken, add in VGA and | 846 // To make sure it's not just the camera list being broken, add in VGA and |
| 848 // try again. This time, only the VGA format should be there. | 847 // try again. This time, only the VGA format should be there. |
| 849 supported_formats.push_back(vga_format); | 848 supported_formats.push_back(vga_format); |
| 850 capturer_.ResetSupportedFormats(supported_formats); | 849 capturer_.ResetSupportedFormats(supported_formats); |
| 851 ASSERT_EQ(1u, capturer_.GetSupportedFormats()->size()); | 850 ASSERT_EQ(1u, capturer_.GetSupportedFormats()->size()); |
| 852 EXPECT_EQ(vga_format.height, capturer_.GetSupportedFormats()->at(0).height); | 851 EXPECT_EQ(vga_format.height, capturer_.GetSupportedFormats()->at(0).height); |
| 853 } | 852 } |
| OLD | NEW |