OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <d3d11.h> | 8 #include <d3d11.h> |
9 #include <d3d9.h> | 9 #include <d3d9.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 // Returns true on success. | 239 // Returns true on success. |
240 bool InitializeDX11VideoFormatConverterMediaType(int width, int height); | 240 bool InitializeDX11VideoFormatConverterMediaType(int width, int height); |
241 | 241 |
242 // Returns the output video frame dimensions (width, height). | 242 // Returns the output video frame dimensions (width, height). |
243 // |sample| :- This is the output sample containing the video frame. | 243 // |sample| :- This is the output sample containing the video frame. |
244 // |width| :- The width is returned here. | 244 // |width| :- The width is returned here. |
245 // |height| :- The height is returned here. | 245 // |height| :- The height is returned here. |
246 // Returns true on success. | 246 // Returns true on success. |
247 bool GetVideoFrameDimensions(IMFSample* sample, int* width, int* height); | 247 bool GetVideoFrameDimensions(IMFSample* sample, int* width, int* height); |
248 | 248 |
| 249 // Sets the output type on the |transform| to the GUID identified by the |
| 250 // the |output_type| parameter. The GUID can be MFVideoFormat_RGB32, |
| 251 // MFVideoFormat_ARGB32, MFVideoFormat_NV12, etc. |
| 252 // Additionally if the |width| and |height| parameters are non zero, then |
| 253 // this function also sets the MF_MT_FRAME_SIZE attribute on the type. |
| 254 // Returns true on success. |
| 255 bool SetTransformOutputType(IMFTransform* transform, |
| 256 const GUID& output_type, |
| 257 int width, |
| 258 int height); |
| 259 |
249 // To expose client callbacks from VideoDecodeAccelerator. | 260 // To expose client callbacks from VideoDecodeAccelerator. |
250 media::VideoDecodeAccelerator::Client* client_; | 261 media::VideoDecodeAccelerator::Client* client_; |
251 | 262 |
252 base::win::ScopedComPtr<IMFTransform> decoder_; | 263 base::win::ScopedComPtr<IMFTransform> decoder_; |
253 base::win::ScopedComPtr<IMFTransform> video_format_converter_mft_; | 264 base::win::ScopedComPtr<IMFTransform> video_format_converter_mft_; |
254 | 265 |
255 base::win::ScopedComPtr<IDirect3D9Ex> d3d9_; | 266 base::win::ScopedComPtr<IDirect3D9Ex> d3d9_; |
256 base::win::ScopedComPtr<IDirect3DDevice9Ex> d3d9_device_ex_; | 267 base::win::ScopedComPtr<IDirect3DDevice9Ex> d3d9_device_ex_; |
257 base::win::ScopedComPtr<IDirect3DDeviceManager9> device_manager_; | 268 base::win::ScopedComPtr<IDirect3DDeviceManager9> device_manager_; |
258 base::win::ScopedComPtr<IDirect3DQuery9> query_; | 269 base::win::ScopedComPtr<IDirect3DQuery9> query_; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 | 388 |
378 // Function pointer for the MFCreateDXGIDeviceManager API. | 389 // Function pointer for the MFCreateDXGIDeviceManager API. |
379 static CreateDXGIDeviceManager create_dxgi_device_manager_; | 390 static CreateDXGIDeviceManager create_dxgi_device_manager_; |
380 | 391 |
381 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); | 392 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); |
382 }; | 393 }; |
383 | 394 |
384 } // namespace content | 395 } // namespace content |
385 | 396 |
386 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 397 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |