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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 virtual ~AVDAPictureBufferManager(); | 42 virtual ~AVDAPictureBufferManager(); |
43 | 43 |
44 // Must be called before anything else. If |surface_view_id| is |kNoSurfaceID| | 44 // Must be called before anything else. If |surface_view_id| is |kNoSurfaceID| |
45 // then a new SurfaceTexture will be returned. Otherwise, the corresponding | 45 // then a new SurfaceTexture will be returned. Otherwise, the corresponding |
46 // SurfaceView will be returned. | 46 // SurfaceView will be returned. |
47 gl::ScopedJavaSurface Initialize(AVDAStateProvider* state_provider, | 47 gl::ScopedJavaSurface Initialize(AVDAStateProvider* state_provider, |
48 int surface_view_id); | 48 int surface_view_id); |
49 | 49 |
50 void Destroy(const PictureBufferMap& buffers); | 50 void Destroy(const PictureBufferMap& buffers); |
51 | 51 |
| 52 gl::ScopedJavaSurface SetSurface(int surface_id); |
| 53 |
52 // Returns the GL texture target that the PictureBuffer textures use. | 54 // Returns the GL texture target that the PictureBuffer textures use. |
53 uint32_t GetTextureTarget() const; | 55 uint32_t GetTextureTarget() const; |
54 | 56 |
55 // Returns the size to use when requesting picture buffers. | 57 // Returns the size to use when requesting picture buffers. |
56 gfx::Size GetPictureBufferSize() const; | 58 gfx::Size GetPictureBufferSize() const; |
57 | 59 |
58 // Sets up |picture_buffer| so that its texture will refer to the image that | 60 // Sets up |picture_buffer| so that its texture will refer to the image that |
59 // is represented by the decoded output buffer at codec_buffer_index. | 61 // is represented by the decoded output buffer at codec_buffer_index. |
60 void UseCodecBufferForPictureBuffer(int32_t codec_buffer_index, | 62 void UseCodecBufferForPictureBuffer(int32_t codec_buffer_index, |
61 const PictureBuffer& picture_buffer); | 63 const PictureBuffer& picture_buffer); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // Picture buffer IDs that are out for display. Stored in order of frames as | 114 // Picture buffer IDs that are out for display. Stored in order of frames as |
113 // they are returned from the decoder. | 115 // they are returned from the decoder. |
114 std::vector<int32_t> pictures_out_for_display_; | 116 std::vector<int32_t> pictures_out_for_display_; |
115 | 117 |
116 DISALLOW_COPY_AND_ASSIGN(AVDAPictureBufferManager); | 118 DISALLOW_COPY_AND_ASSIGN(AVDAPictureBufferManager); |
117 }; | 119 }; |
118 | 120 |
119 } // namespace media | 121 } // namespace media |
120 | 122 |
121 #endif // MEDIA_GPU_AVDA_PICTURE_BUFFER_MANAGER_H_ | 123 #endif // MEDIA_GPU_AVDA_PICTURE_BUFFER_MANAGER_H_ |
OLD | NEW |