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/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "base/threading/non_thread_safe.h" | 18 #include "base/threading/non_thread_safe.h" |
19 #include "base/win/scoped_comptr.h" | 19 #include "base/win/scoped_comptr.h" |
20 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
21 #include "content/common/gpu/media/video_decode_accelerator_impl.h" | 21 #include "media/types/video_decode_accelerator_impl.h" |
22 #include "media/video/video_decode_accelerator.h" | 22 #include "media/video/video_decode_accelerator.h" |
23 | 23 |
24 interface IMFSample; | 24 interface IMFSample; |
25 interface IDirect3DSurface9; | 25 interface IDirect3DSurface9; |
26 | 26 |
27 namespace content { | 27 namespace content { |
28 | 28 |
29 // Class to provide a DXVA 2.0 based accelerator using the Microsoft Media | 29 // Class to provide a DXVA 2.0 based accelerator using the Microsoft Media |
30 // foundation APIs via the VideoDecodeAccelerator interface. | 30 // foundation APIs via the VideoDecodeAccelerator interface. |
31 // This class lives on a single thread and DCHECKs that it is never accessed | 31 // This class lives on a single thread and DCHECKs that it is never accessed |
32 // from any other. | 32 // from any other. |
33 class CONTENT_EXPORT DXVAVideoDecodeAccelerator | 33 class CONTENT_EXPORT DXVAVideoDecodeAccelerator |
34 : public VideoDecodeAcceleratorImpl, | 34 : public media::VideoDecodeAcceleratorImpl, |
35 NON_EXPORTED_BASE(public base::NonThreadSafe) { | 35 NON_EXPORTED_BASE(public base::NonThreadSafe) { |
36 public: | 36 public: |
37 enum State { | 37 enum State { |
38 kUninitialized, // un-initialized. | 38 kUninitialized, // un-initialized. |
39 kNormal, // normal playing state. | 39 kNormal, // normal playing state. |
40 kResetting, // upon received Reset(), before ResetDone() | 40 kResetting, // upon received Reset(), before ResetDone() |
41 kStopped, // upon output EOS received. | 41 kStopped, // upon output EOS received. |
42 kFlushing, // upon flush request received. | 42 kFlushing, // upon flush request received. |
43 }; | 43 }; |
44 | 44 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 // Callback to set the correct gl context. | 205 // Callback to set the correct gl context. |
206 base::Callback<bool(void)> make_context_current_; | 206 base::Callback<bool(void)> make_context_current_; |
207 | 207 |
208 // WeakPtrFactory for posting tasks back to |this|. | 208 // WeakPtrFactory for posting tasks back to |this|. |
209 base::WeakPtrFactory<DXVAVideoDecodeAccelerator> weak_this_factory_; | 209 base::WeakPtrFactory<DXVAVideoDecodeAccelerator> weak_this_factory_; |
210 }; | 210 }; |
211 | 211 |
212 } // namespace content | 212 } // namespace content |
213 | 213 |
214 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ | 214 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |