Share via


MediaCodec.VideoScalingModeScaleToFitWithCropping Field

Definition

Caution

This constant will be removed in the future version. Use Android.Media.VideoScalingMode enum directly instead of this field.

The content is scaled, maintaining its aspect ratio, the whole surface area is used, content may be cropped.

[Android.Runtime.Register("VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING")]
[System.Obsolete("This constant will be removed in the future version. Use Android.Media.VideoScalingMode enum directly instead of this field.", true)]
public const Android.Media.VideoScalingMode VideoScalingModeScaleToFitWithCropping = 2;
[<Android.Runtime.Register("VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING")>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Media.VideoScalingMode enum directly instead of this field.", true)>]
val mutable VideoScalingModeScaleToFitWithCropping : Android.Media.VideoScalingMode

Field Value

Value = 2
Attributes

Remarks

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

Java documentation 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.

Applies to