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

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

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 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
« no previous file with comments | « media/renderers/video_renderer_impl.cc ('k') | mojo/runner/shell_apptest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 if (!PrepareVideoCaptureAttributesMediaFoundation(attributes.Receive(), 1)) 96 if (!PrepareVideoCaptureAttributesMediaFoundation(attributes.Receive(), 1))
97 return false; 97 return false;
98 98
99 return SUCCEEDED(MFEnumDeviceSources(attributes.get(), devices, count)); 99 return SUCCEEDED(MFEnumDeviceSources(attributes.get(), devices, count));
100 } 100 }
101 101
102 static bool IsDeviceBlackListed(const std::string& name) { 102 static bool IsDeviceBlackListed(const std::string& name) {
103 DCHECK_EQ(BLACKLISTED_CAMERA_MAX + 1, 103 DCHECK_EQ(BLACKLISTED_CAMERA_MAX + 1,
104 static_cast<int>(arraysize(kBlacklistedCameraNames))); 104 static_cast<int>(arraysize(kBlacklistedCameraNames)));
105 for (size_t i = 0; i < arraysize(kBlacklistedCameraNames); ++i) { 105 for (size_t i = 0; i < arraysize(kBlacklistedCameraNames); ++i) {
106 if (StartsWithASCII(name, kBlacklistedCameraNames[i], false)) { 106 if (base::StartsWithASCII(name, kBlacklistedCameraNames[i], false)) {
107 DVLOG(1) << "Enumerated blacklisted device: " << name; 107 DVLOG(1) << "Enumerated blacklisted device: " << name;
108 UMA_HISTOGRAM_ENUMERATION("Media.VideoCapture.BlacklistedDevice", 108 UMA_HISTOGRAM_ENUMERATION("Media.VideoCapture.BlacklistedDevice",
109 i, BLACKLISTED_CAMERA_MAX + 1); 109 i, BLACKLISTED_CAMERA_MAX + 1);
110 return true; 110 return true;
111 } 111 }
112 } 112 }
113 return false; 113 return false;
114 } 114 }
115 115
116 static void GetDeviceNamesDirectShow(Names* device_names) { 116 static void GetDeviceNamesDirectShow(Names* device_names) {
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 } 419 }
420 420
421 // static 421 // static
422 VideoCaptureDeviceFactory* 422 VideoCaptureDeviceFactory*
423 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( 423 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory(
424 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 424 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
425 return new VideoCaptureDeviceFactoryWin(); 425 return new VideoCaptureDeviceFactoryWin();
426 } 426 }
427 427
428 } // namespace media 428 } // namespace media
OLDNEW
« no previous file with comments | « media/renderers/video_renderer_impl.cc ('k') | mojo/runner/shell_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698