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

Unified Diff: media/gpu/media_foundation_video_encode_accelerator_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/capture/video/win/video_capture_device_win.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/media_foundation_video_encode_accelerator_win.cc
diff --git a/media/gpu/media_foundation_video_encode_accelerator_win.cc b/media/gpu/media_foundation_video_encode_accelerator_win.cc
index fea0fb9d4ce283a23bc315074495ad942715fc0a..06e326bd4a82b1907d279d259d0558783db24ee7 100644
--- a/media/gpu/media_foundation_video_encode_accelerator_win.cc
+++ b/media/gpu/media_foundation_video_encode_accelerator_win.cc
@@ -10,6 +10,7 @@
#include <codecapi.h>
#include <mferror.h>
#include <mftransform.h>
+#include <objbase.h>
#include <iterator>
#include <utility>
@@ -355,7 +356,8 @@ bool MediaFoundationVideoEncodeAccelerator::CreateHardwareEncoderMFT() {
RETURN_ON_HR_FAILURE(hr, "Couldn't enumerate hardware encoder", false);
RETURN_ON_FAILURE((count > 0), "No HW encoder found", false);
DVLOG(3) << "HW encoder(s) found: " << count;
- hr = encoder_.CreateInstance(CLSIDs[0]);
+ hr = ::CoCreateInstance(CLSIDs[0], nullptr, CLSCTX_ALL,
+ IID_PPV_ARGS(&encoder_));
RETURN_ON_HR_FAILURE(hr, "Couldn't activate hardware encoder", false);
RETURN_ON_FAILURE((encoder_.Get() != nullptr),
"No HW encoder instance created", false);
« no previous file with comments | « media/capture/video/win/video_capture_device_win.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698