OLD | NEW |
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 CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 void OnFilterRemoved(); | 102 void OnFilterRemoved(); |
103 | 103 |
104 // Sets the texture to cleared. | 104 // Sets the texture to cleared. |
105 void SetTextureCleared(const media::Picture& picture); | 105 void SetTextureCleared(const media::Picture& picture); |
106 | 106 |
107 // Helper to bind |image| to the texture specified by |client_texture_id|. | 107 // Helper to bind |image| to the texture specified by |client_texture_id|. |
108 void BindImage(uint32_t client_texture_id, | 108 void BindImage(uint32_t client_texture_id, |
109 uint32_t texture_target, | 109 uint32_t texture_target, |
110 scoped_refptr<gl::GLImage> image); | 110 scoped_refptr<gl::GLImage> image); |
111 | 111 |
| 112 // Helper function to call NotifyError in the |child_task_runner_| thread. |
| 113 void CallOrPostNotifyError(media::VideoDecodeAccelerator::Error error); |
| 114 |
112 // Route ID to communicate with the host. | 115 // Route ID to communicate with the host. |
113 const int32_t host_route_id_; | 116 const int32_t host_route_id_; |
114 | 117 |
115 // Unowned pointer to the underlying GpuCommandBufferStub. |this| is | 118 // Unowned pointer to the underlying GpuCommandBufferStub. |this| is |
116 // registered as a DestuctionObserver of |stub_| and will self-delete when | 119 // registered as a DestuctionObserver of |stub_| and will self-delete when |
117 // |stub_| is destroyed. | 120 // |stub_| is destroyed. |
118 GpuCommandBufferStub* const stub_; | 121 GpuCommandBufferStub* const stub_; |
119 | 122 |
120 // The underlying VideoDecodeAccelerator. | 123 // The underlying VideoDecodeAccelerator. |
121 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; | 124 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 156 |
154 // A map from picture buffer ID to TextureRef that have not been cleared. | 157 // A map from picture buffer ID to TextureRef that have not been cleared. |
155 std::map<int32_t, scoped_refptr<gpu::gles2::TextureRef>> uncleared_textures_; | 158 std::map<int32_t, scoped_refptr<gpu::gles2::TextureRef>> uncleared_textures_; |
156 | 159 |
157 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 160 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
158 }; | 161 }; |
159 | 162 |
160 } // namespace content | 163 } // namespace content |
161 | 164 |
162 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 165 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |