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

Side by Side Diff: media/video/capture/win/video_capture_device_win.cc

Issue 24079003: Add VideoCaptureDevice::GetDeviceSupportedFormats to interface + implementation for Linux and Fake (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: perkj@'s nits Created 7 years, 2 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 | « media/video/capture/video_capture_types.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/win/video_capture_device_win.h" 5 #include "media/video/capture/win/video_capture_device_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // and DirectShow for any other platforms. 156 // and DirectShow for any other platforms.
157 if (base::win::IsMetroProcess() && 157 if (base::win::IsMetroProcess() &&
158 !cmd_line->HasSwitch(switches::kForceDirectShowVideoCapture)) { 158 !cmd_line->HasSwitch(switches::kForceDirectShowVideoCapture)) {
159 VideoCaptureDeviceMFWin::GetDeviceNames(device_names); 159 VideoCaptureDeviceMFWin::GetDeviceNames(device_names);
160 } else { 160 } else {
161 VideoCaptureDeviceWin::GetDeviceNames(device_names); 161 VideoCaptureDeviceWin::GetDeviceNames(device_names);
162 } 162 }
163 } 163 }
164 164
165 // static 165 // static
166 void VideoCaptureDevice::GetDeviceSupportedFormats(const Name& device,
167 VideoCaptureCapabilities* formats) {
168 NOTIMPLEMENTED();
169 }
170
171 // static
166 VideoCaptureDevice* VideoCaptureDevice::Create(const Name& device_name) { 172 VideoCaptureDevice* VideoCaptureDevice::Create(const Name& device_name) {
167 VideoCaptureDevice* ret = NULL; 173 VideoCaptureDevice* ret = NULL;
168 if (device_name.capture_api_type() == Name::MEDIA_FOUNDATION) { 174 if (device_name.capture_api_type() == Name::MEDIA_FOUNDATION) {
169 DCHECK(VideoCaptureDeviceMFWin::PlatformSupported()); 175 DCHECK(VideoCaptureDeviceMFWin::PlatformSupported());
170 scoped_ptr<VideoCaptureDeviceMFWin> device( 176 scoped_ptr<VideoCaptureDeviceMFWin> device(
171 new VideoCaptureDeviceMFWin(device_name)); 177 new VideoCaptureDeviceMFWin(device_name));
172 DVLOG(1) << " MediaFoundation Device: " << device_name.name(); 178 DVLOG(1) << " MediaFoundation Device: " << device_name.name();
173 if (device->Init()) 179 if (device->Init())
174 ret = device.release(); 180 ret = device.release();
175 } else if (device_name.capture_api_type() == Name::DIRECT_SHOW) { 181 } else if (device_name.capture_api_type() == Name::DIRECT_SHOW) {
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 return !capabilities_.empty(); 594 return !capabilities_.empty();
589 } 595 }
590 596
591 void VideoCaptureDeviceWin::SetErrorState(const char* reason) { 597 void VideoCaptureDeviceWin::SetErrorState(const char* reason) {
592 DCHECK(CalledOnValidThread()); 598 DCHECK(CalledOnValidThread());
593 DVLOG(1) << reason; 599 DVLOG(1) << reason;
594 state_ = kError; 600 state_ = kError;
595 client_->OnError(); 601 client_->OnError();
596 } 602 }
597 } // namespace media 603 } // namespace media
OLDNEW
« no previous file with comments | « media/video/capture/video_capture_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698