Partager via


MediaMuxer.SetOrientationHint(Int32) Method

Definition

Sets the orientation hint for output video playback.

[Android.Runtime.Register("setOrientationHint", "(I)V", "")]
public void SetOrientationHint (int degrees);
[<Android.Runtime.Register("setOrientationHint", "(I)V", "")>]
member this.SetOrientationHint : int -> unit

Parameters

degrees
Int32

the angle to be rotated clockwise in degrees. The supported angles are 0, 90, 180, and 270 degrees.

Attributes

Remarks

Sets the orientation hint for output video playback.

This method should be called before #start. Calling this method will not rotate the video frame when muxer is generating the file, but add a composition matrix containing the rotation angle in the output video if the output format is OutputFormat#MUXER_OUTPUT_MPEG_4 so that a video player can choose the proper orientation for playback. Note that some video players may choose to ignore the composition matrix in a video during playback. By default, the rotation degree is 0.

Java documentation for android.media.MediaMuxer.setOrientationHint(int).

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