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

Unified Diff: content/browser/renderer_host/media/video_capture_manager.h

Issue 615043006: Release the camera when WebRTC is not visible in Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 6 years, 2 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: content/browser/renderer_host/media/video_capture_manager.h
diff --git a/content/browser/renderer_host/media/video_capture_manager.h b/content/browser/renderer_host/media/video_capture_manager.h
index 7f69d56a904ae4c1a7f3d230923d7d4444ce9c0e..74b4d30e9d87f5388d034406654c5b92f159af24 100644
--- a/content/browser/renderer_host/media/video_capture_manager.h
+++ b/content/browser/renderer_host/media/video_capture_manager.h
@@ -84,6 +84,28 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
VideoCaptureControllerEventHandler* client_handler,
bool aborted_due_to_error);
+ // Called by VideoCaptureHost to pause to update video buffer specified by
+ // |client_id| and |client_handler|. If all clients of |controller| are
+ // paused, the corresponding device will be closed.
+ void PauseCaptureForClient(
+ VideoCaptureController* controller,
+ VideoCaptureControllerID client_id,
+ VideoCaptureControllerEventHandler* client_handler);
+
+ // Called by VideoCaptureHost to resume to update video buffer specified by
+ // |client_id| and |client_handler|. The |session_id| and |params| should be
+ // same as those used in StartCaptureForClient().
+ // If this is first active client of |controller|, device will be allocated
+ // and it will take a little time to resume.
+ // Allocating device could failed if other app holds the camera, the error
+ // will be notified through VideoCaptureControllerEventHandler::OnError().
+ void ResumeCaptureForClient(
+ media::VideoCaptureSessionId session_id,
+ const media::VideoCaptureParams& params,
+ VideoCaptureController* controller,
+ VideoCaptureControllerID client_id,
+ VideoCaptureControllerEventHandler* client_handler);
+
// Retrieves all capture supported formats for a particular device. Returns
// false if the |capture_session_id| is not found. The supported formats are
// cached during device(s) enumeration, and depending on the underlying

Powered by Google App Engine
This is Rietveld 408576698