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

Side by Side Diff: media/gpu/d3d11_video_decode_accelerator_win.cc

Issue 2864523002: Rename ScopedComPtr::QueryInterface to ScopedComPtr::CopyTo (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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // This is defined here to ensure the D3D11, D3D9, and DXVA includes through 5 // This is defined here to ensure the D3D11, D3D9, and DXVA includes through
6 // this header have their GUIDs intialized. 6 // this header have their GUIDs intialized.
7 #define INITGUID 7 #define INITGUID
8 #include "media/gpu/d3d11_video_decode_accelerator_win.h" 8 #include "media/gpu/d3d11_video_decode_accelerator_win.h"
9 #undef INITGUID 9 #undef INITGUID
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 D3D11VideoDecodeAccelerator::~D3D11VideoDecodeAccelerator() {} 43 D3D11VideoDecodeAccelerator::~D3D11VideoDecodeAccelerator() {}
44 44
45 bool D3D11VideoDecodeAccelerator::Initialize(const Config& config, 45 bool D3D11VideoDecodeAccelerator::Initialize(const Config& config,
46 Client* client) { 46 Client* client) {
47 client_ = client; 47 client_ = client;
48 make_context_current_cb_.Run(); 48 make_context_current_cb_.Run();
49 49
50 device_ = gl::QueryD3D11DeviceObjectFromANGLE(); 50 device_ = gl::QueryD3D11DeviceObjectFromANGLE();
51 device_->GetImmediateContext(device_context_.Receive()); 51 device_->GetImmediateContext(device_context_.Receive());
52 52
53 HRESULT hr = device_context_.QueryInterface(video_context_.Receive()); 53 HRESULT hr = device_context_.CopyTo(video_context_.Receive());
54 CHECK(SUCCEEDED(hr)); 54 CHECK(SUCCEEDED(hr));
55 55
56 hr = device_.QueryInterface(video_device_.Receive()); 56 hr = device_.CopyTo(video_device_.Receive());
57 CHECK(SUCCEEDED(hr)); 57 CHECK(SUCCEEDED(hr));
58 58
59 bool is_h264 = 59 bool is_h264 =
60 config.profile >= H264PROFILE_MIN && config.profile <= H264PROFILE_MAX; 60 config.profile >= H264PROFILE_MIN && config.profile <= H264PROFILE_MAX;
61 if (!is_h264) 61 if (!is_h264)
62 return false; 62 return false;
63 63
64 GUID needed_guid; 64 GUID needed_guid;
65 memcpy(&needed_guid, &D3D11_DECODER_PROFILE_H264_VLD_NOFGT, 65 memcpy(&needed_guid, &D3D11_DECODER_PROFILE_H264_VLD_NOFGT,
66 sizeof(needed_guid)); 66 sizeof(needed_guid));
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 243
244 void D3D11VideoDecodeAccelerator::OutputResult(D3D11PictureBuffer* buffer, 244 void D3D11VideoDecodeAccelerator::OutputResult(D3D11PictureBuffer* buffer,
245 size_t input_buffer_id) { 245 size_t input_buffer_id) {
246 buffer->set_in_client_use(true); 246 buffer->set_in_client_use(true);
247 Picture picture(buffer->picture_buffer().id(), input_buffer_id, 247 Picture picture(buffer->picture_buffer().id(), input_buffer_id,
248 gfx::Rect(0, 0), gfx::ColorSpace(), false); 248 gfx::Rect(0, 0), gfx::ColorSpace(), false);
249 client_->PictureReady(picture); 249 client_->PictureReady(picture);
250 } 250 }
251 } // namespace media 251 } // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/win/video_capture_device_win.cc ('k') | media/gpu/dxva_video_decode_accelerator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698