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

Side by Side Diff: media/mojo/services/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: minor cleanup 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_MOJO_SERVICES_VIDEO_OVERLAY_FACTORY_H_
6 #define CHROMECAST_RENDERER_MEDIA_HOLE_FRAME_FACTORY_H_ 6 #define MEDIA_MOJO_SERVICES_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 14
15 namespace gfx { 15 namespace gfx {
16 class Size; 16 class Size;
17 } 17 }
18 18
19 namespace media { 19 namespace media {
20 class GpuVideoAcceleratorFactories; 20 class GpuVideoAcceleratorFactories;
21 class VideoFrame; 21 class VideoFrame;
22 } 22 }
23 23
24 namespace chromecast {
25 namespace media { 24 namespace media {
26 25
27 // Creates VideoFrames for CMA - native textures that get turned into 26 // Creates video overlay frame - native textures that get turned into
28 // transparent holes in the browser compositor using overlay system. 27 // transparent quads in the browser compositor using overlay system.
29 // All calls (including ctor/dtor) must be on media thread. 28 // All calls (including ctor/dtor) must be on media thread.
xhwang 2016/04/12 19:40:37 Can you check this condition using thread checker
alokp 2016/04/19 00:16:08 Done.
30 class HoleFrameFactory { 29 class VideoOverlayFactory {
xhwang 2016/04/12 19:40:37 This has nothing to do with mojo and should probab
alokp 2016/04/19 00:16:08 Done.
31 public: 30 public:
32 explicit HoleFrameFactory( 31 explicit VideoOverlayFactory(
33 ::media::GpuVideoAcceleratorFactories* gpu_factories); 32 ::media::GpuVideoAcceleratorFactories* gpu_factories);
34 ~HoleFrameFactory(); 33 ~VideoOverlayFactory();
35 34
36 scoped_refptr<::media::VideoFrame> CreateHoleFrame(const gfx::Size& size); 35 scoped_refptr<::media::VideoFrame> CreateFrame(const gfx::Size& size);
37 36
38 private: 37 private:
39 ::media::GpuVideoAcceleratorFactories* gpu_factories_; 38 ::media::GpuVideoAcceleratorFactories* gpu_factories_;
40 gpu::Mailbox mailbox_; 39 gpu::Mailbox mailbox_;
41 gpu::SyncToken sync_token_; 40 gpu::SyncToken sync_token_;
42 GLuint texture_; 41 GLuint texture_;
43 GLuint image_id_; 42 GLuint image_id_;
44 43
45 DISALLOW_COPY_AND_ASSIGN(HoleFrameFactory); 44 DISALLOW_COPY_AND_ASSIGN(VideoOverlayFactory);
46 }; 45 };
47 46
48 } // namespace media 47 } // namespace media
49 } // namespace chromecast
50 48
51 #endif // CHROMECAST_RENDERER_MEDIA_HOLE_FRAME_FACTORY_H_ 49 #endif // MEDIA_MOJO_SERVICES_VIDEO_OVERLAY_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698