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

Unified Diff: media/capture/video/linux/v4l2_capture_delegate.h

Issue 2344123002: ImageCapture: Implement TakePhoto() for Linux/CrOs (Closed)
Patch Set: v4l2_capture_delegate.cc: GetPhotoBlob() use if/else to handle I420 and RGB24 format. Created 4 years, 3 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/linux/v4l2_capture_delegate.h
diff --git a/media/capture/video/linux/v4l2_capture_delegate.h b/media/capture/video/linux/v4l2_capture_delegate.h
index 120272745c9d2d690f44497a23c873d66c221adf..44e08fab75ddfaea4fcf5768404156a2f8dc6ce7 100644
--- a/media/capture/video/linux/v4l2_capture_delegate.h
+++ b/media/capture/video/linux/v4l2_capture_delegate.h
@@ -55,6 +55,8 @@ class V4L2CaptureDelegate final
std::unique_ptr<VideoCaptureDevice::Client> client);
void StopAndDeAllocate();
+ void TakePhoto(VideoCaptureDevice::TakePhotoCallback callback);
+
void SetRotation(int rotation);
private:
@@ -67,6 +69,11 @@ class V4L2CaptureDelegate final
void DoCapture();
+ class BufferTracker;
+ mojom::BlobPtr GetPhotoBlob(
+ const scoped_refptr<BufferTracker>& buffer_tracker,
+ const v4l2_buffer& buffer);
+
void SetErrorState(const tracked_objects::Location& from_here,
const std::string& reason);
@@ -80,8 +87,9 @@ class V4L2CaptureDelegate final
std::unique_ptr<VideoCaptureDevice::Client> client_;
base::ScopedFD device_fd_;
+ std::queue<VideoCaptureDevice::TakePhotoCallback> take_photo_callbacks_;
+
// Vector of BufferTracker to keep track of mmap()ed pointers and their use.
- class BufferTracker;
std::vector<scoped_refptr<BufferTracker>> buffer_tracker_pool_;
bool is_capturing_;

Powered by Google App Engine
This is Rietveld 408576698