Chromium Code Reviews| Index: chromecast/media/cma/backend/video_plane.h |
| diff --git a/chromecast/media/cma/backend/video_plane.h b/chromecast/media/cma/backend/video_plane.h |
| index 6938b8d3283b7ed7ae908f9c296d7f97280552ce..f3a9c8c111a5de2c9a42b251ff7cc8b196d81e7f 100644 |
| --- a/chromecast/media/cma/backend/video_plane.h |
| +++ b/chromecast/media/cma/backend/video_plane.h |
| @@ -6,6 +6,7 @@ |
| #define CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PLANE_H_ |
| #include "base/macros.h" |
| +#include "base/memory/singleton.h" |
| namespace gfx { |
| class QuadF; |
| @@ -28,8 +29,10 @@ class VideoPlane { |
| VideoPlane(); |
| virtual ~VideoPlane(); |
| - // Gets video plane resolution. |
| - virtual gfx::Size GetVideoPlaneResolution() = 0; |
| + // Gets output screen resolution. |
| + // TODO(servolk): This needs to be removed, get screen resolution from |
| + // AVSettings instead. |
| + virtual gfx::Size GetScreenResolution() = 0; |
| // Updates the video plane geometry. |
| // |quad.p1()| corresponds to the top left of the original video, |
| @@ -41,10 +44,21 @@ class VideoPlane { |
| virtual void SetGeometry(const gfx::QuadF& quad, |
| CoordinateType coordinate_type) = 0; |
| + // Should be invoked whenever screen resolution changes (e.g. when a device is |
| + // plugged in into a new HDMI port and a new HDMI EDID is received). |
| + // VideoPlane should reposition itself according to the new screen resolution. |
|
gunsch
2014/12/17 22:45:51
can a plane be repositioned from a screen size, or
|
| + virtual void OnScreenResolutionChanged(const gfx::Size& screen_res) = 0; |
| + |
| private: |
| DISALLOW_COPY_AND_ASSIGN(VideoPlane); |
| }; |
| +class VideoPlaneFactory { |
| +public: |
| + // Platform-specific video plane factory |
| + static scoped_ptr<VideoPlane> CreatePlatformVideoPlane(); |
| +}; |
| + |
| // Global accessor to the video plane. |
| VideoPlane* GetVideoPlane(); |