Chromium Code Reviews| Index: content/common/gpu/media/android_video_decode_accelerator.h |
| diff --git a/content/common/gpu/media/android_video_decode_accelerator.h b/content/common/gpu/media/android_video_decode_accelerator.h |
| index 9e0d8ab9546e02b2818074abe01c6e3af95fb9c9..5c0af106c9b99a66509abece354069046bca1413 100644 |
| --- a/content/common/gpu/media/android_video_decode_accelerator.h |
| +++ b/content/common/gpu/media/android_video_decode_accelerator.h |
| @@ -76,7 +76,8 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator |
| // the decoded output buffer at codec_buffer_index. |
| virtual void UseCodecBufferForPictureBuffer( |
| int32_t codec_buffer_index, |
| - const media::PictureBuffer& picture_buffer) = 0; |
| + const media::PictureBuffer& picture_buffer, |
| + const std::vector<int32_t>& pictures_out_for_display) = 0; |
|
liberato (no reviews please)
2016/04/22 00:51:05
couldn't pictures_out_for_display be an implementa
DaleCurtis
2016/04/22 01:33:58
Great suggestion. Done.
|
| // Notify strategy that a picture buffer has been assigned. |
| virtual void AssignOnePictureBuffer( |
| @@ -85,7 +86,12 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator |
| // Notify strategy that a picture buffer has been reused. |
| virtual void ReuseOnePictureBuffer( |
| - const media::PictureBuffer& picture_buffer) {} |
| + const media::PictureBuffer& picture_buffer, |
| + const std::vector<int32_t>& pictures_out_for_display) {} |
| + |
| + // Attempts to free up codec output buffers by rendering early. |
| + virtual void MaybeRenderEarly( |
| + const std::vector<int32_t>& pictures_out_for_display) {} |
| // Notify strategy that we have a new android MediaCodec instance. This |
| // happens when we're starting up or re-configuring mid-stream. Any |
| @@ -317,6 +323,10 @@ class CONTENT_EXPORT AndroidVideoDecodeAccelerator |
| // decoded frames to the client. |
| std::queue<int32_t> free_picture_ids_; |
| + // Picture buffer IDs that are out for display. Stored in order of frames as |
| + // they are returned from the decoder. |
| + std::vector<int32_t> pictures_out_for_display_; |
| + |
| // The low-level decoder which Android SDK provides. |
| std::unique_ptr<media::VideoCodecBridge> media_codec_; |