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

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

Issue 2753073006: [Mojo Video Capture] Add support to BuildableVideoCaptureDevice for aborting the device start. (Closed)
Patch Set: Incorporated mcasas@'s suggestions from PatchSet 2 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/in_process_buildable_video_capture_device.h
diff --git a/content/browser/renderer_host/media/in_process_buildable_video_capture_device.h b/content/browser/renderer_host/media/in_process_buildable_video_capture_device.h
index ce1b5791e0cf0573380d3d8fa19e119cc6ded240..b7c563982c4fe8476623f2a341e6656da6e499b9 100644
--- a/content/browser/renderer_host/media/in_process_buildable_video_capture_device.h
+++ b/content/browser/renderer_host/media/in_process_buildable_video_capture_device.h
@@ -53,6 +53,13 @@ class InProcessBuildableVideoCaptureDevice
using ReceiveDeviceCallback =
base::Callback<void(std::unique_ptr<media::VideoCaptureDevice> device)>;
+ enum class State {
+ NO_DEVICE,
+ DEVICE_START_IN_PROGRESS,
+ DEVICE_START_ABORTING,
+ DEVICE_STARTED
+ };
+
std::unique_ptr<media::VideoCaptureDeviceClient> CreateDeviceClient(
int buffer_pool_max_buffer_count,
base::WeakPtr<media::VideoFrameReceiver> receiver);
@@ -88,6 +95,7 @@ class InProcessBuildableVideoCaptureDevice
const scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
media::VideoCaptureDeviceFactory* const device_factory_;
std::unique_ptr<media::VideoCaptureDevice> device_;
+ State state_ = State::NO_DEVICE;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698