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

Side by Side Diff: content/common/gpu/media/v4l2_slice_video_decode_accelerator.h

Issue 1207043002: Introduce a client minimum picture pool size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_SLICE_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_SLICE_VIDEO_DECODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_V4L2_SLICE_VIDEO_DECODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_V4L2_SLICE_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <linux/videodev2.h> 8 #include <linux/videodev2.h>
9 #include <queue> 9 #include <queue>
10 #include <vector> 10 #include <vector>
(...skipping 25 matching lines...) Expand all
36 const scoped_refptr<V4L2Device>& device, 36 const scoped_refptr<V4L2Device>& device,
37 EGLDisplay egl_display, 37 EGLDisplay egl_display,
38 EGLContext egl_context, 38 EGLContext egl_context,
39 const base::WeakPtr<Client>& io_client_, 39 const base::WeakPtr<Client>& io_client_,
40 const base::Callback<bool(void)>& make_context_current, 40 const base::Callback<bool(void)>& make_context_current,
41 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); 41 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
42 ~V4L2SliceVideoDecodeAccelerator() override; 42 ~V4L2SliceVideoDecodeAccelerator() override;
43 43
44 // media::VideoDecodeAccelerator implementation. 44 // media::VideoDecodeAccelerator implementation.
45 bool Initialize(media::VideoCodecProfile profile, 45 bool Initialize(media::VideoCodecProfile profile,
46 uint32 min_picture_count,
46 VideoDecodeAccelerator::Client* client) override; 47 VideoDecodeAccelerator::Client* client) override;
47 void Decode(const media::BitstreamBuffer& bitstream_buffer) override; 48 void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
48 void AssignPictureBuffers( 49 void AssignPictureBuffers(
49 const std::vector<media::PictureBuffer>& buffers) override; 50 const std::vector<media::PictureBuffer>& buffers) override;
50 void ReusePictureBuffer(int32 picture_buffer_id) override; 51 void ReusePictureBuffer(int32 picture_buffer_id) override;
51 void Flush() override; 52 void Flush() override;
52 void Reset() override; 53 void Reset() override;
53 void Destroy() override; 54 void Destroy() override;
54 bool CanDecodeOnIOThread() override; 55 bool CanDecodeOnIOThread() override;
55 56
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // Output buffers ready to use. 320 // Output buffers ready to use.
320 std::list<int> free_output_buffers_; 321 std::list<int> free_output_buffers_;
321 // Mapping of int index to an output buffer record. 322 // Mapping of int index to an output buffer record.
322 std::vector<OutputRecord> output_buffer_map_; 323 std::vector<OutputRecord> output_buffer_map_;
323 324
324 media::VideoCodecProfile video_profile_; 325 media::VideoCodecProfile video_profile_;
325 uint32_t output_format_fourcc_; 326 uint32_t output_format_fourcc_;
326 gfx::Size visible_size_; 327 gfx::Size visible_size_;
327 gfx::Size coded_size_; 328 gfx::Size coded_size_;
328 329
330 // Minimum number of picture buffers to allocate.
331 uint32 min_picture_count_;
332
329 struct BitstreamBufferRef; 333 struct BitstreamBufferRef;
330 // Input queue of stream buffers coming from the client. 334 // Input queue of stream buffers coming from the client.
331 std::queue<linked_ptr<BitstreamBufferRef>> decoder_input_queue_; 335 std::queue<linked_ptr<BitstreamBufferRef>> decoder_input_queue_;
332 // BitstreamBuffer currently being processed. 336 // BitstreamBuffer currently being processed.
333 scoped_ptr<BitstreamBufferRef> decoder_current_bitstream_buffer_; 337 scoped_ptr<BitstreamBufferRef> decoder_current_bitstream_buffer_;
334 338
335 // Queue storing decode surfaces ready to be output as soon as they are 339 // Queue storing decode surfaces ready to be output as soon as they are
336 // decoded. The surfaces must be output in order they are queued. 340 // decoded. The surfaces must be output in order they are queued.
337 std::queue<scoped_refptr<V4L2DecodeSurface>> decoder_display_queue_; 341 std::queue<scoped_refptr<V4L2DecodeSurface>> decoder_display_queue_;
338 342
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 392
389 DISALLOW_COPY_AND_ASSIGN(V4L2SliceVideoDecodeAccelerator); 393 DISALLOW_COPY_AND_ASSIGN(V4L2SliceVideoDecodeAccelerator);
390 }; 394 };
391 395
392 class V4L2H264Picture; 396 class V4L2H264Picture;
393 class V4L2VP8Picture; 397 class V4L2VP8Picture;
394 398
395 } // namespace content 399 } // namespace content
396 400
397 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_SLICE_VIDEO_DECODE_ACCELERATOR_H_ 401 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_SLICE_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698