| OLD | NEW |
| 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 MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ | 5 #ifndef MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ |
| 6 #define MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ | 6 #define MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "media/base/video_frame.h" | 10 #include "media/base/video_frame.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 GpuVideoAcceleratorFactories* gpu_factories); | 59 GpuVideoAcceleratorFactories* gpu_factories); |
| 60 virtual ~GpuMemoryBufferVideoFramePool(); | 60 virtual ~GpuMemoryBufferVideoFramePool(); |
| 61 | 61 |
| 62 // Create VideoFrameFuture backed by native textures. | 62 // Create VideoFrameFuture backed by native textures. |
| 63 std::unique_ptr<VideoFrameFuture> CreateFrame(VideoPixelFormat format, | 63 std::unique_ptr<VideoFrameFuture> CreateFrame(VideoPixelFormat format, |
| 64 const gfx::Size& coded_size, | 64 const gfx::Size& coded_size, |
| 65 const gfx::Rect& visible_rect, | 65 const gfx::Rect& visible_rect, |
| 66 const gfx::Size& natural_size, | 66 const gfx::Size& natural_size, |
| 67 base::TimeDelta timestamp); | 67 base::TimeDelta timestamp); |
| 68 | 68 |
| 69 enum class Usage { |
| 70 GENERIC, |
| 71 // FFMPEG requires wide padding. |
| 72 FFMPEG, |
| 73 |
| 74 LAST = FFMPEG |
| 75 }; |
| 76 void SetUsage(Usage usage); |
| 77 |
| 69 // The number of output planes to be copied in each iteration. | 78 // The number of output planes to be copied in each iteration. |
| 70 static size_t PlanesPerCopy(VideoPixelFormat format, size_t plane); | 79 static size_t PlanesPerCopy(VideoPixelFormat format, size_t plane); |
| 71 | 80 |
| 72 private: | 81 private: |
| 73 class PoolImpl; | 82 class PoolImpl; |
| 74 scoped_refptr<PoolImpl> pool_impl_; | 83 scoped_refptr<PoolImpl> pool_impl_; |
| 75 | 84 |
| 76 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferVideoFramePool); | 85 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferVideoFramePool); |
| 77 }; | 86 }; |
| 78 | 87 |
| 79 } // namespace media | 88 } // namespace media |
| 80 | 89 |
| 81 #endif // MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ | 90 #endif // MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ |
| OLD | NEW |