| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 149 // surface and passes the resulting picture to client for output. | 149 // surface and passes the resulting picture to client for output. |
| 150 void OutputPicture(const scoped_refptr<VASurface>& va_surface, | 150 void OutputPicture(const scoped_refptr<VASurface>& va_surface, |
| 151 int32_t input_id, | 151 int32_t input_id, |
| 152 gfx::Rect visible_rect, |
| 152 VaapiPicture* picture); | 153 VaapiPicture* picture); |
| 153 | 154 |
| 154 // Try to OutputPicture() if we have both a ready surface and picture. | 155 // Try to OutputPicture() if we have both a ready surface and picture. |
| 155 void TryOutputSurface(); | 156 void TryOutputSurface(); |
| 156 | 157 |
| 157 // Called when a VASurface is no longer in use by the decoder or is not being | 158 // 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 | 159 // synced/waiting to be synced to a picture. Returns it to available surfaces |
| 159 // pool. | 160 // pool. |
| 160 void RecycleVASurfaceID(VASurfaceID va_surface_id); | 161 void RecycleVASurfaceID(VASurfaceID va_surface_id); |
| 161 | 162 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 320 |
| 320 // The WeakPtrFactory for |weak_this_|. | 321 // The WeakPtrFactory for |weak_this_|. |
| 321 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; | 322 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; |
| 322 | 323 |
| 323 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); | 324 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); |
| 324 }; | 325 }; |
| 325 | 326 |
| 326 } // namespace media | 327 } // namespace media |
| 327 | 328 |
| 328 #endif // MEDIA_GPU_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 329 #endif // MEDIA_GPU_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |