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

Unified Diff: media/capture/video/win/video_capture_device_factory_win.cc

Issue 2887243002: Remove ScopedComPtr::CreateInstance() (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/win/device_enumeration_win.cc ('k') | media/capture/video/win/video_capture_device_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/win/video_capture_device_factory_win.cc
diff --git a/media/capture/video/win/video_capture_device_factory_win.cc b/media/capture/video/win/video_capture_device_factory_win.cc
index 17587e1d29419a194904095005052e1b1ab8f6dc..9b0712701fcc97d79601995dd59ac00b868e3107 100644
--- a/media/capture/video/win/video_capture_device_factory_win.cc
+++ b/media/capture/video/win/video_capture_device_factory_win.cc
@@ -156,8 +156,8 @@ static void GetDeviceDescriptorsDirectShow(Descriptors* device_descriptors) {
DVLOG(1) << __func__;
ScopedComPtr<ICreateDevEnum> dev_enum;
- HRESULT hr =
- dev_enum.CreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC);
+ HRESULT hr = ::CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC,
+ IID_PPV_ARGS(&dev_enum));
if (FAILED(hr))
return;
@@ -247,8 +247,8 @@ static void GetDeviceSupportedFormatsDirectShow(const Descriptor& descriptor,
DVLOG(1) << "GetDeviceSupportedFormatsDirectShow for "
<< descriptor.display_name;
ScopedComPtr<ICreateDevEnum> dev_enum;
- HRESULT hr =
- dev_enum.CreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC);
+ HRESULT hr = ::CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC,
+ IID_PPV_ARGS(&dev_enum));
if (FAILED(hr))
return;
« no previous file with comments | « media/audio/win/device_enumeration_win.cc ('k') | media/capture/video/win/video_capture_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698