Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chromecast / public / video_plane.h
blob890e7a051b8b7c0c5cf2abd22f06cc5784797b58
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
3 // found in the LICENSE file.
5 #ifndef CHROMECAST_PUBLIC_VIDEO_PLANE_H_
6 #define CHROMECAST_PUBLIC_VIDEO_PLANE_H_
8 namespace chromecast {
9 struct RectF;
10 struct Size;
12 namespace media {
14 class VideoPlane {
15 public:
16 // List of possible hardware transforms that can be applied to video.
17 // Rotations are anticlockwise.
18 enum Transform {
19 TRANSFORM_NONE,
20 ROTATE_90,
21 ROTATE_180,
22 ROTATE_270,
23 FLIP_HORIZONTAL,
24 FLIP_VERTICAL,
27 enum CoordinateType {
28 // Graphics plane as coordinate type.
29 COORDINATE_TYPE_GRAPHICS_PLANE = 0,
30 // Output display screen as coordinate type.
31 COORDINATE_TYPE_SCREEN_RESOLUTION = 1,
34 virtual ~VideoPlane() {}
36 // Gets output screen resolution.
37 virtual Size GetScreenResolution() = 0;
39 // Updates the video plane geometry.
40 // |display_rect| specifies the rectangle that the video should occupy.
41 // |coordinate_type| gives the coordinate space of |display_rect|.
42 // |transform| specifies how the video should be transformed within that
43 // rectangle.
44 virtual void SetGeometry(const RectF& display_rect,
45 CoordinateType coordinate_type,
46 Transform transform) = 0;
48 // Notifies VideoPlane that screen resolution has changed.
49 virtual void OnScreenResolutionChanged(const Size& screen_res) = 0;
52 } // namespace media
53 } // namespace chromecast
55 #endif // CHROMECAST_PUBLIC_VIDEO_PLANE_H_