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

Unified Diff: media/filters/vpx_video_decoder.h

Issue 1869303004: media: Implement zero-copy video playback for VP8. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: optimize only VP8 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/base/video_frame.cc ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vpx_video_decoder.h
diff --git a/media/filters/vpx_video_decoder.h b/media/filters/vpx_video_decoder.h
index 5b0e5c03a6f4b10ec750c6d4bb36e6b8d9bb83f5..978e824d3ecab03c6204a61e23042c86aedf399a 100644
--- a/media/filters/vpx_video_decoder.h
+++ b/media/filters/vpx_video_decoder.h
@@ -22,6 +22,7 @@ class SingleThreadTaskRunner;
}
namespace media {
+class GpuMemoryBufferVideoFramePool;
// Libvpx video decoder wrapper.
// Note: VpxVideoDecoder accepts only YV12A VP8 content or VP9 content. This is
@@ -33,6 +34,8 @@ namespace media {
class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder {
public:
VpxVideoDecoder();
+ explicit VpxVideoDecoder(
+ std::unique_ptr<GpuMemoryBufferVideoFramePool> gpu_video_frame_pool);
~VpxVideoDecoder() override;
// VideoDecoder implementation.
@@ -74,6 +77,7 @@ class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder {
scoped_refptr<VideoFrame>* video_frame);
bool CopyVpxImageToVideoFrame(const struct vpx_image* vpx_image,
+ const scoped_refptr<DecoderBuffer>& buffer,
scoped_refptr<VideoFrame>* video_frame);
base::ThreadChecker thread_checker_;
@@ -98,7 +102,7 @@ class MEDIA_EXPORT VpxVideoDecoder : public VideoDecoder {
// we share a per-process thread to avoid overly long blocks.
scoped_refptr<base::SingleThreadTaskRunner> offload_task_runner_;
- VideoFramePool frame_pool_;
+ std::unique_ptr<GpuMemoryBufferVideoFramePool> gpu_video_frame_pool_;
DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder);
};
« no previous file with comments | « media/base/video_frame.cc ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698