| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 VideoDecodeAccelerator | 5 // This file contains an implementation of VideoDecodeAccelerator |
| 6 // that utilizes hardware video decoders, which expose Video4Linux 2 API | 6 // that utilizes hardware video decoders, which expose Video4Linux 2 API |
| 7 // (http://linuxtv.org/downloads/v4l-dvb-apis/). | 7 // (http://linuxtv.org/downloads/v4l-dvb-apis/). |
| 8 | 8 |
| 9 #ifndef MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 9 #ifndef MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
| 10 #define MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 10 #define MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 // Input fds of the processor. Exported from the decoder. | 195 // Input fds of the processor. Exported from the decoder. |
| 196 std::vector<base::ScopedFD> processor_input_fds; | 196 std::vector<base::ScopedFD> processor_input_fds; |
| 197 // Output fds of the processor. Used only when OutputMode is IMPORT. | 197 // Output fds of the processor. Used only when OutputMode is IMPORT. |
| 198 std::vector<base::ScopedFD> processor_output_fds; | 198 std::vector<base::ScopedFD> processor_output_fds; |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 // | 201 // |
| 202 // Decoding tasks, to be run on decode_thread_. | 202 // Decoding tasks, to be run on decode_thread_. |
| 203 // | 203 // |
| 204 | 204 |
| 205 // Task to finish initialization on decoder_thread_. |
| 206 void InitializeTask(); |
| 207 |
| 205 // Enqueue a BitstreamBuffer to decode. This will enqueue a buffer to the | 208 // Enqueue a BitstreamBuffer to decode. This will enqueue a buffer to the |
| 206 // decoder_input_queue_, then queue a DecodeBufferTask() to actually decode | 209 // decoder_input_queue_, then queue a DecodeBufferTask() to actually decode |
| 207 // the buffer. | 210 // the buffer. |
| 208 void DecodeTask(const BitstreamBuffer& bitstream_buffer); | 211 void DecodeTask(const BitstreamBuffer& bitstream_buffer); |
| 209 | 212 |
| 210 // Decode from the buffers queued in decoder_input_queue_. Calls | 213 // Decode from the buffers queued in decoder_input_queue_. Calls |
| 211 // DecodeBufferInitial() or DecodeBufferContinue() as appropriate. | 214 // DecodeBufferInitial() or DecodeBufferContinue() as appropriate. |
| 212 void DecodeBufferTask(); | 215 void DecodeBufferTask(); |
| 213 // Advance to the next fragment that begins a frame. | 216 // Advance to the next fragment that begins a frame. |
| 214 bool AdvanceFrameFragment(const uint8_t* data, size_t size, size_t* endpos); | 217 bool AdvanceFrameFragment(const uint8_t* data, size_t size, size_t* endpos); |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 | 579 |
| 577 // The WeakPtrFactory for |weak_this_|. | 580 // The WeakPtrFactory for |weak_this_|. |
| 578 base::WeakPtrFactory<V4L2VideoDecodeAccelerator> weak_this_factory_; | 581 base::WeakPtrFactory<V4L2VideoDecodeAccelerator> weak_this_factory_; |
| 579 | 582 |
| 580 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); | 583 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); |
| 581 }; | 584 }; |
| 582 | 585 |
| 583 } // namespace media | 586 } // namespace media |
| 584 | 587 |
| 585 #endif // MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 588 #endif // MEDIA_GPU_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |