adaptOutputFormat
Calling this function will cause frames to be scaled down to the requested resolution. Also, frames will be cropped to match the requested aspect ratio, and frames will be dropped to match the requested fps. The requested aspect ratio is orientation agnostic and will be adjusted to maintain the input orientation, so it doesn't matter if e.g. 1280x720 or 720x1280 is requested.
open fun adaptOutputFormat(landscapeWidth: Int, landscapeHeight: Int, portraitWidth: Int, portraitHeight: Int, fps: Int)
Same as above, but allows setting two different target resolutions depending on incoming frame orientation. This gives more fine-grained control and can e.g. be used to force landscape video to be cropped to portrait video.
open fun adaptOutputFormat(targetLandscapeAspectRatio: VideoSource.AspectRatio, @Nullable maxLandscapePixelCount: Integer, targetPortraitAspectRatio: VideoSource.AspectRatio, @Nullable maxPortraitPixelCount: Integer, @Nullable maxFps: Integer)
Same as above, with even more control as each constraint is optional.