| 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 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "media/gpu/avda_state_provider.h" | 12 #include "media/gpu/avda_state_provider.h" |
| 13 #include "media/gpu/media_gpu_export.h" | 13 #include "media/gpu/media_gpu_export.h" |
| 14 #include "media/gpu/surface_texture_gl_owner.h" |
| 14 | 15 |
| 15 namespace gpu { | 16 namespace gpu { |
| 16 namespace gles2 { | 17 namespace gles2 { |
| 17 class GLStreamTextureImage; | 18 class GLStreamTextureImage; |
| 18 } | 19 } |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace gl { | 22 namespace gl { |
| 22 class ScopedJavaSurface; | 23 class ScopedJavaSurface; |
| 23 class SurfaceTexture; | 24 class SurfaceTexture; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 gpu::gles2::GLStreamTextureImage* image); | 104 gpu::gles2::GLStreamTextureImage* image); |
| 104 | 105 |
| 105 AVDACodecImage* GetImageForPicture(int picture_buffer_id) const; | 106 AVDACodecImage* GetImageForPicture(int picture_buffer_id) const; |
| 106 | 107 |
| 107 scoped_refptr<AVDASharedState> shared_state_; | 108 scoped_refptr<AVDASharedState> shared_state_; |
| 108 | 109 |
| 109 AVDAStateProvider* const state_provider_; | 110 AVDAStateProvider* const state_provider_; |
| 110 | 111 |
| 111 // The SurfaceTexture to render to. Non-null after Initialize() if | 112 // The SurfaceTexture to render to. Non-null after Initialize() if |
| 112 // we're not rendering to a SurfaceView. | 113 // we're not rendering to a SurfaceView. |
| 113 scoped_refptr<gl::SurfaceTexture> surface_texture_; | 114 scoped_refptr<SurfaceTextureGLOwner> surface_texture_; |
| 114 | 115 |
| 115 MediaCodecBridge* media_codec_; | 116 MediaCodecBridge* media_codec_; |
| 116 | 117 |
| 117 // Picture buffer IDs that are out for display. Stored in order of frames as | 118 // Picture buffer IDs that are out for display. Stored in order of frames as |
| 118 // they are returned from the decoder. | 119 // they are returned from the decoder. |
| 119 std::vector<int32_t> pictures_out_for_display_; | 120 std::vector<int32_t> pictures_out_for_display_; |
| 120 | 121 |
| 121 // Maps a picture buffer id to a AVDACodecImage. | 122 // Maps a picture buffer id to a AVDACodecImage. |
| 122 std::map<int, scoped_refptr<AVDACodecImage>> codec_images_; | 123 std::map<int, scoped_refptr<AVDACodecImage>> codec_images_; |
| 123 | 124 |
| 124 DISALLOW_COPY_AND_ASSIGN(AVDAPictureBufferManager); | 125 DISALLOW_COPY_AND_ASSIGN(AVDAPictureBufferManager); |
| 125 }; | 126 }; |
| 126 | 127 |
| 127 } // namespace media | 128 } // namespace media |
| 128 | 129 |
| 129 #endif // MEDIA_GPU_AVDA_PICTURE_BUFFER_MANAGER_H_ | 130 #endif // MEDIA_GPU_AVDA_PICTURE_BUFFER_MANAGER_H_ |
| OLD | NEW |