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 // This file contains an implementation of VideoDecoderAccelerator | 5 // This file contains an implementation of VideoDecoderAccelerator |
6 // that utilizes hardware video decoder present on Intel CPUs. | 6 // that utilizes hardware video decoder present on Intel CPUs. |
7 | 7 |
8 #ifndef MEDIA_GPU_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 8 #ifndef MEDIA_GPU_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
9 #define MEDIA_GPU_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 9 #define MEDIA_GPU_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
10 | 10 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 // Helper for Destroy(), doing all the actual work except for deleting self. | 139 // Helper for Destroy(), doing all the actual work except for deleting self. |
140 void Cleanup(); | 140 void Cleanup(); |
141 | 141 |
142 // Get a usable framebuffer configuration for use in binding textures | 142 // Get a usable framebuffer configuration for use in binding textures |
143 // or return false on failure. | 143 // or return false on failure. |
144 bool InitializeFBConfig(); | 144 bool InitializeFBConfig(); |
145 | 145 |
146 // Callback to be executed once we have a |va_surface| to be output and | 146 // Callback to be executed once we have a |va_surface| to be output and |
147 // an available |picture| to use for output. | 147 // an available |picture| to use for output. |
148 // Puts contents of |va_surface| into given |picture|, releases the | 148 // Puts contents of |va_surface| into given |picture|, releases the surface |
149 // surface and passes the resulting picture to client for output. | 149 // and passes the resulting picture to client to output the given |
| 150 // |visible_rect| part of it. |
150 void OutputPicture(const scoped_refptr<VASurface>& va_surface, | 151 void OutputPicture(const scoped_refptr<VASurface>& va_surface, |
151 int32_t input_id, | 152 int32_t input_id, |
| 153 gfx::Rect visible_rect, |
152 VaapiPicture* picture); | 154 VaapiPicture* picture); |
153 | 155 |
154 // Try to OutputPicture() if we have both a ready surface and picture. | 156 // Try to OutputPicture() if we have both a ready surface and picture. |
155 void TryOutputSurface(); | 157 void TryOutputSurface(); |
156 | 158 |
157 // Called when a VASurface is no longer in use by the decoder or is not being | 159 // Called when a VASurface is no longer in use by the decoder or is not being |
158 // synced/waiting to be synced to a picture. Returns it to available surfaces | 160 // synced/waiting to be synced to a picture. Returns it to available surfaces |
159 // pool. | 161 // pool. |
160 void RecycleVASurfaceID(VASurfaceID va_surface_id); | 162 void RecycleVASurfaceID(VASurfaceID va_surface_id); |
161 | 163 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 321 |
320 // The WeakPtrFactory for |weak_this_|. | 322 // The WeakPtrFactory for |weak_this_|. |
321 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; | 323 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; |
322 | 324 |
323 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); | 325 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); |
324 }; | 326 }; |
325 | 327 |
326 } // namespace media | 328 } // namespace media |
327 | 329 |
328 #endif // MEDIA_GPU_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 330 #endif // MEDIA_GPU_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |