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

Side by Side Diff: content/common/gpu/media/vaapi_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 (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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 public: 50 public:
51 class VaapiDecodeSurface; 51 class VaapiDecodeSurface;
52 52
53 VaapiVideoDecodeAccelerator( 53 VaapiVideoDecodeAccelerator(
54 const base::Callback<bool(void)>& make_context_current, 54 const base::Callback<bool(void)>& make_context_current,
55 const base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)>& 55 const base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)>&
56 bind_image); 56 bind_image);
57 ~VaapiVideoDecodeAccelerator() override; 57 ~VaapiVideoDecodeAccelerator() override;
58 58
59 // media::VideoDecodeAccelerator implementation. 59 // media::VideoDecodeAccelerator implementation.
60 bool Initialize(media::VideoCodecProfile profile, Client* client) override; 60 bool Initialize(
61 media::VideoCodecProfile profile,
62 uint32 min_picture_count,
63 Client* client) override;
61 void Decode(const media::BitstreamBuffer& bitstream_buffer) override; 64 void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
62 void AssignPictureBuffers( 65 void AssignPictureBuffers(
63 const std::vector<media::PictureBuffer>& buffers) override; 66 const std::vector<media::PictureBuffer>& buffers) override;
64 void ReusePictureBuffer(int32 picture_buffer_id) override; 67 void ReusePictureBuffer(int32 picture_buffer_id) override;
65 void Flush() override; 68 void Flush() override;
66 void Reset() override; 69 void Reset() override;
67 void Destroy() override; 70 void Destroy() override;
68 bool CanDecodeOnIOThread() override; 71 bool CanDecodeOnIOThread() override;
69 72
70 static media::VideoDecodeAccelerator::SupportedProfiles 73 static media::VideoDecodeAccelerator::SupportedProfiles
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 bool finish_flush_pending_; 295 bool finish_flush_pending_;
293 296
294 // Decoder requested a new surface set and we are waiting for all the surfaces 297 // Decoder requested a new surface set and we are waiting for all the surfaces
295 // to be returned before we can free them. 298 // to be returned before we can free them.
296 bool awaiting_va_surfaces_recycle_; 299 bool awaiting_va_surfaces_recycle_;
297 300
298 // Last requested number/resolution of output picture buffers. 301 // Last requested number/resolution of output picture buffers.
299 size_t requested_num_pics_; 302 size_t requested_num_pics_;
300 gfx::Size requested_pic_size_; 303 gfx::Size requested_pic_size_;
301 304
305 // The minimum picture buffer count to allocate.
306 uint32 min_picture_count_;
307
302 // Binds the provided GLImage to a givenr client texture ID & texture target 308 // Binds the provided GLImage to a givenr client texture ID & texture target
303 // combination in GLES. 309 // combination in GLES.
304 base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)> bind_image_; 310 base::Callback<void(uint32, uint32, scoped_refptr<gfx::GLImage>)> bind_image_;
305 311
306 // The WeakPtrFactory for |weak_this_|. 312 // The WeakPtrFactory for |weak_this_|.
307 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_; 313 base::WeakPtrFactory<VaapiVideoDecodeAccelerator> weak_this_factory_;
308 314
309 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator); 315 DISALLOW_COPY_AND_ASSIGN(VaapiVideoDecodeAccelerator);
310 }; 316 };
311 317
312 } // namespace content 318 } // namespace content
313 319
314 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_ 320 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698