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

Side by Side 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 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_RENDERERS_VIDEO_OVERLAY_FACTORY_H_
6 #define MEDIA_RENDERERS_VIDEO_OVERLAY_FACTORY_H_
7
8 #include <GLES2/gl2.h>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "gpu/command_buffer/common/mailbox.h"
13 #include "gpu/command_buffer/common/sync_token.h"
14
15 namespace gfx {
16 class Size;
17 } // namespace gfx
18
19 namespace media {
20 class GpuVideoAcceleratorFactories;
21 class VideoFrame;
22
23 // Creates video overlay frame - native textures that get turned into
24 // transparent quads in the browser compositor using overlay system.
25 // This class must be used on GpuVideoAcceleratorFactories::GetTaskRunner().
26 class VideoOverlayFactory {
27 public:
28 explicit VideoOverlayFactory(GpuVideoAcceleratorFactories* gpu_factories);
29 ~VideoOverlayFactory();
30
31 scoped_refptr<VideoFrame> CreateFrame(const gfx::Size& size);
32
33 private:
34 GpuVideoAcceleratorFactories* gpu_factories_;
35 gpu::Mailbox mailbox_;
36 gpu::SyncToken sync_token_;
37 GLuint texture_;
38 GLuint image_id_;
39
40 DISALLOW_COPY_AND_ASSIGN(VideoOverlayFactory);
41 };
42
43 } // namespace media
44
45 #endif // MEDIA_RENDERERS_VIDEO_OVERLAY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698