Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_GPU_AVDA_PICTURE_BUFFER_MANAGER_H_ | 5 #ifndef MEDIA_GPU_AVDA_PICTURE_BUFFER_MANAGER_H_ |
| 6 #define MEDIA_GPU_AVDA_PICTURE_BUFFER_MANAGER_H_ | 6 #define MEDIA_GPU_AVDA_PICTURE_BUFFER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 explicit AVDAPictureBufferManager(AVDAStateProvider* state_provider); | 43 explicit AVDAPictureBufferManager(AVDAStateProvider* state_provider); |
| 44 virtual ~AVDAPictureBufferManager(); | 44 virtual ~AVDAPictureBufferManager(); |
| 45 | 45 |
| 46 // Must be called before anything else. If |surface_id| is |kNoSurfaceID| | 46 // Must be called before anything else. If |surface_id| is |kNoSurfaceID| |
| 47 // then a new SurfaceTexture will be returned. Otherwise, the corresponding | 47 // then a new SurfaceTexture will be returned. Otherwise, the corresponding |
| 48 // SurfaceView will be returned. | 48 // SurfaceView will be returned. |
| 49 // | 49 // |
| 50 // May be called multiple times to switch to a new |surface_id|. Picture | 50 // May be called multiple times to switch to a new |surface_id|. Picture |
| 51 // buffers will be updated to use the new surface during the call to | 51 // buffers will be updated to use the new surface during the call to |
| 52 // UseCodecBufferForPictureBuffer(). | 52 // UseCodecBufferForPictureBuffer(). |
| 53 gl::ScopedJavaSurface Initialize(int surface_id); | 53 // TODO(liberato); update comment. |
|
watk
2017/03/10 02:19:44
Leaving a reminder for this todo :)
liberato (no reviews please)
2017/03/10 17:40:56
thanks, done.
| |
| 54 void InitializeForOverlay(); | |
| 55 gl::ScopedJavaSurface InitializeForSurfaceTexture(); | |
| 54 | 56 |
| 55 void Destroy(const PictureBufferMap& buffers); | 57 void Destroy(const PictureBufferMap& buffers); |
| 56 | 58 |
| 57 // Sets up |picture_buffer| so that its texture will refer to the image that | 59 // Sets up |picture_buffer| so that its texture will refer to the image that |
| 58 // is represented by the decoded output buffer at codec_buffer_index. | 60 // is represented by the decoded output buffer at codec_buffer_index. |
| 59 void UseCodecBufferForPictureBuffer(int32_t codec_buffer_index, | 61 void UseCodecBufferForPictureBuffer(int32_t codec_buffer_index, |
| 60 const PictureBuffer& picture_buffer); | 62 const PictureBuffer& picture_buffer); |
| 61 | 63 |
| 62 // Assigns a picture buffer and attaches an image to its texture. | 64 // Assigns a picture buffer and attaches an image to its texture. |
| 63 void AssignOnePictureBuffer(const PictureBuffer& picture_buffer, | 65 void AssignOnePictureBuffer(const PictureBuffer& picture_buffer, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 | 123 |
| 122 // Maps a picture buffer id to a AVDACodecImage. | 124 // Maps a picture buffer id to a AVDACodecImage. |
| 123 std::map<int, scoped_refptr<AVDACodecImage>> codec_images_; | 125 std::map<int, scoped_refptr<AVDACodecImage>> codec_images_; |
| 124 | 126 |
| 125 DISALLOW_COPY_AND_ASSIGN(AVDAPictureBufferManager); | 127 DISALLOW_COPY_AND_ASSIGN(AVDAPictureBufferManager); |
| 126 }; | 128 }; |
| 127 | 129 |
| 128 } // namespace media | 130 } // namespace media |
| 129 | 131 |
| 130 #endif // MEDIA_GPU_AVDA_PICTURE_BUFFER_MANAGER_H_ | 132 #endif // MEDIA_GPU_AVDA_PICTURE_BUFFER_MANAGER_H_ |
| OLD | NEW |