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

Unified Diff: media/capture/video/video_capture_device.h

Issue 2365223002: Video Capture: Allow suspension of individual devices. (Closed)
Patch Set: REBASE, and clean-ups+tests suggested by chfremer@. 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
« media/base/video_capturer_source.h ('K') | « media/base/video_capturer_source.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/video/video_capture_device.h
diff --git a/media/capture/video/video_capture_device.h b/media/capture/video/video_capture_device.h
index cbdc8adde4c6e44dd2d764957a6873c267d02109..ae6565f4422c6ea3c26b37b78f10a307958176cb 100644
--- a/media/capture/video/video_capture_device.h
+++ b/media/capture/video/video_capture_device.h
@@ -167,6 +167,15 @@ class CAPTURE_EXPORT VideoCaptureDevice {
// reasonable attempts to honor these requests.
virtual void RequestRefreshFrame() {}
+ // Optionally suspends frame delivery. The VideoCaptureDevice may or may not
+ // honor this request. The purpose of this is to quickly place the device into
+ // a state where it's resource utilization is minimized while there are no
+ // frame consumers; and then quickly resume once a frame consumer is present.
+ virtual void MaybeSuspend() {}
mcasas 2016/09/28 21:34:44 Could we say here MaybePause()? It would sound to
+
+ // Resumes frame delivery, if it was suspended.
+ virtual void Resume() {}
+
// Deallocates the video capturer, possibly asynchronously.
//
// This call requires the device to do the following things, eventually: put
« media/base/video_capturer_source.h ('K') | « media/base/video_capturer_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698