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

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

Issue 7524032: Added support for Decode() calls during Reset(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_OMX_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <dlfcn.h> 8 #include <dlfcn.h>
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 // For output buffer recycling cases. 167 // For output buffer recycling cases.
168 OutputPictureById pictures_; 168 OutputPictureById pictures_;
169 169
170 // To kick the component from Loaded to Idle before we know the real size of 170 // To kick the component from Loaded to Idle before we know the real size of
171 // the video (so can't yet ask for textures) we populate it with fake output 171 // the video (so can't yet ask for textures) we populate it with fake output
172 // buffers. Keep track of them here. 172 // buffers. Keep track of them here.
173 // TODO(fischman): do away with this madness. 173 // TODO(fischman): do away with this madness.
174 std::set<OMX_BUFFERHEADERTYPE*> fake_output_buffers_; 174 std::set<OMX_BUFFERHEADERTYPE*> fake_output_buffers_;
175 175
176 // Encoded bitstream buffers awaiting decode, queued while the decoder was
177 // Resetting and thus unable to accept them. This will be empty most of the
178 // time, is populated when Decode()'s are received between Reset() is called
179 // and NotifyResetDone() is sent, and is drained right before
180 // NotifyResetDone() is sent.
181 typedef std::vector<media::BitstreamBuffer> BitstreamBufferList;
182 BitstreamBufferList queued_bitstream_buffers_;
183 std::vector<int> queued_picture_buffer_ids_;
vrk (LEFT CHROMIUM) 2011/07/29 17:06:44 nit: Add comment to explain queued picture buffers
Ami GONE FROM CHROMIUM 2011/07/29 17:17:09 Done.
184
176 // To expose client callbacks from VideoDecodeAccelerator. 185 // To expose client callbacks from VideoDecodeAccelerator.
177 // NOTE: all calls to this object *MUST* be executed in message_loop_. 186 // NOTE: all calls to this object *MUST* be executed in message_loop_.
178 Client* client_; 187 Client* client_;
179 188
180 // Method to handle events 189 // Method to handle events
181 void EventHandlerCompleteTask(OMX_EVENTTYPE event, 190 void EventHandlerCompleteTask(OMX_EVENTTYPE event,
182 OMX_U32 data1, 191 OMX_U32 data1,
183 OMX_U32 data2); 192 OMX_U32 data2);
184 193
185 // Method to receive buffers from component's input port 194 // Method to receive buffers from component's input port
(...skipping 16 matching lines...) Expand all
202 OMX_PTR event_data); 211 OMX_PTR event_data);
203 static OMX_ERRORTYPE EmptyBufferCallback(OMX_HANDLETYPE component, 212 static OMX_ERRORTYPE EmptyBufferCallback(OMX_HANDLETYPE component,
204 OMX_PTR priv_data, 213 OMX_PTR priv_data,
205 OMX_BUFFERHEADERTYPE* buffer); 214 OMX_BUFFERHEADERTYPE* buffer);
206 static OMX_ERRORTYPE FillBufferCallback(OMX_HANDLETYPE component, 215 static OMX_ERRORTYPE FillBufferCallback(OMX_HANDLETYPE component,
207 OMX_PTR priv_data, 216 OMX_PTR priv_data,
208 OMX_BUFFERHEADERTYPE* buffer); 217 OMX_BUFFERHEADERTYPE* buffer);
209 }; 218 };
210 219
211 #endif // CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_ 220 #endif // CONTENT_COMMON_GPU_MEDIA_OMX_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698