• Guido Urdaneta's avatar
    Make rescaling optional for VideoTrackAdapter · fd48c47e
    Guido Urdaneta authored
    This CL:
    1. Makes the former |max_width|, |max_height| parameters in
    VideoTrackAdapterSettings a single optional gfx::Size |target_size|.
    
    2. Changes VideoTrackAdapter so that if no |target_size| is specified
    in VideoTrackAdapterSettings, no rescaling will occur.
    
    3. Changes VideoTrackAdapterSettings to a class to increase encapsulation.
    
    4. CalculateTargetSize() is renamed to CalculateDesiredSize() and it now
    returns a bool indicating if it was possible to compute a desired size.
    If not, it means the input frame should not be rendered.
    Currently this is limited to frames of invalid size (greater than the system
    limit), but it will be expanded in follow-up work to detect frames that
    violate constraints and should cause the overconstrained event to be fired.
    
    These changes are in anticipation of support for the resizeMode constrainable
    property and the overconstrained event.
    
    Bug: 854980
    Change-Id: I688d0a655a9ac31995d99b710f955123a8894654
    Reviewed-on: https://chromium-review.googlesource.com/c/1286140
    Commit-Queue: Guido Urdaneta <guidou@chromium.org>
    Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#600926}
    fd48c47e
media_stream_video_source.h 13.8 KB