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

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

Issue 185403020: Make VEA client of command buffer; move sync. IPC to VDA/VEA::Initialize() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 7da5b6ec Rebase. Created 6 years, 8 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 | Annotate | Revision Log
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/memory/weak_ptr.h"
17 #include "base/threading/non_thread_safe.h" 18 #include "base/threading/non_thread_safe.h"
18 #include "base/win/scoped_comptr.h" 19 #include "base/win/scoped_comptr.h"
19 #include "content/common/content_export.h" 20 #include "content/common/content_export.h"
20 #include "content/common/gpu/media/video_decode_accelerator_impl.h" 21 #include "content/common/gpu/media/video_decode_accelerator_impl.h"
21 #include "media/video/video_decode_accelerator.h" 22 #include "media/video/video_decode_accelerator.h"
22 23
23 interface IMFSample; 24 interface IMFSample;
24 interface IDirect3DSurface9; 25 interface IDirect3DSurface9;
25 26
26 namespace content { 27 namespace content {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 void StopOnError(media::VideoDecodeAccelerator::Error error); 107 void StopOnError(media::VideoDecodeAccelerator::Error error);
107 108
108 // Transitions the decoder to the uninitialized state. The decoder will stop 109 // Transitions the decoder to the uninitialized state. The decoder will stop
109 // accepting requests in this state. 110 // accepting requests in this state.
110 void Invalidate(); 111 void Invalidate();
111 112
112 // Notifies the client that the input buffer identifed by input_buffer_id has 113 // Notifies the client that the input buffer identifed by input_buffer_id has
113 // been processed. 114 // been processed.
114 void NotifyInputBufferRead(int input_buffer_id); 115 void NotifyInputBufferRead(int input_buffer_id);
115 116
116 // Notifies the client that initialize was completed.
117 void NotifyInitializeDone();
118
119 // Notifies the client that the decoder was flushed. 117 // Notifies the client that the decoder was flushed.
120 void NotifyFlushDone(); 118 void NotifyFlushDone();
121 119
122 // Notifies the client that the decoder was reset. 120 // Notifies the client that the decoder was reset.
123 void NotifyResetDone(); 121 void NotifyResetDone();
124 122
125 // Requests picture buffers from the client. 123 // Requests picture buffers from the client.
126 void RequestPictureBuffers(int width, int height); 124 void RequestPictureBuffers(int width, int height);
127 125
128 // Notifies the client about the availability of a picture. 126 // Notifies the client about the availability of a picture.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // Counter which holds the number of input packets before a successful 197 // Counter which holds the number of input packets before a successful
200 // decode. 198 // decode.
201 int inputs_before_decode_; 199 int inputs_before_decode_;
202 200
203 // List of input samples waiting to be processed. 201 // List of input samples waiting to be processed.
204 typedef std::list<base::win::ScopedComPtr<IMFSample>> PendingInputs; 202 typedef std::list<base::win::ScopedComPtr<IMFSample>> PendingInputs;
205 PendingInputs pending_input_buffers_; 203 PendingInputs pending_input_buffers_;
206 204
207 // Callback to set the correct gl context. 205 // Callback to set the correct gl context.
208 base::Callback<bool(void)> make_context_current_; 206 base::Callback<bool(void)> make_context_current_;
207
208 // WeakPtrFactory for posting tasks back to |this|.
209 base::WeakPtrFactory<DXVAVideoDecodeAccelerator> weak_this_factory_;
209 }; 210 };
210 211
211 } // namespace content 212 } // namespace content
212 213
213 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_ 214 #endif // CONTENT_COMMON_GPU_MEDIA_DXVA_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698