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

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: export VideoOverlayFactory Created 4 years, 7 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMECAST_RENDERER_MEDIA_HOLE_FRAME_FACTORY_H_ 5 #ifndef MEDIA_RENDERERS_VIDEO_OVERLAY_FACTORY_H_
6 #define CHROMECAST_RENDERER_MEDIA_HOLE_FRAME_FACTORY_H_ 6 #define MEDIA_RENDERERS_VIDEO_OVERLAY_FACTORY_H_
7 7
8 #include <GLES2/gl2.h> 8 #include <GLES2/gl2.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "gpu/command_buffer/common/mailbox.h" 12 #include "gpu/command_buffer/common/mailbox.h"
13 #include "gpu/command_buffer/common/sync_token.h" 13 #include "gpu/command_buffer/common/sync_token.h"
14 #include "media/base/media_export.h"
14 15
15 namespace gfx { 16 namespace gfx {
16 class Size; 17 class Size;
17 } 18 } // namespace gfx
18 19
19 namespace media { 20 namespace media {
21
20 class GpuVideoAcceleratorFactories; 22 class GpuVideoAcceleratorFactories;
21 class VideoFrame; 23 class VideoFrame;
22 }
23 24
24 namespace chromecast { 25 // Creates video overlay frames - native textures that get turned into
25 namespace media { 26 // transparent holes in the browser compositor using overlay system.
27 // This class must be used on GpuVideoAcceleratorFactories::GetTaskRunner().
halliwell 2016/05/19 15:47:50 This comment seems a little incomplete now this cl
28 class MEDIA_EXPORT VideoOverlayFactory {
29 public:
30 explicit VideoOverlayFactory(
31 ::media::GpuVideoAcceleratorFactories* gpu_factories);
32 ~VideoOverlayFactory();
26 33
27 // Creates VideoFrames for CMA - native textures that get turned into 34 scoped_refptr<::media::VideoFrame> CreateFrame(const gfx::Size& size);
28 // transparent holes in the browser compositor using overlay system.
29 // All calls (including ctor/dtor) must be on media thread.
30 class HoleFrameFactory {
31 public:
32 explicit HoleFrameFactory(
33 ::media::GpuVideoAcceleratorFactories* gpu_factories);
34 ~HoleFrameFactory();
35
36 scoped_refptr<::media::VideoFrame> CreateHoleFrame(const gfx::Size& size);
37 35
38 private: 36 private:
39 ::media::GpuVideoAcceleratorFactories* gpu_factories_; 37 ::media::GpuVideoAcceleratorFactories* gpu_factories_;
40 gpu::Mailbox mailbox_; 38 gpu::Mailbox mailbox_;
41 gpu::SyncToken sync_token_; 39 gpu::SyncToken sync_token_;
42 GLuint texture_; 40 GLuint texture_;
43 GLuint image_id_; 41 GLuint image_id_;
44 42
45 DISALLOW_COPY_AND_ASSIGN(HoleFrameFactory); 43 DISALLOW_COPY_AND_ASSIGN(VideoOverlayFactory);
46 }; 44 };
47 45
48 } // namespace media 46 } // namespace media
49 } // namespace chromecast
50 47
51 #endif // CHROMECAST_RENDERER_MEDIA_HOLE_FRAME_FACTORY_H_ 48 #endif // MEDIA_RENDERERS_VIDEO_OVERLAY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698