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

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

Issue 1816203003: Add an additional VDA::Flush() mode to return all allocated buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 // Sends picture buffers to be reused by the decoder. This needs to be called 200 // Sends picture buffers to be reused by the decoder. This needs to be called
201 // for each buffer that has been processed so that decoder may know onto which 201 // for each buffer that has been processed so that decoder may know onto which
202 // picture buffers it can write the output to. 202 // picture buffers it can write the output to.
203 // 203 //
204 // Parameters: 204 // Parameters:
205 // |picture_buffer_id| id of the picture buffer that is to be reused. 205 // |picture_buffer_id| id of the picture buffer that is to be reused.
206 virtual void ReusePictureBuffer(int32_t picture_buffer_id) = 0; 206 virtual void ReusePictureBuffer(int32_t picture_buffer_id) = 0;
207 207
208 // Flushes the decoder: all pending inputs will be decoded and pictures handed 208 // Flushes the decoder: all pending inputs will be decoded and pictures handed
209 // back to the client, followed by NotifyFlushDone() being called on the 209 // back to the client, followed by NotifyFlushDone() being called on the
210 // client. Can be used to implement "end of stream" notification. 210 // client. If |return_buffers| is true, VDA must return all PictureBuffers it
kcwu 2016/03/22 09:47:42 s/return all PictureBuffers/return all PictureBuff
211 virtual void Flush() = 0; 211 // owns, not only ones containing pictures remaining in the decoder at the
212 // time of this call. To indicate a returned buffer does not contain a decoded
213 // frame, the VDA must set bitstream_buffer_id = -1 in the returned Picture.
214 // Can be used to implement "end of stream" notification.
215 virtual void Flush(bool return_buffers) = 0;
kcwu 2016/03/22 09:47:42 How about move the description of |return_buffers|
212 216
213 // Resets the decoder: all pending inputs are dropped immediately and the 217 // Resets the decoder: all pending inputs are dropped immediately and the
214 // decoder returned to a state ready for further Decode()s, followed by 218 // decoder returned to a state ready for further Decode()s, followed by
215 // NotifyResetDone() being called on the client. Can be used to implement 219 // NotifyResetDone() being called on the client. Can be used to implement
216 // "seek". 220 // "seek".
217 virtual void Reset() = 0; 221 virtual void Reset() = 0;
218 222
219 // Destroys the decoder: all pending inputs are dropped immediately and the 223 // Destroys the decoder: all pending inputs are dropped immediately and the
220 // component is freed. This call may asynchornously free system resources, 224 // component is freed. This call may asynchornously free system resources,
221 // but its client-visible effects are synchronous. After this method returns 225 // but its client-visible effects are synchronous. After this method returns
(...skipping 29 matching lines...) Expand all
251 // Specialize std::default_delete so that scoped_ptr<VideoDecodeAccelerator> 255 // Specialize std::default_delete so that scoped_ptr<VideoDecodeAccelerator>
252 // uses "Destroy()" instead of trying to use the destructor. 256 // uses "Destroy()" instead of trying to use the destructor.
253 template <> 257 template <>
254 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { 258 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> {
255 void operator()(media::VideoDecodeAccelerator* vda) const; 259 void operator()(media::VideoDecodeAccelerator* vda) const;
256 }; 260 };
257 261
258 } // namespace std 262 } // namespace std
259 263
260 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 264 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698