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

Side by Side Diff: media/capture/video/linux/v4l2_capture_delegate.h

Issue 2354783002: ImageCapture: Implement takePhoto() for Windows (Closed)
Patch Set: xianglu@ comments 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 unified diff | Download patch
« no previous file with comments | « media/capture/video/blob_utils.cc ('k') | media/capture/video/linux/v4l2_capture_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef MEDIA_CAPTURE_VIDEO_LINUX_V4L2_CAPTURE_DELEGATE_H_ 5 #ifndef MEDIA_CAPTURE_VIDEO_LINUX_V4L2_CAPTURE_DELEGATE_H_
6 #define MEDIA_CAPTURE_VIDEO_LINUX_V4L2_CAPTURE_DELEGATE_H_ 6 #define MEDIA_CAPTURE_VIDEO_LINUX_V4L2_CAPTURE_DELEGATE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void StopAndDeAllocate(); 56 void StopAndDeAllocate();
57 57
58 void TakePhoto(VideoCaptureDevice::TakePhotoCallback callback); 58 void TakePhoto(VideoCaptureDevice::TakePhotoCallback callback);
59 59
60 void SetRotation(int rotation); 60 void SetRotation(int rotation);
61 61
62 private: 62 private:
63 friend class base::RefCountedThreadSafe<V4L2CaptureDelegate>; 63 friend class base::RefCountedThreadSafe<V4L2CaptureDelegate>;
64 ~V4L2CaptureDelegate(); 64 ~V4L2CaptureDelegate();
65 65
66 class BufferTracker;
67
66 // VIDIOC_QUERYBUFs a buffer from V4L2, creates a BufferTracker for it and 68 // VIDIOC_QUERYBUFs a buffer from V4L2, creates a BufferTracker for it and
67 // enqueues it (VIDIOC_QBUF) back into V4L2. 69 // enqueues it (VIDIOC_QBUF) back into V4L2.
68 bool MapAndQueueBuffer(int index); 70 bool MapAndQueueBuffer(int index);
69 71
70 void DoCapture(); 72 void DoCapture();
71 73
72 class BufferTracker;
73 mojom::BlobPtr GetPhotoBlob(
74 const scoped_refptr<BufferTracker>& buffer_tracker,
75 const uint32_t bytesused);
76
77 void SetErrorState(const tracked_objects::Location& from_here, 74 void SetErrorState(const tracked_objects::Location& from_here,
78 const std::string& reason); 75 const std::string& reason);
79 76
80 const scoped_refptr<base::SingleThreadTaskRunner> v4l2_task_runner_; 77 const scoped_refptr<base::SingleThreadTaskRunner> v4l2_task_runner_;
81 const VideoCaptureDeviceDescriptor device_descriptor_; 78 const VideoCaptureDeviceDescriptor device_descriptor_;
82 const int power_line_frequency_; 79 const int power_line_frequency_;
83 80
84 // The following members are only known on AllocateAndStart(). 81 // The following members are only known on AllocateAndStart().
85 VideoCaptureFormat capture_format_; 82 VideoCaptureFormat capture_format_;
86 v4l2_format video_fmt_; 83 v4l2_format video_fmt_;
(...skipping 10 matching lines...) Expand all
97 94
98 // Clockwise rotation in degrees. This value should be 0, 90, 180, or 270. 95 // Clockwise rotation in degrees. This value should be 0, 90, 180, or 270.
99 int rotation_; 96 int rotation_;
100 97
101 DISALLOW_COPY_AND_ASSIGN(V4L2CaptureDelegate); 98 DISALLOW_COPY_AND_ASSIGN(V4L2CaptureDelegate);
102 }; 99 };
103 100
104 } // namespace media 101 } // namespace media
105 102
106 #endif // MEDIA_CAPTURE_VIDEO_LINUX_V4L2_CAPTURE_DELEGATE_H_ 103 #endif // MEDIA_CAPTURE_VIDEO_LINUX_V4L2_CAPTURE_DELEGATE_H_
OLDNEW
« no previous file with comments | « media/capture/video/blob_utils.cc ('k') | media/capture/video/linux/v4l2_capture_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698