Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4605)

Unified Diff: chromecast/media/cma/backend/video_plane.h

Issue 809173002: Chromecast: Add a way to notify video plane about resolution changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
« no previous file with comments | « no previous file | chromecast/media/cma/backend/video_plane.cc » ('j') | chromecast/media/cma/backend/video_plane.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698