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

Unified Diff: media/renderers/video_overlay_factory.h

Issue 1873513003: Add video-rendering to mojo media pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments 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
Index: media/renderers/video_overlay_factory.h
diff --git a/media/renderers/video_overlay_factory.h b/media/renderers/video_overlay_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..19e5e4fbca4623a32c33b3904c3a9e15e3d8e802
--- /dev/null
+++ b/media/renderers/video_overlay_factory.h
@@ -0,0 +1,45 @@
+// 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_RENDERERS_VIDEO_OVERLAY_FACTORY_H_
+#define MEDIA_RENDERERS_VIDEO_OVERLAY_FACTORY_H_
+
+#include <GLES2/gl2.h>
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "gpu/command_buffer/common/mailbox.h"
+#include "gpu/command_buffer/common/sync_token.h"
+
+namespace gfx {
+class Size;
+} // namespace gfx
+
+namespace media {
+class GpuVideoAcceleratorFactories;
+class VideoFrame;
+
+// Creates video overlay frame - native textures that get turned into
+// transparent quads in the browser compositor using overlay system.
+// This class must be used on GpuVideoAcceleratorFactories::GetTaskRunner().
+class VideoOverlayFactory {
+ public:
+ explicit VideoOverlayFactory(GpuVideoAcceleratorFactories* gpu_factories);
+ ~VideoOverlayFactory();
+
+ scoped_refptr<VideoFrame> CreateFrame(const gfx::Size& size);
+
+ private:
+ GpuVideoAcceleratorFactories* gpu_factories_;
+ gpu::Mailbox mailbox_;
+ gpu::SyncToken sync_token_;
+ GLuint texture_;
+ GLuint image_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(VideoOverlayFactory);
+};
+
+} // namespace media
+
+#endif // MEDIA_RENDERERS_VIDEO_OVERLAY_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698