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

Unified Diff: media/base/video_capturer_source.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
Index: media/base/video_capturer_source.h
diff --git a/media/base/video_capturer_source.h b/media/base/video_capturer_source.h
index ddec90c6599b26b564984e0b347d22472b4ca0df..edda400475ec26f01f8311dbef6427b7cb0d26a0 100644
--- a/media/base/video_capturer_source.h
+++ b/media/base/video_capturer_source.h
@@ -86,6 +86,14 @@ class MEDIA_EXPORT VideoCapturerSource {
// successfully, then |new_frame_callback| should be called with a frame.
virtual void RequestRefreshFrame() {}
+ // Optionally suspends frame delivery. The source may or may not honor this
+ // request. The purpose of this is to allow minimizing resource usage while
+ // there are no frame consumers present.
+ virtual void MaybeSuspend() {}
xhwang 2016/09/28 21:09:56 nit: How will the caller know whether it can/shoul
miu 2016/09/28 21:52:14 Added explanation in comments.
+
+ // Resumes frame delivery, if it was suspended.
xhwang 2016/09/28 21:09:56 nit: What if "it was not suspended"? Will it fail,
miu 2016/09/28 21:52:14 Added explanation in comments for this too.
+ virtual void Resume() {}
+
// Stops capturing frames and clears all callbacks including the
// SupportedFormatsCallback callback. Note that queued frame callbacks
// may still occur after this call, so the caller must take care to

Powered by Google App Engine
This is Rietveld 408576698