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

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: 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 3e8367f3f744d50a3119e79a070626d3780bea80..8471bc294ca9a544d26e1cd49ebae3895604de66 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
@@ -56,6 +56,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);
@@ -91,6 +98,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