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

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

Issue 1864813002: Tab/Desktop Capture: Use requests instead of timer-based refreshing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@video_refresh_from_sinks
Patch Set: Fix WCVCD unit tests that test resize policies. Created 4 years, 8 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 7e301545c96060202c23eba2e8a2c5ef96809516..057e89459e5f784f1fe71d4ca966bb08a40f6edb 100644
--- a/media/capture/content/screen_capture_device_core.h
+++ b/media/capture/content/screen_capture_device_core.h
@@ -46,6 +46,18 @@ class MEDIA_EXPORT VideoCaptureMachine {
// overloading or under-utilization.
virtual bool IsAutoThrottlingEnabled() const;
+ // Called by ScreenCaptureDeviceCore when it failed to satisfy a "refresh
+ // frame" request by attempting to resurrect the last video frame from the
+ // buffer pool (this is referred to as the "passive" refresh approach). The
+ // failure can happen for a number of reasons (e.g., the oracle decided to
+ // change resolution, or consumers of the last video frame are not yet
+ // finished with it).
+ //
+ // The implementation of this method should consult the oracle, using the
+ // kActiveRefreshRequest event type, to decide whether to initiate a new frame
+ // capture, and then do so if the oracle agrees.
Irfan 2016/04/06 19:53:05 What happens when there is a request from consumer
miu 2016/04/06 22:33:53 Nothing happens. The oracle will decide not to ca
+ virtual void MaybeCaptureForRefresh() = 0;
+
private:
DISALLOW_COPY_AND_ASSIGN(VideoCaptureMachine);
};
@@ -69,6 +81,7 @@ class MEDIA_EXPORT ScreenCaptureDeviceCore
// Asynchronous requests to change ScreenCaptureDeviceCore state.
void AllocateAndStart(const VideoCaptureParams& params,
scoped_ptr<VideoCaptureDevice::Client> client);
+ void RequestRefreshFrame();
void StopAndDeAllocate();
private:

Powered by Google App Engine
This is Rietveld 408576698