| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 230 |
| 231 // Flushes the decoder device to ensure that the decoded surface is copied | 231 // Flushes the decoder device to ensure that the decoded surface is copied |
| 232 // to the target surface. |iterations| helps to maintain an upper limit on | 232 // to the target surface. |iterations| helps to maintain an upper limit on |
| 233 // the number of times we try to complete the flush operation. | 233 // the number of times we try to complete the flush operation. |
| 234 void FlushDecoder(int iterations, | 234 void FlushDecoder(int iterations, |
| 235 IDirect3DSurface9* src_surface, | 235 IDirect3DSurface9* src_surface, |
| 236 IDirect3DSurface9* dest_surface, | 236 IDirect3DSurface9* dest_surface, |
| 237 int picture_buffer_id, | 237 int picture_buffer_id, |
| 238 int input_buffer_id); | 238 int input_buffer_id); |
| 239 | 239 |
| 240 // Polls to wait for GPU commands to be finished on the picture buffer |
| 241 // before reusing it. |
| 242 void WaitForOutputBuffer(int32_t picture_buffer_id, int count); |
| 243 |
| 240 // Initializes the DX11 Video format converter media types. | 244 // Initializes the DX11 Video format converter media types. |
| 241 // Returns true on success. | 245 // Returns true on success. |
| 242 bool InitializeDX11VideoFormatConverterMediaType(int width, int height); | 246 bool InitializeDX11VideoFormatConverterMediaType(int width, int height); |
| 243 | 247 |
| 244 // Returns the output video frame dimensions (width, height). | 248 // Returns the output video frame dimensions (width, height). |
| 245 // |sample| :- This is the output sample containing the video frame. | 249 // |sample| :- This is the output sample containing the video frame. |
| 246 // |width| :- The width is returned here. | 250 // |width| :- The width is returned here. |
| 247 // |height| :- The height is returned here. | 251 // |height| :- The height is returned here. |
| 248 // Returns true on success. | 252 // Returns true on success. |
| 249 bool GetVideoFrameDimensions(IMFSample* sample, int* width, int* height); | 253 bool GetVideoFrameDimensions(IMFSample* sample, int* width, int* height); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 398 |
| 395 // Function pointer for the MFCreateDXGIDeviceManager API. | 399 // Function pointer for the MFCreateDXGIDeviceManager API. |
| 396 static CreateDXGIDeviceManager create_dxgi_device_manager_; | 400 static CreateDXGIDeviceManager create_dxgi_device_manager_; |
| 397 | 401 |
| 398 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); | 402 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); |
| 399 }; | 403 }; |
| 400 | 404 |
| 401 } // namespace content | 405 } // namespace content |
| 402 | 406 |
| 403 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 407 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |