| 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 25 matching lines...) Expand all Loading... |
| 36 #include "webrtc/base/logging.h" | 36 #include "webrtc/base/logging.h" |
| 37 #include "webrtc/base/thread.h" | 37 #include "webrtc/base/thread.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 kTimeout = 5000U; | 46 const uint32_t kTimeout = 5000U; |
| 47 | 47 |
| 48 } // namespace | 48 } // namespace |
| 49 | 49 |
| 50 class VideoCapturerTest | 50 class VideoCapturerTest |
| 51 : public sigslot::has_slots<>, | 51 : public sigslot::has_slots<>, |
| 52 public testing::Test { | 52 public testing::Test { |
| 53 public: | 53 public: |
| 54 VideoCapturerTest() | 54 VideoCapturerTest() |
| 55 : capture_state_(cricket::CS_STOPPED), | 55 : capture_state_(cricket::CS_STOPPED), |
| 56 num_state_changes_(0), | 56 num_state_changes_(0), |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 capturer_.set_enable_camera_list(true); | 839 capturer_.set_enable_camera_list(true); |
| 840 capturer_.ConstrainSupportedFormats(vga_format); | 840 capturer_.ConstrainSupportedFormats(vga_format); |
| 841 EXPECT_EQ(2u, capturer_.GetSupportedFormats()->size()); | 841 EXPECT_EQ(2u, capturer_.GetSupportedFormats()->size()); |
| 842 // To make sure it's not just the camera list being broken, add in VGA and | 842 // To make sure it's not just the camera list being broken, add in VGA and |
| 843 // try again. This time, only the VGA format should be there. | 843 // try again. This time, only the VGA format should be there. |
| 844 supported_formats.push_back(vga_format); | 844 supported_formats.push_back(vga_format); |
| 845 capturer_.ResetSupportedFormats(supported_formats); | 845 capturer_.ResetSupportedFormats(supported_formats); |
| 846 ASSERT_EQ(1u, capturer_.GetSupportedFormats()->size()); | 846 ASSERT_EQ(1u, capturer_.GetSupportedFormats()->size()); |
| 847 EXPECT_EQ(vga_format.height, capturer_.GetSupportedFormats()->at(0).height); | 847 EXPECT_EQ(vga_format.height, capturer_.GetSupportedFormats()->at(0).height); |
| 848 } | 848 } |
| OLD | NEW |