Chromium Code Reviews| Index: media/capture/video/linux/video_capture_device_linux.cc |
| diff --git a/media/capture/video/linux/video_capture_device_linux.cc b/media/capture/video/linux/video_capture_device_linux.cc |
| index c6ddd2b070a4d5434102091bb84743dba60046a1..a9f2aebad2c0102c8aba52d339032292100cb301 100644 |
| --- a/media/capture/video/linux/video_capture_device_linux.cc |
| +++ b/media/capture/video/linux/video_capture_device_linux.cc |
| @@ -82,6 +82,16 @@ void VideoCaptureDeviceLinux::StopAndDeAllocate() { |
| capture_impl_ = NULL; |
|
mcasas
2016/09/16 03:50:37
nit: not your code, but can you s/NULL/nullptr/ pl
xianglu
2016/09/16 18:22:34
Done.
|
| } |
| +void VideoCaptureDeviceLinux::TakePhoto(TakePhotoCallback callback) { |
| + DCHECK(capture_impl_); |
| + DCHECK(v4l2_thread_.IsRunning()); |
|
mcasas
2016/09/16 03:50:37
This should be a
if (!v4l2_thread_.IsRunning())
xianglu
2016/09/16 18:22:34
Done.
|
| + DVLOG(1) << "in VCDLinux: TakePhoto() is called"; |
|
mcasas
2016/09/16 03:50:37
nit: Remove this. In any case, it should be
before
xianglu
2016/09/16 18:22:34
Done.
|
| + |
| + v4l2_thread_.task_runner()->PostTask( |
| + FROM_HERE, base::Bind(&V4L2CaptureDelegate::TakePhoto, capture_impl_, |
| + base::Passed(&callback))); |
| +} |
| + |
| void VideoCaptureDeviceLinux::SetRotation(int rotation) { |
| if (v4l2_thread_.IsRunning()) { |
| v4l2_thread_.task_runner()->PostTask( |