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

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

Issue 2753073006: [Mojo Video Capture] Add support to BuildableVideoCaptureDevice for aborting the device start. (Closed)
Patch Set: Created 3 years, 9 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/buildable_video_capture_device.h
diff --git a/content/browser/renderer_host/media/buildable_video_capture_device.h b/content/browser/renderer_host/media/buildable_video_capture_device.h
index 6baa00516b2e26106d400b6cf275b1fcb35ee584..9f08f4522b0581896e3fe817225ba6b490af1e28 100644
--- a/content/browser/renderer_host/media/buildable_video_capture_device.h
+++ b/content/browser/renderer_host/media/buildable_video_capture_device.h
@@ -25,6 +25,7 @@ class CONTENT_EXPORT BuildableDeviceCallbacks {
virtual void WillStartDevice(media::VideoFacingMode facing_mode) = 0;
virtual void DidStartDevice(VideoCaptureController* entry) = 0;
virtual void OnDeviceStartFailed(VideoCaptureController* entry) = 0;
+ virtual void OnDeviceStartAborted() = 0;
};
// Abstraction for a video capture device that must be "built" before it can be
@@ -35,9 +36,14 @@ class CONTENT_EXPORT BuildableDeviceCallbacks {
// reported to an instance of BuildableDeviceCallbacks (see above). Once the
// device has been built successfully, the "Device operation methods", are
// allowed to be called. ReleaseDeviceAsync() must be called in order to
-// release the device if it has before been built successfully. After calling
-// ReleaseDeviceAsync(), it is legal to call CreateAndStartDeviceAsync() to
-// rebuild and start the device again.
+// release the device if it has before been built successfully.
+// Clients may call ReleaseDeviceAsync() before a preceding call to
+// CreateAndStartDeviceAsync() has resulted in a callback to OnDeviceStarted()
+// or OnDeviceStartFailed(). Doing so requests the device startup to be aborted,
+// and the BuildableVideoCaptureDevice will call OnDeviceStartAborted() to
+// indicate when the abort is completed.
+// After calling ReleaseDeviceAsync(), it is legal to call
+// CreateAndStartDeviceAsync() to rebuild and start the device again.
class BuildableVideoCaptureDevice {
public:
virtual ~BuildableVideoCaptureDevice() {}

Powered by Google App Engine
This is Rietveld 408576698