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}
Showing
Please register or sign in to comment