| 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 #include <dxva2api.h> | 9 #include <dxva2api.h> |
| 10 #include <list> | 10 #include <list> |
| 11 #include <map> | 11 #include <map> |
| 12 #include <mfidl.h> | 12 #include <mfidl.h> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/memory/linked_ptr.h" | 16 #include "base/memory/linked_ptr.h" |
| 17 #include "base/threading/non_thread_safe.h" | 17 #include "base/threading/non_thread_safe.h" |
| 18 #include "base/win/scoped_comptr.h" | 18 #include "base/win/scoped_comptr.h" |
| 19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 20 #include "media/video/video_decode_accelerator.h" | 20 #include "media/video/video_decode_accelerator.h" |
| 21 | 21 |
| 22 interface IMFSample; | 22 interface IMFSample; |
| 23 interface IDirect3DSurface9; | 23 interface IDirect3DSurface9; |
| 24 | 24 |
| 25 namespace content { |
| 26 |
| 25 // Class to provide a DXVA 2.0 based accelerator using the Microsoft Media | 27 // Class to provide a DXVA 2.0 based accelerator using the Microsoft Media |
| 26 // foundation APIs via the VideoDecodeAccelerator interface. | 28 // foundation APIs via the VideoDecodeAccelerator interface. |
| 27 // This class lives on a single thread and DCHECKs that it is never accessed | 29 // This class lives on a single thread and DCHECKs that it is never accessed |
| 28 // from any other. | 30 // from any other. |
| 29 class CONTENT_EXPORT DXVAVideoDecodeAccelerator | 31 class CONTENT_EXPORT DXVAVideoDecodeAccelerator |
| 30 : public media::VideoDecodeAccelerator, | 32 : public media::VideoDecodeAccelerator, |
| 31 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 33 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
| 32 public: | 34 public: |
| 33 enum State { | 35 enum State { |
| 34 kUninitialized, // un-initialized. | 36 kUninitialized, // un-initialized. |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 static bool pre_sandbox_init_done_; | 212 static bool pre_sandbox_init_done_; |
| 211 | 213 |
| 212 // List of input samples waiting to be processed. | 214 // List of input samples waiting to be processed. |
| 213 typedef std::list<media::BitstreamBuffer> PendingInputs; | 215 typedef std::list<media::BitstreamBuffer> PendingInputs; |
| 214 PendingInputs pending_input_buffers_; | 216 PendingInputs pending_input_buffers_; |
| 215 | 217 |
| 216 // Callback to set the correct gl context. | 218 // Callback to set the correct gl context. |
| 217 base::Callback<bool(void)> make_context_current_; | 219 base::Callback<bool(void)> make_context_current_; |
| 218 }; | 220 }; |
| 219 | 221 |
| 222 } // namespace content |
| 223 |
| 220 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 224 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |