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

Side by Side Diff: media/video/hybrid_video_frame_pool.h

Issue 1871383003: media: Implement zero-copy video playback for ffmpeg. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
(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_
OLDNEW
« no previous file with comments | « media/video/gpu_memory_buffer_video_frame_pool.cc ('k') | media/video/hybrid_video_frame_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698