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

Unified Diff: chromecast/media/base/video_plane_controller.h

Issue 1531543002: [Chromecast] Adding pause/resume operations to VideoPlaneController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just rebase of Patch Set 6. Created 4 years, 11 months 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/base/video_plane_controller.h
diff --git a/chromecast/media/base/video_plane_controller.h b/chromecast/media/base/video_plane_controller.h
index 74f91eb5532761cebfc9cb9ebcb514a95fc8a3d3..4c0f53bc67206c1e788e4baa4a9034b31656b734 100644
--- a/chromecast/media/base/video_plane_controller.h
+++ b/chromecast/media/base/video_plane_controller.h
@@ -59,6 +59,17 @@ class VideoPlaneController {
// no-op.
void SetGraphicsPlaneResolution(const Size& resolution);
+ // After Pause is called, no further calls to VideoPlane::SetGeometry will be
+ // made except for any pending calls already scheduled on the media thread.
halliwell 2016/01/12 03:25:07 Technically, doesn't this mean we're not implement
esum 2016/01/12 04:51:47 Ah, so I wasn't sure if this was worth the extra c
halliwell 2016/01/12 15:40:38 It is implementation-dependent, yes. I don't thin
esum 2016/01/15 23:02:28 Done.
+ // The Set methods will however update cached parameters that will take
+ // effect once the class is resumed. Safe to call multiple times.
+ void Pause();
+ // Makes class active again. Also resets the video plane by posting a call to
+ // VideoPlane::SetGeometry with most recent resolution and geometry parameters
+ // (assuming they are all set). Safe to call multiple times.
+ void Resume();
+ bool is_paused() const;
+
private:
class RateLimitedSetVideoPlaneGeometry;
friend struct base::DefaultSingletonTraits<VideoPlaneController>;
@@ -74,6 +85,8 @@ class VideoPlaneController {
// VideoPlane::SetGeometry.
bool HaveDataForSetGeometry() const;
+ bool is_paused_;
+
// Current resolutions
bool have_output_res_;
bool have_graphics_res_;

Powered by Google App Engine
This is Rietveld 408576698