Loading api/current.xml +13 −0 Original line number Diff line number Diff line Loading @@ -86967,6 +86967,19 @@ <parameter name="listener" type="android.media.MediaRecorder.OnInfoListener"> </parameter> </method> <method name="setOrientationHint" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="degrees" type="int"> </parameter> </method> <method name="setOutputFile" return="void" abstract="false" media/java/android/media/MediaRecorder.java +25 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,31 @@ public class MediaRecorder setAudioEncoder(profile.audioCodec); } /** * Sets the orientation hint for output video playback. * This method should be called before start(). This method will not * trigger the source video frame to rotate during video recording, but to * add a composition matrix containing the rotation angle in the output * video if the output format is OutputFormat.THREE_GPP or * OutputFormat.MPEG_4 so that a video player can choose the proper * orientation for playback. Note that some video players may choose * to ignore the compostion matrix in a video during playback. * * @param degrees the angle to be rotated clockwise in degrees. * The supported angles are 0, 90, 180, and 270 degrees. * @throws IllegalArgumentException if the angle is not supported. * */ public void setOrientationHint(int degrees) { if (degrees != 0 && degrees != 90 && degrees != 180 && degrees != 270) { throw new IllegalArgumentException("Unsupported angle: " + degrees); } setParameter(String.format("video-param-rotation-angle-degrees=%d", degrees)); } /** * Sets the format of the output file produced during recording. Call this * after setAudioSource()/setVideoSource() but before prepare(). Loading Loading
api/current.xml +13 −0 Original line number Diff line number Diff line Loading @@ -86967,6 +86967,19 @@ <parameter name="listener" type="android.media.MediaRecorder.OnInfoListener"> </parameter> </method> <method name="setOrientationHint" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="degrees" type="int"> </parameter> </method> <method name="setOutputFile" return="void" abstract="false"
media/java/android/media/MediaRecorder.java +25 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,31 @@ public class MediaRecorder setAudioEncoder(profile.audioCodec); } /** * Sets the orientation hint for output video playback. * This method should be called before start(). This method will not * trigger the source video frame to rotate during video recording, but to * add a composition matrix containing the rotation angle in the output * video if the output format is OutputFormat.THREE_GPP or * OutputFormat.MPEG_4 so that a video player can choose the proper * orientation for playback. Note that some video players may choose * to ignore the compostion matrix in a video during playback. * * @param degrees the angle to be rotated clockwise in degrees. * The supported angles are 0, 90, 180, and 270 degrees. * @throws IllegalArgumentException if the angle is not supported. * */ public void setOrientationHint(int degrees) { if (degrees != 0 && degrees != 90 && degrees != 180 && degrees != 270) { throw new IllegalArgumentException("Unsupported angle: " + degrees); } setParameter(String.format("video-param-rotation-angle-degrees=%d", degrees)); } /** * Sets the format of the output file produced during recording. Call this * after setAudioSource()/setVideoSource() but before prepare(). Loading