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

Side by Side Diff: media/video/capture/fake_video_capture_device_factory.cc

Issue 770713005: FakeVideoCaptureDevice: add 1080p resolution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sorted out content_browsertests Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/video/capture/fake_video_capture_device_factory.h" 5 #include "media/video/capture/fake_video_capture_device_factory.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "media/video/capture/fake_video_capture_device.h" 8 #include "media/video/capture/fake_video_capture_device.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 } 42 }
43 43
44 void FakeVideoCaptureDeviceFactory::GetDeviceSupportedFormats( 44 void FakeVideoCaptureDeviceFactory::GetDeviceSupportedFormats(
45 const VideoCaptureDevice::Name& device, 45 const VideoCaptureDevice::Name& device,
46 VideoCaptureFormats* supported_formats) { 46 VideoCaptureFormats* supported_formats) {
47 DCHECK(thread_checker_.CalledOnValidThread()); 47 DCHECK(thread_checker_.CalledOnValidThread());
48 const int frame_rate = 1000 / FakeVideoCaptureDevice::kFakeCaptureTimeoutMs; 48 const int frame_rate = 1000 / FakeVideoCaptureDevice::kFakeCaptureTimeoutMs;
49 const gfx::Size supported_sizes[] = {gfx::Size(320, 240), 49 const gfx::Size supported_sizes[] = {gfx::Size(320, 240),
50 gfx::Size(640, 480), 50 gfx::Size(640, 480),
51 gfx::Size(1280, 720)}; 51 gfx::Size(1280, 720),
52 gfx::Size(1920, 1080)};
52 supported_formats->clear(); 53 supported_formats->clear();
53 for (size_t i = 0; i < arraysize(supported_sizes); ++i) { 54 for (size_t i = 0; i < arraysize(supported_sizes); ++i) {
54 supported_formats->push_back(VideoCaptureFormat(supported_sizes[i], 55 supported_formats->push_back(VideoCaptureFormat(supported_sizes[i],
55 frame_rate, 56 frame_rate,
56 media::PIXEL_FORMAT_I420)); 57 media::PIXEL_FORMAT_I420));
57 } 58 }
58 } 59 }
59 60
60 } // namespace media 61 } // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/fake_video_capture_device.cc ('k') | media/video/capture/fake_video_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698