OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 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_BASE_VIDEO_FRAME_POOL_H_ | |
6 #define MEDIA_BASE_VIDEO_FRAME_POOL_H_ | |
7 | |
8 #include "media/base/media_export.h" | |
9 #include "media/base/video_frame.h" | |
10 | |
11 namespace media { | |
12 | |
13 // Simple VideoFrame pool used to avoid unnecessarily allocating and destroying | |
14 // VideoFrame objects. | |
DaleCurtis
2013/12/09 20:48:25
Needs some comments about the lifetime of frames i
acolwell GONE FROM CHROMIUM
2013/12/09 21:42:11
Done.
| |
15 class MEDIA_EXPORT VideoFramePool { | |
16 public: | |
17 VideoFramePool(); | |
18 ~VideoFramePool(); | |
19 | |
20 // Returns a frame from the pool that matches the specified | |
21 // parameters or creates a new frame if no suitable frame exists in | |
22 // the pool. | |
23 scoped_refptr<VideoFrame> CreateFrame(VideoFrame::Format format, | |
24 const gfx::Size& coded_size, | |
25 const gfx::Rect& visible_rect, | |
26 const gfx::Size& natural_size, | |
27 base::TimeDelta timestamp); | |
28 | |
29 private: | |
30 class PoolImpl; | |
31 scoped_refptr<PoolImpl> pool_; | |
32 | |
33 DISALLOW_COPY_AND_ASSIGN(VideoFramePool); | |
34 }; | |
35 | |
36 } // namespace media | |
37 | |
38 #endif // MEDIA_BASE_VIDEO_FRAME_POOL_H_ | |
OLD | NEW |