OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_HYBRID_VIDEO_FRAME_POOL_H_ |
| 6 #define MEDIA_VIDEO_HYBRID_VIDEO_FRAME_POOL_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "media/video/gpu_memory_buffer_video_frame_pool.h" |
| 10 |
| 11 namespace media { |
| 12 // Interface to a pool of VideoFrames backed by GpuMemoryBuffers/textures/images |
| 13 // or system memory. When |format| is supported by GpuMemoryBuffers, it provides |
| 14 // VideoFrameFuture backed by GpuMemoryBuffers. Otherwise, it provides |
| 15 // VideoFrameFuture backed by system memory. |
| 16 // TODO(dshwang): when GpuMemoryBufferVideoFramePool supports all YUV format, |
| 17 // remove this class. |
| 18 class MEDIA_EXPORT HybridVideoFramePool { |
| 19 public: |
| 20 explicit HybridVideoFramePool( |
| 21 std::unique_ptr<GpuMemoryBufferVideoFramePool> gpu_video_frame_pool); |
| 22 virtual ~HybridVideoFramePool(); |
| 23 |
| 24 // Create VideoFrameFuture backed by native textures or system memory. |
| 25 std::unique_ptr<VideoFrameFuture> CreateFrame(VideoPixelFormat format, |
| 26 const gfx::Size& coded_size, |
| 27 const gfx::Rect& visible_rect, |
| 28 const gfx::Size& natural_size, |
| 29 base::TimeDelta timestamp); |
| 30 |
| 31 private: |
| 32 class PoolImpl; |
| 33 std::unique_ptr<PoolImpl> pool_impl_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(HybridVideoFramePool); |
| 36 }; |
| 37 |
| 38 } // namespace media |
| 39 |
| 40 #endif // MEDIA_VIDEO_HYBRID_VIDEO_FRAME_POOL_H_ |
OLD | NEW |