// Copyright 2015 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef MEDIA_CAPTURE_CONTENT_CAPTURE_RESOLUTION_CHOOSER_H_ #define MEDIA_CAPTURE_CONTENT_CAPTURE_RESOLUTION_CHOOSER_H_ #include <vector> #include "media/capture/capture_export.h" #include "ui/gfx/geometry/size.h" namespace media { // Encapsulates the logic that determines the capture frame resolution based on: // 1. The configured minimum/maximum frame resolution. // 2. Whether the capture frame resolution must be of a fixed aspect ratio. // 3. Changes to resolution of the source content. // 4. Changes to the (externally-computed) target data volume, provided in // terms of the number of pixels in the frame. // // In variable-resolution use cases, the capture sizes are "snapped" to a small // (i.e., usually less than a dozen) set of possibilities. This is to prevent // the end-to-end system from having to deal with rapidly-changing video frame // resolutions that results from providing a fine-grained range of values. The // possible snapped frame sizes are computed relative to the resolution of the // source content: They are the same or smaller in size, and are of the same // aspect ratio. class CAPTURE_EXPORT CaptureResolutionChooser { … }; } // namespace media #endif // MEDIA_CAPTURE_CONTENT_CAPTURE_RESOLUTION_CHOOSER_H_