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 CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 8 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
9 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 9 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 const media::BitstreamBuffer& bitstream_buffer); | 70 const media::BitstreamBuffer& bitstream_buffer); |
71 | 71 |
72 // Get a new input buffer from the queue and set it up in decoder. This will | 72 // Get a new input buffer from the queue and set it up in decoder. This will |
73 // sleep if no input buffers are available. Return true if a new buffer has | 73 // sleep if no input buffers are available. Return true if a new buffer has |
74 // been set up, false if an early exit has been requested (due to initiated | 74 // been set up, false if an early exit has been requested (due to initiated |
75 // reset/flush/destroy). | 75 // reset/flush/destroy). |
76 bool GetInputBuffer(); | 76 bool GetInputBuffer(); |
77 | 77 |
78 // Signal the client that the current buffer has been read and can be | 78 // Signal the client that the current buffer has been read and can be |
79 // returned. Will also release the mapping. | 79 // returned. Will also release the mapping. |
| 80 void ReturnCurrInputBufferLocked(); |
80 void ReturnCurrInputBuffer(); | 81 void ReturnCurrInputBuffer(); |
81 | 82 |
82 // Get and set up one or more output buffers in the decoder. This will sleep | 83 // Get and set up one or more output buffers in the decoder. This will sleep |
83 // if no buffers are available. Return true if buffers have been set up or | 84 // if no buffers are available. Return true if buffers have been set up or |
84 // false if an early exit has been requested (due to initiated | 85 // false if an early exit has been requested (due to initiated |
85 // reset/flush/destroy). | 86 // reset/flush/destroy). |
86 bool GetOutputBuffers(); | 87 bool GetOutputBuffers(); |
87 | 88 |
88 // Initial decode task: get the decoder to the point in the stream from which | 89 // Initial decode task: get the decoder to the point in the stream from which |
89 // it can start/continue decoding. Does not require output buffers and does | 90 // it can start/continue decoding. Does not require output buffers and does |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 content::VaapiH264Decoder decoder_; | 197 content::VaapiH264Decoder decoder_; |
197 | 198 |
198 // Callback passed to the decoder, which it will use to signal readiness | 199 // Callback passed to the decoder, which it will use to signal readiness |
199 // of an output picture to be displayed. | 200 // of an output picture to be displayed. |
200 void OutputPicCallback(int32 input_id, int32 output_id); | 201 void OutputPicCallback(int32 input_id, int32 output_id); |
201 | 202 |
202 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); | 203 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); |
203 }; | 204 }; |
204 | 205 |
205 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ | 206 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |