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

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

Issue 1507413003: clang/win: Let some chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_browsertests Created 5 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 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 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 "kBlacklistedCameraNames should be same size as " 56 "kBlacklistedCameraNames should be same size as "
57 "BlacklistedCameraNames enum"); 57 "BlacklistedCameraNames enum");
58 58
59 static bool LoadMediaFoundationDlls() { 59 static bool LoadMediaFoundationDlls() {
60 static const wchar_t* const kMfDLLs[] = { 60 static const wchar_t* const kMfDLLs[] = {
61 L"%WINDIR%\\system32\\mf.dll", 61 L"%WINDIR%\\system32\\mf.dll",
62 L"%WINDIR%\\system32\\mfplat.dll", 62 L"%WINDIR%\\system32\\mfplat.dll",
63 L"%WINDIR%\\system32\\mfreadwrite.dll", 63 L"%WINDIR%\\system32\\mfreadwrite.dll",
64 }; 64 };
65 65
66 for (int i = 0; i < arraysize(kMfDLLs); ++i) { 66 for (const wchar_t* kMfDLL : kMfDLLs) {
67 wchar_t path[MAX_PATH] = {0}; 67 wchar_t path[MAX_PATH] = {0};
68 ExpandEnvironmentStringsW(kMfDLLs[i], path, arraysize(path)); 68 ExpandEnvironmentStringsW(kMfDLL, path, arraysize(path));
69 if (!LoadLibraryExW(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH)) 69 if (!LoadLibraryExW(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH))
70 return false; 70 return false;
71 } 71 }
72 return true; 72 return true;
73 } 73 }
74 74
75 static bool PrepareVideoCaptureAttributesMediaFoundation( 75 static bool PrepareVideoCaptureAttributesMediaFoundation(
76 IMFAttributes** attributes, 76 IMFAttributes** attributes,
77 int count) { 77 int count) {
78 InitializeMediaFoundation(); 78 InitializeMediaFoundation();
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 } 427 }
428 428
429 // static 429 // static
430 VideoCaptureDeviceFactory* 430 VideoCaptureDeviceFactory*
431 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory( 431 VideoCaptureDeviceFactory::CreateVideoCaptureDeviceFactory(
432 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 432 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
433 return new VideoCaptureDeviceFactoryWin(); 433 return new VideoCaptureDeviceFactoryWin();
434 } 434 }
435 435
436 } // namespace media 436 } // namespace media
OLDNEW
« no previous file with comments | « media/base/user_input_monitor_win.cc ('k') | media/capture/video/win/video_capture_device_mf_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698