diff --git a/media/java/android/media/videoeditor/VideoEditor.java b/media/java/android/media/videoeditor/VideoEditor.java index aa8f2cb2b538e..00143ad572dec 100755 --- a/media/java/android/media/videoeditor/VideoEditor.java +++ b/media/java/android/media/videoeditor/VideoEditor.java @@ -130,36 +130,42 @@ public interface VideoEditor { * storyboard items. This method can take a long time to execute and is * blocking. The application will receive progress notifications via the * ExportProgressListener. Specific implementations may not support multiple - * simultaneous export operations. - * - * Note that invoking methods which would change the contents of the output - * movie throw an IllegalStateException while an export operation is - * pending. + * simultaneous export operations. Note that invoking methods which would + * change the contents of the output movie throw an IllegalStateException + * while an export operation is pending. * * @param filename The output file name (including the full path) * @param height The height of the output video file. The supported values * for height are described in the MediaProperties class, for - * example: HEIGHT_480. The width will be automatically - * computed according to the aspect ratio provided by + * example: HEIGHT_480. The width will be automatically computed + * according to the aspect ratio provided by * {@link #setAspectRatio(int)} * @param bitrate The bitrate of the output video file. This is approximate * value for the output movie. Supported bitrate values are * described in the MediaProperties class for example: * BITRATE_384K + * @param audioCodec The audio codec to be used for the export. The audio + * codec values are defined in the MediaProperties class (e.g. + * ACODEC_AAC_LC). Note that not all audio codec types are + * supported for export purposes. + * @param videoCodec The video codec to be used for the export. The video + * codec values are defined in the MediaProperties class (e.g. + * VCODEC_H264BP). Note that not all video codec types are + * supported for export purposes. * @param listener The listener for progress notifications. Use null if * export progress notifications are not needed. - * - * @throws IllegalArgumentException if height or bitrate are not supported. + * @throws IllegalArgumentException if height or bitrate are not supported + * or if the audio or video codecs are not supported * @throws IOException if output file cannot be created * @throws IllegalStateException if a preview or an export is in progress or * if no MediaItem has been added * @throws CancellationException if export is canceled by calling * {@link #cancelExport()} - * @throws UnsupportOperationException if multiple simultaneous export() - * are not allowed + * @throws UnsupportOperationException if multiple simultaneous export() are + * not allowed */ - public void export(String filename, int height, int bitrate, ExportProgressListener listener) - throws IOException; + public void export(String filename, int height, int bitrate, int audioCodec, int videoCodec, + ExportProgressListener listener) throws IOException; /** * Cancel the running export operation. This method blocks until the diff --git a/media/java/android/media/videoeditor/VideoEditorTestImpl.java b/media/java/android/media/videoeditor/VideoEditorTestImpl.java index ba84f499fb51c..60d3f23c9e75a 100644 --- a/media/java/android/media/videoeditor/VideoEditorTestImpl.java +++ b/media/java/android/media/videoeditor/VideoEditorTestImpl.java @@ -1025,11 +1025,17 @@ public class VideoEditorTestImpl implements VideoEditor { } } + /* + * {@inheritDoc} + */ public void cancelExport(String filename) { } - public void export(String filename, int height, int bitrate, ExportProgressListener listener) - throws IOException { + /* + * {@inheritDoc} + */ + public void export(String filename, int height, int bitrate, int audioCodec, int videoCodec, + ExportProgressListener listener) throws IOException { } /*