New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 646430 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 2
Type: Feature

Blocking:
issue 518807



Sign in to add a comment

Implement takePhoto() method for Linux/CrOs devices

Project Member Reported by mcasas@chromium.org, Sep 13 2016

Issue description

VideoCaptureDevice::takePhoto() [1] is not implemented in
VideoCaptureDeviceLinux.

Implement it in said class (and, necessarily, in V4L2CaptureDelegate).

Since the V4L2 API does not have specific capabilities
to either change the photo resolution or to provide
the said photo in an encoded format (e.g png), the
encoding can be done on the spot in e.g. png, similar to
what is done in FakeVideoCaptureDevice [2].


[1] https://cs.chromium.org/chromium/src/media/capture/video/video_capture_device.h?q=VideoCaptureDevice::takePhoto&sq=package:chromium&l=198&dr=Ss
[2] https://cs.chromium.org/chromium/src/media/capture/video/fake_video_capture_device.cc?dr=Ss&q=fakevideocapturedevice&sq=package:chromium&l=105
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5a18d02471b9d6bdfcc3f38ac449f084699cbe26

commit 5a18d02471b9d6bdfcc3f38ac449f084699cbe26
Author: xianglu <xianglu@chromium.org>
Date: Mon Sep 19 16:58:07 2016

ImageCapture: Implement TakePhoto() for Linux/CrOs

This CL implements ImageCapture's takePhoto() method by enqueueing a
callback every time the method is called. Check the queue when a new
frame is captured in DoCapture(), and execute callbacks with a blob
argument.

Add a new method GetPhotoBlob() to construct blob. If the source image
is originally in JPEG format, it's copied to blob directly. Otherwise
convert the source image to RGB format and encode it to PNG.

R=mcasas@chromium.org
BUG= 646430 
TEST=All tests in VideoCaptureDeviceTests passed.

Review-Url: https://codereview.chromium.org/2344123002
Cr-Commit-Position: refs/heads/master@{#419484}

[modify] https://crrev.com/5a18d02471b9d6bdfcc3f38ac449f084699cbe26/media/capture/BUILD.gn
[modify] https://crrev.com/5a18d02471b9d6bdfcc3f38ac449f084699cbe26/media/capture/video/linux/v4l2_capture_delegate.cc
[modify] https://crrev.com/5a18d02471b9d6bdfcc3f38ac449f084699cbe26/media/capture/video/linux/v4l2_capture_delegate.h
[modify] https://crrev.com/5a18d02471b9d6bdfcc3f38ac449f084699cbe26/media/capture/video/linux/video_capture_device_linux.cc
[modify] https://crrev.com/5a18d02471b9d6bdfcc3f38ac449f084699cbe26/media/capture/video/linux/video_capture_device_linux.h
[modify] https://crrev.com/5a18d02471b9d6bdfcc3f38ac449f084699cbe26/media/capture/video/video_capture_device_unittest.cc

Comment 2 by mcasas@chromium.org, Sep 19 2016

Status: Started (was: Assigned)
Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Verified on a Chromebook with a cros dev 55.0.2869.0
Cc: anatolid@chromium.org
Can the owner please set a milestone label to this issue?

FYI, the last CL associated with this issue has been added after the M54 branch was created and before the M55 branch was created, so perhaps it should be labelled as M55?
Labels: M-55

Comment 7 by mcasas@chromium.org, Oct 24 2016

Labels: -M-55

Comment 8 by sshru...@google.com, Nov 23 2016

Components: -Blink>MediaStream>ImageCapture Blink>ImageCapture

Sign in to add a comment