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, |
| 23 |
| 24 // Output video plane as coordinate type. |
| 25 COORDINATE_TYPE_VIDEO_PLANE_RESOLUTION = 1, |
| 26 }; |
| 27 |
| 28 VideoPlane(); |
| 29 virtual ~VideoPlane(); |
| 30 |
| 31 // Gets video plane resolution. |
| 32 virtual gfx::Size GetVideoPlaneResolution() = 0; |
| 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 |