OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ | |
6 #define MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/ref_counted.h" | |
10 #include "media/base/video_frame.h" | |
11 | |
12 namespace base { | |
13 class SingleThreadTaskRunner; | |
14 } | |
15 | |
16 namespace media { | |
17 class GpuVideoAcceleratorFactories; | |
18 | |
19 // Interface to a pool of GpuMemoryBuffers that can be used to back VideoFrames. | |
20 // Calling the method MaybeCreateHardwareFrame with a software frame will | |
21 // create and return a VideoFrame containing only mailboxes to the native | |
22 // resources needed to draw. If it's not possible to create an hardware | |
23 // VideoFrame the object passed as parameter will be returned. | |
24 class MEDIA_EXPORT GpuMemoryBufferVideoFramePool { | |
25 public: | |
26 GpuMemoryBufferVideoFramePool( | |
27 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | |
28 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories); | |
29 ~GpuMemoryBufferVideoFramePool(); | |
30 | |
31 scoped_refptr<VideoFrame> MaybeCreateHardwareFrame( | |
DaleCurtis
2015/05/14 00:58:58
Method needs comment.
Daniele Castagna
2015/05/14 17:30:27
Done.
Also rephrased the class comment.
| |
32 const scoped_refptr<VideoFrame>& video_frame); | |
33 | |
34 private: | |
35 class PoolImpl; | |
36 scoped_refptr<PoolImpl> pool_impl_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferVideoFramePool); | |
39 }; | |
40 | |
41 } // namespace media | |
42 | |
43 #endif // MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ | |
OLD | NEW |