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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/hybrid_video_frame_pool.h
diff --git a/media/video/hybrid_video_frame_pool.h b/media/video/hybrid_video_frame_pool.h
new file mode 100644
index 0000000000000000000000000000000000000000..ac362e6e3e8ad304c301d37c013fa78d152d4c3f
--- /dev/null
+++ b/media/video/hybrid_video_frame_pool.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_VIDEO_HYBRID_VIDEO_FRAME_POOL_H_
+#define MEDIA_VIDEO_HYBRID_VIDEO_FRAME_POOL_H_
+
+#include "base/macros.h"
+#include "media/video/gpu_memory_buffer_video_frame_pool.h"
+
+namespace media {
+// Interface to a pool of VideoFrames backed by GpuMemoryBuffers/textures/images
+// or system memory. When |format| is supported by GpuMemoryBuffers, it provides
+// VideoFrameFuture backed by GpuMemoryBuffers. Otherwise, it provides
+// VideoFrameFuture backed by system memory.
+// TODO(dshwang): when GpuMemoryBufferVideoFramePool supports all YUV format,
+// remove this class.
+class MEDIA_EXPORT HybridVideoFramePool {
+ public:
+ explicit HybridVideoFramePool(
+ std::unique_ptr<GpuMemoryBufferVideoFramePool> gpu_video_frame_pool);
+ virtual ~HybridVideoFramePool();
+
+ // Create VideoFrameFuture backed by native textures or system memory.
+ std::unique_ptr<VideoFrameFuture> CreateFrame(VideoPixelFormat format,
+ const gfx::Size& coded_size,
+ const gfx::Rect& visible_rect,
+ const gfx::Size& natural_size,
+ base::TimeDelta timestamp);
+
+ private:
+ class PoolImpl;
+ std::unique_ptr<PoolImpl> pool_impl_;
+
+ DISALLOW_COPY_AND_ASSIGN(HybridVideoFramePool);
+};
+
+} // namespace media
+
+#endif // MEDIA_VIDEO_HYBRID_VIDEO_FRAME_POOL_H_
« 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