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 <d3d9.h> | 8 #include <d3d9.h> |
9 // Work around bug in this header by disabling the relevant warning for it. | 9 // Work around bug in this header by disabling the relevant warning for it. |
10 // https://connect.microsoft.com/VisualStudio/feedback/details/911260/dxva2api-h
-in-win8-sdk-triggers-c4201-with-w4 | 10 // https://connect.microsoft.com/VisualStudio/feedback/details/911260/dxva2api-h
-in-win8-sdk-triggers-c4201-with-w4 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual bool Initialize(media::VideoCodecProfile profile, | 58 virtual bool Initialize(media::VideoCodecProfile profile, |
59 Client* client) override; | 59 Client* client) override; |
60 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) override; | 60 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) override; |
61 virtual void AssignPictureBuffers( | 61 virtual void AssignPictureBuffers( |
62 const std::vector<media::PictureBuffer>& buffers) override; | 62 const std::vector<media::PictureBuffer>& buffers) override; |
63 virtual void ReusePictureBuffer(int32 picture_buffer_id) override; | 63 virtual void ReusePictureBuffer(int32 picture_buffer_id) override; |
64 virtual void Flush() override; | 64 virtual void Flush() override; |
65 virtual void Reset() override; | 65 virtual void Reset() override; |
66 virtual void Destroy() override; | 66 virtual void Destroy() override; |
67 virtual bool CanDecodeOnIOThread() override; | 67 virtual bool CanDecodeOnIOThread() override; |
| 68 GLenum GetSurfaceInternalFormat() const override; |
68 | 69 |
69 private: | 70 private: |
70 typedef void* EGLConfig; | 71 typedef void* EGLConfig; |
71 typedef void* EGLSurface; | 72 typedef void* EGLSurface; |
72 | 73 |
73 // Creates and initializes an instance of the D3D device and the | 74 // Creates and initializes an instance of the D3D device and the |
74 // corresponding device manager. The device manager instance is eventually | 75 // corresponding device manager. The device manager instance is eventually |
75 // passed to the IMFTransform interface implemented by the decoder. | 76 // passed to the IMFTransform interface implemented by the decoder. |
76 bool CreateD3DDevManager(); | 77 bool CreateD3DDevManager(); |
77 | 78 |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // Disallow rebinding WeakReference ownership to a different thread by | 268 // Disallow rebinding WeakReference ownership to a different thread by |
268 // keeping a persistent reference. This avoids problems with the | 269 // keeping a persistent reference. This avoids problems with the |
269 // thread safety of reaching into this class from multiple threads to | 270 // thread safety of reaching into this class from multiple threads to |
270 // attain a WeakPtr. | 271 // attain a WeakPtr. |
271 const base::WeakPtr<DXVAVideoDecodeAccelerator> weak_ptr_; | 272 const base::WeakPtr<DXVAVideoDecodeAccelerator> weak_ptr_; |
272 }; | 273 }; |
273 | 274 |
274 } // namespace content | 275 } // namespace content |
275 | 276 |
276 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 277 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |