Upload upstream chromium 120.0.6099.5
[platform/framework/web/chromium-efl.git] / media / renderers / video_overlay_factory.h
1 // Copyright 2015 The Chromium Authors
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 "base/memory/scoped_refptr.h"
9 #include "base/unguessable_token.h"
10 #include "media/base/media_export.h"
11
12 namespace gfx {
13 class Size;
14 }  // namespace gfx
15
16 namespace media {
17
18 class VideoFrame;
19
20 // Creates video overlay frames - native textures that get turned into
21 // transparent holes in the browser compositor using overlay system.
22 class MEDIA_EXPORT VideoOverlayFactory {
23  public:
24   VideoOverlayFactory();
25
26   VideoOverlayFactory(const VideoOverlayFactory&) = delete;
27   VideoOverlayFactory& operator=(const VideoOverlayFactory&) = delete;
28
29   ~VideoOverlayFactory();
30
31   scoped_refptr<::media::VideoFrame> CreateFrame(const gfx::Size& size);
32   const base::UnguessableToken& overlay_plane_id() const {
33     return overlay_plane_id_;
34   }
35
36  private:
37   // |overlay_plane_id_| identifies the instances of VideoOverlayFactory.
38   const base::UnguessableToken overlay_plane_id_;
39 };
40
41 }  // namespace media
42
43 #endif  // MEDIA_RENDERERS_VIDEO_OVERLAY_FACTORY_H_