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

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

Issue 91343002: Added supported formats caching to VideoCaptureManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 (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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // and DirectShow for any other platforms. 158 // and DirectShow for any other platforms.
159 if (base::win::IsMetroProcess() && 159 if (base::win::IsMetroProcess() &&
160 !cmd_line->HasSwitch(switches::kForceDirectShowVideoCapture)) { 160 !cmd_line->HasSwitch(switches::kForceDirectShowVideoCapture)) {
161 VideoCaptureDeviceMFWin::GetDeviceNames(device_names); 161 VideoCaptureDeviceMFWin::GetDeviceNames(device_names);
162 } else { 162 } else {
163 VideoCaptureDeviceWin::GetDeviceNames(device_names); 163 VideoCaptureDeviceWin::GetDeviceNames(device_names);
164 } 164 }
165 } 165 }
166 166
167 // static 167 // static
168 void VideoCaptureDevice::GetDeviceSupportedFormats(const Name& device, 168 void VideoCaptureDevice::GetDeviceSupportedFormats(
169 VideoCaptureCapabilities* formats) { 169 const Name& device,
170 VideoCaptureFormats* formats) {
170 NOTIMPLEMENTED(); 171 NOTIMPLEMENTED();
171 } 172 }
172 173
173 // static 174 // static
174 VideoCaptureDevice* VideoCaptureDevice::Create(const Name& device_name) { 175 VideoCaptureDevice* VideoCaptureDevice::Create(const Name& device_name) {
175 VideoCaptureDevice* ret = NULL; 176 VideoCaptureDevice* ret = NULL;
176 if (device_name.capture_api_type() == Name::MEDIA_FOUNDATION) { 177 if (device_name.capture_api_type() == Name::MEDIA_FOUNDATION) {
177 DCHECK(VideoCaptureDeviceMFWin::PlatformSupported()); 178 DCHECK(VideoCaptureDeviceMFWin::PlatformSupported());
178 scoped_ptr<VideoCaptureDeviceMFWin> device( 179 scoped_ptr<VideoCaptureDeviceMFWin> device(
179 new VideoCaptureDeviceMFWin(device_name)); 180 new VideoCaptureDeviceMFWin(device_name));
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 return !capabilities_.empty(); 591 return !capabilities_.empty();
591 } 592 }
592 593
593 void VideoCaptureDeviceWin::SetErrorState(const char* reason) { 594 void VideoCaptureDeviceWin::SetErrorState(const char* reason) {
594 DCHECK(CalledOnValidThread()); 595 DCHECK(CalledOnValidThread());
595 DVLOG(1) << reason; 596 DVLOG(1) << reason;
596 state_ = kError; 597 state_ = kError;
597 client_->OnError(); 598 client_->OnError();
598 } 599 }
599 } // namespace media 600 } // namespace media
OLDNEW
« media/video/capture/fake_video_capture_device.h ('K') | « media/video/capture/video_capture_types.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698