Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: webrtc/media/base/videocapturer_unittest.cc

Issue 1587193006: Move talk/media to webrtc/media (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased to b647aca12a884a13c1728118586245399b55fa3d (#11493) Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/base/videocapturer.cc ('k') | webrtc/media/base/videocapturerfactory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « webrtc/media/base/videocapturer.cc ('k') | webrtc/media/base/videocapturerfactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698