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

Side by Side Diff: media/video/video_decode_accelerator.h

Issue 7021020: Clean up video frame sizes, types in Video Decode API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 5 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 MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 VIDEODECODERERROR_UNINITIALIZED, 175 VIDEODECODERERROR_UNINITIALIZED,
176 VIDEODECODERERROR_UNSUPPORTED, 176 VIDEODECODERERROR_UNSUPPORTED,
177 VIDEODECODERERROR_INVALIDINPUT, 177 VIDEODECODERERROR_INVALIDINPUT,
178 VIDEODECODERERROR_MEMFAILURE, 178 VIDEODECODERERROR_MEMFAILURE,
179 VIDEODECODERERROR_INSUFFICIENT_BUFFERS, 179 VIDEODECODERERROR_INSUFFICIENT_BUFFERS,
180 VIDEODECODERERROR_INSUFFICIENT_RESOURCES, 180 VIDEODECODERERROR_INSUFFICIENT_RESOURCES,
181 VIDEODECODERERROR_HARDWARE, 181 VIDEODECODERERROR_HARDWARE,
182 VIDEODECODERERROR_UNEXPECTED_FLUSH, 182 VIDEODECODERERROR_UNEXPECTED_FLUSH,
183 }; 183 };
184 184
185 // Represents the type of data buffer to be used by the decoder.
Ami GONE FROM CHROMIUM 2011/07/18 18:33:00 Do you want to DO the TODO from picture.h now, too
vrk (LEFT CHROMIUM) 2011/07/19 01:26:08 Done.
186 enum MemoryType {
187 PICTUREBUFFER_MEMORYTYPE_NONE = 0,
188 PICTUREBUFFER_MEMORYTYPE_SYSTEM,
189 PICTUREBUFFER_MEMORYTYPE_GL_TEXTURE,
190 };
191
192 // Interface for collaborating with picture interface to provide memory for 185 // Interface for collaborating with picture interface to provide memory for
193 // output picture and blitting them. 186 // output picture and blitting them.
194 // This interface is extended by the various layers that relay messages back 187 // This interface is extended by the various layers that relay messages back
195 // to the plugin, through the PPP_VideoDecode_Dev interface the plugin 188 // to the plugin, through the PPP_VideoDecode_Dev interface the plugin
196 // implements. 189 // implements.
197 class Client { 190 class Client {
198 public: 191 public:
199 virtual ~Client() {} 192 virtual ~Client() {}
200 193
201 // Callback to notify client that decoder has been initialized. 194 // Callback to notify client that decoder has been initialized.
202 virtual void NotifyInitializeDone() = 0; 195 virtual void NotifyInitializeDone() = 0;
203 196
204 // Callback to tell the information needed by the client to provide decoding 197 // Callback to tell client how many and what size of buffers to provide.
205 // buffer to the decoder.
206 virtual void ProvidePictureBuffers( 198 virtual void ProvidePictureBuffers(
207 uint32 requested_num_of_buffers, 199 uint32 requested_num_of_buffers, const gfx::Size& dimensions) = 0;
208 const gfx::Size& dimensions,
209 MemoryType type) = 0;
210 200
211 // Callback to dismiss picture buffer that was assigned earlier. 201 // Callback to dismiss picture buffer that was assigned earlier.
212 virtual void DismissPictureBuffer(int32 picture_buffer_id) = 0; 202 virtual void DismissPictureBuffer(int32 picture_buffer_id) = 0;
213 203
214 // Callback to deliver decoded pictures ready to be displayed. 204 // Callback to deliver decoded pictures ready to be displayed.
215 virtual void PictureReady(const Picture& picture) = 0; 205 virtual void PictureReady(const Picture& picture) = 0;
216 206
217 // Callback to notify that decoder has decoded end of stream marker and has 207 // Callback to notify that decoder has decoded end of stream marker and has
218 // outputted all displayable pictures. 208 // outputted all displayable pictures.
219 virtual void NotifyEndOfStream() = 0; 209 virtual void NotifyEndOfStream() = 0;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 virtual void Destroy() = 0; 274 virtual void Destroy() = 0;
285 275
286 protected: 276 protected:
287 friend class base::RefCountedThreadSafe<VideoDecodeAccelerator>; 277 friend class base::RefCountedThreadSafe<VideoDecodeAccelerator>;
288 virtual ~VideoDecodeAccelerator(); 278 virtual ~VideoDecodeAccelerator();
289 }; 279 };
290 280
291 } // namespace media 281 } // namespace media
292 282
293 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 283 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « media/video/picture.cc ('k') | ppapi/c/dev/pp_video_dev.h » ('j') | ppapi/c/dev/pp_video_dev.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698