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 void Decode(const media::BitstreamBuffer& bitstream_buffer) override; | 58 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) override; |
59 virtual void AssignPictureBuffers( | 59 virtual void AssignPictureBuffers( |
60 const std::vector<media::PictureBuffer>& buffers) override; | 60 const std::vector<media::PictureBuffer>& buffers) override; |
61 virtual void ReusePictureBuffer(int32 picture_buffer_id) override; | 61 virtual void ReusePictureBuffer(int32 picture_buffer_id) override; |
62 virtual void Flush() override; | 62 virtual void Flush() override; |
63 virtual void Reset() override; | 63 virtual void Reset() override; |
64 virtual void Destroy() override; | 64 virtual void Destroy() override; |
65 virtual bool CanDecodeOnIOThread() override; | 65 virtual bool CanDecodeOnIOThread() override; |
66 GLenum GetSurfaceInternalFormat() const override; | 66 GLenum GetSurfaceInternalFormat() const override; |
67 | 67 |
| 68 // Get the minimum and maximum supported decode resolution. |
| 69 static media::VideoDecodeAccelerator::SupportedResolution |
| 70 GetSupportedResolution(); |
| 71 |
68 private: | 72 private: |
69 typedef void* EGLConfig; | 73 typedef void* EGLConfig; |
70 typedef void* EGLSurface; | 74 typedef void* EGLSurface; |
71 | 75 |
72 // Creates and initializes an instance of the D3D device and the | 76 // Creates and initializes an instance of the D3D device and the |
73 // corresponding device manager. The device manager instance is eventually | 77 // corresponding device manager. The device manager instance is eventually |
74 // passed to the IMFTransform interface implemented by the decoder. | 78 // passed to the IMFTransform interface implemented by the decoder. |
75 bool CreateD3DDevManager(); | 79 bool CreateD3DDevManager(); |
76 | 80 |
77 // Creates, initializes and sets the media codec types for the decoder. | 81 // Creates, initializes and sets the media codec types for the decoder. |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 const base::WeakPtr<DXVAVideoDecodeAccelerator> weak_ptr_; | 304 const base::WeakPtr<DXVAVideoDecodeAccelerator> weak_ptr_; |
301 | 305 |
302 // Set to true if we are in the context of a Flush operation. Used to prevent | 306 // Set to true if we are in the context of a Flush operation. Used to prevent |
303 // multiple flush done notifications being sent out. | 307 // multiple flush done notifications being sent out. |
304 bool pending_flush_; | 308 bool pending_flush_; |
305 }; | 309 }; |
306 | 310 |
307 } // namespace content | 311 } // namespace content |
308 | 312 |
309 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 313 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |