Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: media/gpu/v4l2_video_decode_accelerator.h

Issue 2530493003: V4L2VDA: do not allocate input buffers in GPU child thread. (Closed)
Patch Set: address Kuang-che's comment Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | media/gpu/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | media/gpu/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698