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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // VideoCaptureDevice is the abstract base class for realizing video capture 5 // VideoCaptureDevice is the abstract base class for realizing video capture
6 // device support in Chromium. It provides the interface for OS dependent 6 // device support in Chromium. It provides the interface for OS dependent
7 // implementations. 7 // implementations.
8 // The class is created and functions are invoked on a thread owned by 8 // The class is created and functions are invoked on a thread owned by
9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS 9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS
10 // specific implementation. 10 // specific implementation.
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 // hardware into a state where other applications could use it, free the 292 // hardware into a state where other applications could use it, free the
293 // memory associated with capture, and delete the |client| pointer passed into 293 // memory associated with capture, and delete the |client| pointer passed into
294 // AllocateAndStart. 294 // AllocateAndStart.
295 // 295 //
296 // If deallocation is done asynchronously, then the device implementation must 296 // If deallocation is done asynchronously, then the device implementation must
297 // ensure that a subsequent AllocateAndStart() operation targeting the same ID 297 // ensure that a subsequent AllocateAndStart() operation targeting the same ID
298 // would be sequenced through the same task runner, so that deallocation 298 // would be sequenced through the same task runner, so that deallocation
299 // happens first. 299 // happens first.
300 virtual void StopAndDeAllocate() = 0; 300 virtual void StopAndDeAllocate() = 0;
301 301
302 // Asynchronously takes a photo, possibly reconfiguring the capture objects
303 // and/or interrupting the capture flow. Returns false if taking the picture
304 // could not be scheduled at all, or else runs |photo_callback| (on the thread
305 // where TakePhoto() is run).
306 using TakePhotoCallback =
307 base::Callback<void(const std::string&,
308 std::unique_ptr<std::vector<uint8_t>>)>;
309 virtual bool TakePhoto(const TakePhotoCallback& photo_callback)
310 WARN_UNUSED_RESULT;
311
302 // Gets the power line frequency, either from the params if specified by the 312 // Gets the power line frequency, either from the params if specified by the
303 // user or from the current system time zone. 313 // user or from the current system time zone.
304 PowerLineFrequency GetPowerLineFrequency( 314 PowerLineFrequency GetPowerLineFrequency(
305 const VideoCaptureParams& params) const; 315 const VideoCaptureParams& params) const;
306 316
307 private: 317 private:
308 // Gets the power line frequency from the current system time zone if this is 318 // Gets the power line frequency from the current system time zone if this is
309 // defined, otherwise returns 0. 319 // defined, otherwise returns 0.
310 PowerLineFrequency GetPowerLineFrequencyForLocation() const; 320 PowerLineFrequency GetPowerLineFrequencyForLocation() const;
311 }; 321 };
312 322
313 } // namespace media 323 } // namespace media
314 324
315 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ 325 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_
OLDNEW
« 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