Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: content/common/gpu/media/dxva_video_decode_accelerator.h

Issue 23125014: Run VDA::Decode on GPU IO thread if VDA supports it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use filter_.get() to decide whether RemoveFilter should be called Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "content/common/gpu/media/video_decode_accelerator_impl.h"
20 #include "media/video/video_decode_accelerator.h" 21 #include "media/video/video_decode_accelerator.h"
21 22
22 interface IMFSample; 23 interface IMFSample;
23 interface IDirect3DSurface9; 24 interface IDirect3DSurface9;
24 25
25 namespace content { 26 namespace content {
26 27
27 // Class to provide a DXVA 2.0 based accelerator using the Microsoft Media 28 // Class to provide a DXVA 2.0 based accelerator using the Microsoft Media
28 // foundation APIs via the VideoDecodeAccelerator interface. 29 // foundation APIs via the VideoDecodeAccelerator interface.
29 // This class lives on a single thread and DCHECKs that it is never accessed 30 // This class lives on a single thread and DCHECKs that it is never accessed
30 // from any other. 31 // from any other.
31 class CONTENT_EXPORT DXVAVideoDecodeAccelerator 32 class CONTENT_EXPORT DXVAVideoDecodeAccelerator
32 : public media::VideoDecodeAccelerator, 33 : public VideoDecodeAcceleratorImpl,
33 NON_EXPORTED_BASE(public base::NonThreadSafe) { 34 NON_EXPORTED_BASE(public base::NonThreadSafe) {
34 public: 35 public:
35 enum State { 36 enum State {
36 kUninitialized, // un-initialized. 37 kUninitialized, // un-initialized.
37 kNormal, // normal playing state. 38 kNormal, // normal playing state.
38 kResetting, // upon received Reset(), before ResetDone() 39 kResetting, // upon received Reset(), before ResetDone()
39 kStopped, // upon output EOS received. 40 kStopped, // upon output EOS received.
40 kFlushing, // upon flush request received. 41 kFlushing, // upon flush request received.
41 }; 42 };
42 43
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 typedef std::list<base::win::ScopedComPtr<IMFSample>> PendingInputs; 225 typedef std::list<base::win::ScopedComPtr<IMFSample>> PendingInputs;
225 PendingInputs pending_input_buffers_; 226 PendingInputs pending_input_buffers_;
226 227
227 // Callback to set the correct gl context. 228 // Callback to set the correct gl context.
228 base::Callback<bool(void)> make_context_current_; 229 base::Callback<bool(void)> make_context_current_;
229 }; 230 };
230 231
231 } // namespace content 232 } // namespace content
232 233
233 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ 234 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698