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

Unified Diff: media/capture/content/screen_capture_device_core.h

Issue 2364413002: Screen Video Capture: Implement suspend optimization. (Closed)
Patch Set: Unwind ScreenCaptureMachineAndroid changes. Created 4 years, 3 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: media/capture/content/screen_capture_device_core.h
diff --git a/media/capture/content/screen_capture_device_core.h b/media/capture/content/screen_capture_device_core.h
index 3f8884b3c857c8fd9f87fbe21d94a0eb7f1b7ffa..c965043e4820f3f9d79cbe66448b3e6aeef2b209 100644
--- a/media/capture/content/screen_capture_device_core.h
+++ b/media/capture/content/screen_capture_device_core.h
@@ -37,6 +37,10 @@ class CAPTURE_EXPORT VideoCaptureMachine {
const VideoCaptureParams& params,
const base::Callback<void(bool)> callback) = 0;
+ // Suspend/Resume frame delivery. Implementations of these are optional.
+ virtual void Suspend() {}
+ virtual void Resume() {}
+
// Stops capturing.
// |callback| is invoked after the capturing has stopped.
virtual void Stop(const base::Closure& callback) = 0;
@@ -82,11 +86,13 @@ class CAPTURE_EXPORT ScreenCaptureDeviceCore
void AllocateAndStart(const VideoCaptureParams& params,
std::unique_ptr<VideoCaptureDevice::Client> client);
void RequestRefreshFrame();
+ void Suspend();
+ void Resume();
void StopAndDeAllocate();
private:
// Flag indicating current state.
- enum State { kIdle, kCapturing, kError, kLastCaptureState };
+ enum State { kIdle, kCapturing, kSuspended, kError, kLastCaptureState };
void TransitionStateTo(State next_state);

Powered by Google App Engine
This is Rietveld 408576698