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

Side by Side Diff: ppapi/cpp/video_decoder.h

Issue 390213002: Pepper: Change PPB_VideoDecoder::Reset behavior so plugin always manages textures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « ppapi/c/ppb_video_decoder.h ('k') | ppapi/examples/video_decode/video_decode.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 PPAPI_CPP_VIDEO_DECODER_H_ 5 #ifndef PPAPI_CPP_VIDEO_DECODER_H_
6 #define PPAPI_CPP_VIDEO_DECODER_H_ 6 #define PPAPI_CPP_VIDEO_DECODER_H_
7 7
8 #include "ppapi/c/pp_codecs.h" 8 #include "ppapi/c/pp_codecs.h"
9 #include "ppapi/c/pp_size.h" 9 #include "ppapi/c/pp_size.h"
10 #include "ppapi/cpp/completion_callback.h" 10 #include "ppapi/cpp/completion_callback.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 /// decoder. 142 /// decoder.
143 void RecyclePicture(const PP_VideoPicture& picture); 143 void RecyclePicture(const PP_VideoPicture& picture);
144 144
145 /// Flushes the decoder. The plugin should call Flush() when it reaches the 145 /// Flushes the decoder. The plugin should call Flush() when it reaches the
146 /// end of its video stream in order to stop cleanly. The decoder will run any 146 /// end of its video stream in order to stop cleanly. The decoder will run any
147 /// pending Decode() call to completion. The plugin should make no further 147 /// pending Decode() call to completion. The plugin should make no further
148 /// calls to the decoder other than GetPicture() and RecyclePicture() until 148 /// calls to the decoder other than GetPicture() and RecyclePicture() until
149 /// the decoder signals completion by running |callback|. Just before 149 /// the decoder signals completion by running |callback|. Just before
150 /// completion, any pending GetPicture() call will complete by running its 150 /// completion, any pending GetPicture() call will complete by running its
151 /// callback with result PP_ERROR_ABORTED to signal that no more pictures are 151 /// callback with result PP_ERROR_ABORTED to signal that no more pictures are
152 /// available. The plugin should recycle any pictures it is using before 152 /// available. Any pictures held by the plugin remain valid during and after
153 /// resuming decoding. 153 /// the flush and should be recycled back to the decoder.
154 /// 154 ///
155 /// @param[in] callback A <code>CompletionCallback</code> to be called on 155 /// @param[in] callback A <code>CompletionCallback</code> to be called on
156 /// completion. 156 /// completion.
157 /// 157 ///
158 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. 158 /// @return An int32_t containing an error code from <code>pp_errors.h</code>.
159 /// Returns PP_ERROR_FAILED if the decoder isn't initialized. 159 /// Returns PP_ERROR_FAILED if the decoder isn't initialized.
160 int32_t Flush(const CompletionCallback& callback); 160 int32_t Flush(const CompletionCallback& callback);
161 161
162 /// Resets the decoder as quickly as possible. The plugin can call Reset() to 162 /// Resets the decoder as quickly as possible. The plugin can call Reset() to
163 /// skip to another position in the video stream. After Reset() returns, any 163 /// skip to another position in the video stream. After Reset() returns, any
164 /// pending calls to Decode() and GetPicture()) abort, causing their callbacks 164 /// pending calls to Decode() and GetPicture()) abort, causing their callbacks
165 /// to run with PP_ERROR_ABORTED. The plugin should not make further calls to 165 /// to run with PP_ERROR_ABORTED. The plugin should not make further calls to
166 /// the decoder until the decoder signals completion by running |callback|. 166 /// the decoder other than RecyclePicture() until the decoder signals
167 /// The pictures in use by the plugin remain valid until decoding is resumed, 167 /// completion by running |callback|. Any pictures held by the plugin remain
168 /// but need not be recycled. 168 /// valid during and after the reset and should be recycled back to the
169 /// decoder.
169 /// 170 ///
170 /// @param[in] callback A <code>CompletionCallback</code> to be called on 171 /// @param[in] callback A <code>CompletionCallback</code> to be called on
171 /// completion. 172 /// completion.
172 /// 173 ///
173 /// @return An int32_t containing an error code from <code>pp_errors.h</code>. 174 /// @return An int32_t containing an error code from <code>pp_errors.h</code>.
174 /// Returns PP_ERROR_FAILED if the decoder isn't initialized. 175 /// Returns PP_ERROR_FAILED if the decoder isn't initialized.
175 int32_t Reset(const CompletionCallback& callback); 176 int32_t Reset(const CompletionCallback& callback);
176 }; 177 };
177 178
178 } // namespace pp 179 } // namespace pp
179 180
180 #endif // PPAPI_CPP_VIDEO_DECODER_H_ 181 #endif // PPAPI_CPP_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « ppapi/c/ppb_video_decoder.h ('k') | ppapi/examples/video_decode/video_decode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698