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

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

Issue 546803002: Win Video Capture: add support for WDM capture devices using a WDM Crossbar filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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/win/video_capture_device_factory_win.h" 5 #include "media/video/capture/win/video_capture_device_factory_win.h"
6 6
7 #include <mfapi.h> 7 #include <mfapi.h>
8 #include <mferror.h> 8 #include <mferror.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // CreateClassEnumerator returns S_FALSE on some Windows OS when no camera 205 // CreateClassEnumerator returns S_FALSE on some Windows OS when no camera
206 // exists. Therefore the FAILED macro can't be used. 206 // exists. Therefore the FAILED macro can't be used.
207 if (hr != S_OK) 207 if (hr != S_OK)
208 return; 208 return;
209 209
210 // Walk the capture devices. No need to check for device presence again since 210 // Walk the capture devices. No need to check for device presence again since
211 // that is anyway needed in GetDeviceFilter(). "google camera adapter" and old 211 // that is anyway needed in GetDeviceFilter(). "google camera adapter" and old
212 // VFW devices are already skipped previously in GetDeviceNames() enumeration. 212 // VFW devices are already skipped previously in GetDeviceNames() enumeration.
213 base::win::ScopedComPtr<IBaseFilter> capture_filter; 213 base::win::ScopedComPtr<IBaseFilter> capture_filter;
214 hr = VideoCaptureDeviceWin::GetDeviceFilter(device.capabilities_id(), 214 hr = VideoCaptureDeviceWin::GetDeviceFilter(device.capabilities_id(),
215 CLSID_VideoInputDeviceCategory,
215 capture_filter.Receive()); 216 capture_filter.Receive());
216 if (!capture_filter) { 217 if (!capture_filter) {
217 DLOG(ERROR) << "Failed to create capture filter: " 218 DLOG(ERROR) << "Failed to create capture filter: "
218 << logging::SystemErrorCodeToString(hr); 219 << logging::SystemErrorCodeToString(hr);
219 return; 220 return;
220 } 221 }
221 222
222 base::win::ScopedComPtr<IPin> output_capture_pin( 223 base::win::ScopedComPtr<IPin> output_capture_pin(
223 VideoCaptureDeviceWin::GetPin(capture_filter, 224 VideoCaptureDeviceWin::GetPin(capture_filter,
224 PINDIR_OUTPUT, 225 PINDIR_OUTPUT,
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 const Name& device, 429 const Name& device,
429 VideoCaptureFormats* formats) { 430 VideoCaptureFormats* formats) {
430 DCHECK(thread_checker_.CalledOnValidThread()); 431 DCHECK(thread_checker_.CalledOnValidThread());
431 if (use_media_foundation_) 432 if (use_media_foundation_)
432 GetDeviceSupportedFormatsMediaFoundation(device, formats); 433 GetDeviceSupportedFormatsMediaFoundation(device, formats);
433 else 434 else
434 GetDeviceSupportedFormatsDirectShow(device, formats); 435 GetDeviceSupportedFormatsDirectShow(device, formats);
435 } 436 }
436 437
437 } // namespace media 438 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/video/capture/win/video_capture_device_win.h » ('j') | media/video/capture/win/video_capture_device_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698