Chromium Code Reviews| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 virtual bool CanDecodeOnIOThread() override; | 66 virtual bool CanDecodeOnIOThread() override; |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 typedef void* EGLConfig; | 69 typedef void* EGLConfig; |
| 70 typedef void* EGLSurface; | 70 typedef void* EGLSurface; |
| 71 // Creates and initializes an instance of the D3D device and the | 71 // Creates and initializes an instance of the D3D device and the |
| 72 // corresponding device manager. The device manager instance is eventually | 72 // corresponding device manager. The device manager instance is eventually |
| 73 // passed to the IMFTransform interface implemented by the h.264 decoder. | 73 // passed to the IMFTransform interface implemented by the h.264 decoder. |
| 74 bool CreateD3DDevManager(); | 74 bool CreateD3DDevManager(); |
| 75 | 75 |
| 76 // Creates, initializes and sets the media types for the h.264 decoder. | 76 // Creates, initializes and sets the media codec types for the decoder. |
| 77 bool InitDecoder(media::VideoCodecProfile profile); | 77 bool InitDecoder(media::VideoCodecProfile profile); |
| 78 | 78 |
| 79 // Validates whether the h.264 decoder supports hardware video acceleration. | 79 // Validates whether the h.264 decoder supports hardware video acceleration. |
|
DaleCurtis
2014/11/25 00:32:55
s/h.264/codec/ everywhere in this file?
luken
2014/11/25 01:07:02
I cleaned up the comments manually.
| |
| 80 bool CheckDecoderDxvaSupport(); | 80 bool CheckDecoderDxvaSupport(); |
| 81 | 81 |
| 82 // Returns information about the input and output streams. This includes | 82 // Returns information about the input and output streams. This includes |
| 83 // alignment information, decoder support flags, minimum sample size, etc. | 83 // alignment information, decoder support flags, minimum sample size, etc. |
| 84 bool GetStreamsInfoAndBufferReqs(); | 84 bool GetStreamsInfoAndBufferReqs(); |
| 85 | 85 |
| 86 // Registers the input and output media types on the h.264 decoder. This | 86 // Registers the input and output media types on the h.264 decoder. This |
| 87 // includes the expected input and output formats. | 87 // includes the expected input and output formats. |
| 88 bool SetDecoderMediaTypes(); | 88 bool SetDecoderMediaTypes(); |
| 89 | 89 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 | 216 |
| 217 // List of input samples waiting to be processed. | 217 // List of input samples waiting to be processed. |
| 218 typedef std::list<base::win::ScopedComPtr<IMFSample>> PendingInputs; | 218 typedef std::list<base::win::ScopedComPtr<IMFSample>> PendingInputs; |
| 219 PendingInputs pending_input_buffers_; | 219 PendingInputs pending_input_buffers_; |
| 220 | 220 |
| 221 // Callback to set the correct gl context. | 221 // Callback to set the correct gl context. |
| 222 base::Callback<bool(void)> make_context_current_; | 222 base::Callback<bool(void)> make_context_current_; |
| 223 | 223 |
| 224 // WeakPtrFactory for posting tasks back to |this|. | 224 // WeakPtrFactory for posting tasks back to |this|. |
| 225 base::WeakPtrFactory<DXVAVideoDecodeAccelerator> weak_this_factory_; | 225 base::WeakPtrFactory<DXVAVideoDecodeAccelerator> weak_this_factory_; |
| 226 | |
| 227 // Which codec we are decoding with hardware acceleration. | |
| 228 media::VideoCodec codec_; | |
| 226 }; | 229 }; |
| 227 | 230 |
| 228 } // namespace content | 231 } // namespace content |
| 229 | 232 |
| 230 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 233 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |