OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 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 CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PLANE_H_ | |
6 #define CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PLANE_H_ | |
7 | |
8 #include "base/macros.h" | |
9 | |
10 namespace gfx { | |
11 class QuadF; | |
12 class Size; | |
13 } | |
14 | |
15 namespace chromecast { | |
16 namespace media { | |
17 | |
18 class VideoPlane { | |
19 public: | |
20 enum CoordinateType { | |
21 // Graphics plane as coordinate type. | |
22 COORDINATE_TYPE_GRAPHICS_PLANE = 0, | |
damienv1
2014/12/13 01:51:00
nit: blank line
gunsch
2014/12/13 02:01:29
Done.
| |
23 // Output display screen as coordinate type. | |
24 COORDINATE_TYPE_SCREEN_RESOLUTION = 1, | |
damienv1
2014/12/13 01:51:00
Should be renamed to COORDINATE_TYPE_VIDEO_PLANE_R
gunsch
2014/12/13 02:01:29
Done.
| |
25 }; | |
26 | |
27 public: | |
damienv1
2014/12/13 01:51:00
nit: not needed, already in the public section...
gunsch
2014/12/13 02:01:29
Done.
| |
28 VideoPlane(); | |
29 virtual ~VideoPlane(); | |
30 | |
31 // Gets output screen resolution. | |
32 virtual gfx::Size GetScreenResolution() = 0; | |
damienv1
2014/12/13 01:51:00
Either remove this function (if the intent is to g
gunsch
2014/12/13 02:01:29
Done.
| |
33 | |
34 // Updates the video plane geometry. | |
35 // |quad.p1()| corresponds to the top left of the original video, | |
36 // |quad.p2()| to the top right of the original video, | |
37 // and so on. | |
38 // Depending on the underlying hardware, the exact geometry | |
39 // might not be honored. | |
40 // |coordinate_type| indicates what coordinate type |quad| refers to. | |
41 virtual void SetGeometry(const gfx::QuadF& quad, | |
42 CoordinateType coordinate_type) = 0; | |
43 | |
44 private: | |
45 DISALLOW_COPY_AND_ASSIGN(VideoPlane); | |
46 }; | |
47 | |
48 // Global accessor to the video plane. | |
49 VideoPlane* GetVideoPlane(); | |
50 | |
51 } // namespace media | |
52 } // namespace chromecast | |
53 | |
54 #endif // CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PLANE_H_ | |
OLD | NEW |