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

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: cleanup Created 9 years, 7 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 VIDEODECODERERROR_UNINITIALIZED, 163 VIDEODECODERERROR_UNINITIALIZED,
164 VIDEODECODERERROR_UNSUPPORTED, 164 VIDEODECODERERROR_UNSUPPORTED,
165 VIDEODECODERERROR_INVALIDINPUT, 165 VIDEODECODERERROR_INVALIDINPUT,
166 VIDEODECODERERROR_MEMFAILURE, 166 VIDEODECODERERROR_MEMFAILURE,
167 VIDEODECODERERROR_INSUFFICIENT_BUFFERS, 167 VIDEODECODERERROR_INSUFFICIENT_BUFFERS,
168 VIDEODECODERERROR_INSUFFICIENT_RESOURCES, 168 VIDEODECODERERROR_INSUFFICIENT_RESOURCES,
169 VIDEODECODERERROR_HARDWARE, 169 VIDEODECODERERROR_HARDWARE,
170 VIDEODECODERERROR_UNEXPECTED_FLUSH, 170 VIDEODECODERERROR_UNEXPECTED_FLUSH,
171 }; 171 };
172 172
173 // Represents the type of data buffer to be used by the decoder.
174 enum MemoryType {
175 PICTUREBUFFER_MEMORYTYPE_NONE = 0,
176 PICTUREBUFFER_MEMORYTYPE_SYSTEM,
177 PICTUREBUFFER_MEMORYTYPE_GL_TEXTURE,
178 };
Ville-Mikko Rautio 2011/05/17 08:58:49 See the comment in pp_video_dev.h
179
180 // Interface for collaborating with picture interface to provide memory for 173 // Interface for collaborating with picture interface to provide memory for
181 // output picture and blitting them. 174 // output picture and blitting them.
182 // This interface is extended by the various layers that relay messages back 175 // This interface is extended by the various layers that relay messages back
183 // to the plugin, through the PPP_VideoDecode_Dev interface the plugin 176 // to the plugin, through the PPP_VideoDecode_Dev interface the plugin
184 // implements. 177 // implements.
185 class Client { 178 class Client {
186 public: 179 public:
187 virtual ~Client() {} 180 virtual ~Client() {}
188 181
189 // Callback to tell the information needed by the client to provide decoding 182 // Callback to tell client how many and what size of buffers to provide.
190 // buffer to the decoder.
191 virtual void ProvidePictureBuffers( 183 virtual void ProvidePictureBuffers(
192 uint32 requested_num_of_buffers, 184 uint32 requested_num_of_buffers, const gfx::Size& dimensions) = 0;
193 const gfx::Size& dimensions,
194 MemoryType type) = 0;
195 185
196 // Callback to dismiss picture buffer that was assigned earlier. 186 // Callback to dismiss picture buffer that was assigned earlier.
197 virtual void DismissPictureBuffer(int32 picture_buffer_id) = 0; 187 virtual void DismissPictureBuffer(int32 picture_buffer_id) = 0;
198 188
199 // Callback to deliver decoded pictures ready to be displayed. 189 // Callback to deliver decoded pictures ready to be displayed.
200 virtual void PictureReady(const Picture& picture) = 0; 190 virtual void PictureReady(const Picture& picture) = 0;
201 191
202 // Callback to notify that decoder has decoded end of stream marker and has 192 // Callback to notify that decoder has decoded end of stream marker and has
203 // outputted all displayable pictures. 193 // outputted all displayable pictures.
204 virtual void NotifyEndOfStream() = 0; 194 virtual void NotifyEndOfStream() = 0;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 // been finished. After abort all buffers can be considered dismissed, even 270 // been finished. After abort all buffers can be considered dismissed, even
281 // when there has not been callbacks to dismiss them. 271 // when there has not been callbacks to dismiss them.
282 // 272 //
283 // Returns true when command successfully accepted. Otherwise false. 273 // Returns true when command successfully accepted. Otherwise false.
284 virtual bool Abort() = 0; 274 virtual bool Abort() = 0;
285 }; 275 };
286 276
287 } // namespace media 277 } // namespace media
288 278
289 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 279 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698