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

Unified Diff: media/capture/video/video_capture_device.h

Issue 1952463002: Media Stream Image Capture (4): wire takePhoto and implement in FakeVCDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi@ and mlamouri@ comments Created 4 years, 7 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/capture/video/video_capture_device.h
diff --git a/media/capture/video/video_capture_device.h b/media/capture/video/video_capture_device.h
index ed40a9a178be281e6757b0398bca7cc6e2e5a761..24dec1d185780911d032f77b4f48eedcd34dfd02 100644
--- a/media/capture/video/video_capture_device.h
+++ b/media/capture/video/video_capture_device.h
@@ -299,6 +299,16 @@ class MEDIA_EXPORT VideoCaptureDevice {
// happens first.
virtual void StopAndDeAllocate() = 0;
+ // Asynchronously takes a photo, possibly reconfiguring the capture objects
+ // and/or interrupting the capture flow. Returns false if taking the picture
+ // could not be scheduled at all, or else runs |photo_callback| (on the thread
+ // where TakePhoto() is run).
+ using TakePhotoCallback =
+ base::Callback<void(const std::string&,
+ std::unique_ptr<std::vector<uint8_t>>)>;
+ virtual bool TakePhoto(const TakePhotoCallback& photo_callback)
+ WARN_UNUSED_RESULT;
+
// Gets the power line frequency, either from the params if specified by the
// user or from the current system time zone.
PowerLineFrequency GetPowerLineFrequency(
« no previous file with comments | « media/capture/video/fake_video_capture_device_unittest.cc ('k') | media/capture/video/video_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698