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 a class that provides H264 decode | 5 // This file contains an implementation of a class that provides H264 decode |
6 // support for use with VAAPI hardware video decode acceleration on Intel | 6 // support for use with VAAPI hardware video decode acceleration on Intel |
7 // systems. | 7 // systems. |
8 | 8 |
9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_H264_DECODER_H_ | 9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_H264_DECODER_H_ |
10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_H264_DECODER_H_ | 10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_H264_DECODER_H_ |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // Convert VideoCodecProfile to VAProfile and set it as active. | 204 // Convert VideoCodecProfile to VAProfile and set it as active. |
205 bool SetProfile(media::VideoCodecProfile profile); | 205 bool SetProfile(media::VideoCodecProfile profile); |
206 | 206 |
207 // Vaapi-related functions. | 207 // Vaapi-related functions. |
208 | 208 |
209 // Allocates VASurfaces and creates a VAContext for them. | 209 // Allocates VASurfaces and creates a VAContext for them. |
210 bool CreateVASurfaces(); | 210 bool CreateVASurfaces(); |
211 | 211 |
212 // Destroys allocated VASurfaces and related VAContext. | 212 // Destroys allocated VASurfaces and related VAContext. |
213 void DestroyVASurfaces(); | 213 void DestroyVASurfaces(); |
| 214 // Destroys a list of buffers. |
| 215 void DestroyBuffers(VABufferID* va_buffers, size_t num_va_buffers); |
| 216 // Destroys all buffers in |pending_slice_bufs_| and |pending_va_bufs_|. |
| 217 void DestroyPendingBuffers(); |
214 | 218 |
215 // These queue up data for HW decoder to be committed on running HW decode. | 219 // These queue up data for HW decoder to be committed on running HW decode. |
216 bool SendPPS(); | 220 bool SendPPS(); |
217 bool SendIQMatrix(); | 221 bool SendIQMatrix(); |
218 bool SendVASliceParam(H264SliceHeader* slice_hdr); | 222 bool SendVASliceParam(H264SliceHeader* slice_hdr); |
219 bool SendSliceData(const uint8* ptr, size_t size); | 223 bool SendSliceData(const uint8* ptr, size_t size); |
220 bool QueueSlice(H264SliceHeader* slice_hdr); | 224 bool QueueSlice(H264SliceHeader* slice_hdr); |
221 | 225 |
222 // Helper methods for filling HW structures. | 226 // Helper methods for filling HW structures. |
223 void FillVAPicture(VAPictureH264 *va_pic, H264Picture* pic); | 227 void FillVAPicture(VAPictureH264 *va_pic, H264Picture* pic); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 332 |
329 // Called by decoder when a picture should be outputted. | 333 // Called by decoder when a picture should be outputted. |
330 OutputPicCB output_pic_cb_; | 334 OutputPicCB output_pic_cb_; |
331 | 335 |
332 DISALLOW_COPY_AND_ASSIGN(VaapiH264Decoder); | 336 DISALLOW_COPY_AND_ASSIGN(VaapiH264Decoder); |
333 }; | 337 }; |
334 | 338 |
335 } // namespace content | 339 } // namespace content |
336 | 340 |
337 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_H264_DECODER_H_ | 341 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_H264_DECODER_H_ |
OLD | NEW |