• xianglu's avatar
    ImageCapture: Implement TakePhoto() for Linux/CrOs · 5a18d024
    xianglu authored
    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}
    5a18d024
v4l2_capture_delegate.h 3.51 KB