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

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

Issue 2083813003: Revert of Re-Reland: Make media/capture gn and gyps produce components (patchset #2 id:20001 of htt… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2774
Patch Set: Created 4 years, 6 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/capture/video/win/video_capture_device_factory_win.h" 5 #include "media/capture/video/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 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return SUCCEEDED(MFEnumDeviceSources(attributes.get(), devices, count)); 107 return SUCCEEDED(MFEnumDeviceSources(attributes.get(), devices, count));
108 } 108 }
109 109
110 static bool IsDeviceBlackListed(const std::string& name) { 110 static bool IsDeviceBlackListed(const std::string& name) {
111 DCHECK_EQ(BLACKLISTED_CAMERA_MAX + 1, 111 DCHECK_EQ(BLACKLISTED_CAMERA_MAX + 1,
112 static_cast<int>(arraysize(kBlacklistedCameraNames))); 112 static_cast<int>(arraysize(kBlacklistedCameraNames)));
113 for (size_t i = 0; i < arraysize(kBlacklistedCameraNames); ++i) { 113 for (size_t i = 0; i < arraysize(kBlacklistedCameraNames); ++i) {
114 if (base::StartsWith(name, kBlacklistedCameraNames[i], 114 if (base::StartsWith(name, kBlacklistedCameraNames[i],
115 base::CompareCase::INSENSITIVE_ASCII)) { 115 base::CompareCase::INSENSITIVE_ASCII)) {
116 DVLOG(1) << "Enumerated blacklisted device: " << name; 116 DVLOG(1) << "Enumerated blacklisted device: " << name;
117 UMA_HISTOGRAM_ENUMERATION("Media.VideoCapture.BlacklistedDevice", 117 UMA_HISTOGRAM_ENUMERATION("Media.VideoCapture.BlacklistedDevice", i,
118 static_cast<int32_t>(i),
119 BLACKLISTED_CAMERA_MAX + 1); 118 BLACKLISTED_CAMERA_MAX + 1);
120 return true; 119 return true;
121 } 120 }
122 } 121 }
123 return false; 122 return false;
124 } 123 }
125 124
126 static void GetDeviceNamesDirectShow(Names* device_names) { 125 static void GetDeviceNamesDirectShow(Names* device_names) {
127 DCHECK(device_names); 126 DCHECK(device_names);
128 DVLOG(1) << " GetDeviceNamesDirectShow"; 127 DVLOG(1) << " GetDeviceNamesDirectShow";
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } 420 }
422 421
423 // static 422 // static
424 VideoCaptureDeviceFactory* 423 VideoCaptureDeviceFactory*
425 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( 424 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory(
426 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 425 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
427 return new VideoCaptureDeviceFactoryWin(); 426 return new VideoCaptureDeviceFactoryWin();
428 } 427 }
429 428
430 } // namespace media 429 } // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/win/video_capture_device_factory_win.h ('k') | media/capture/video/win/video_capture_device_mf_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698