Language

VideoScalingMode Enum

Definition

Enumerates values returned by several types and taken as a parameter of the F:Android.Media.MediaCodec.SetVideoScalingMode, and F:Android.Media.MediaPlayer.SetVideoScalingMode members.

public enum VideoScalingMode
type VideoScalingMode = 
Inheritance
VideoScalingMode

Fields

Name Value Description
ScaleToFit 1

The content is scaled to the surface dimensions

Android reference for android.media.MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

ScaleToFitWithCropping 2

The content is scaled, maintaining its aspect ratio, the whole surface area is used, content may be cropped. This mode is only suitable for content with 1:1 pixel aspect ratio as you cannot configure the pixel aspect ratio for a Surface. As of Build.VERSION_CODES.N release, this mode may not work if the video is rotated by 90 or 270 degrees.

Android reference for android.media.MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to