diff options
author | Gil Dobjanschi <virgild@google.com> | 2010-11-04 15:35:42 -0700 |
---|---|---|
committer | Gil Dobjanschi <virgild@google.com> | 2010-11-04 15:35:42 -0700 |
commit | 289f08990ca1f0de33c9939a00958739969dff7e (patch) | |
tree | db9ad03be820c64e74e2f40c62a6a03e17607274 /media | |
parent | 82415bed3478a3a2200386691f05d671b46568f5 (diff) | |
download | frameworks_base-289f08990ca1f0de33c9939a00958739969dff7e.zip frameworks_base-289f08990ca1f0de33c9939a00958739969dff7e.tar.gz frameworks_base-289f08990ca1f0de33c9939a00958739969dff7e.tar.bz2 |
Added audio and video codec parameters to the export method.
Change-Id: I1badd08ce7148da540bf91df0e19c3da59287756
Diffstat (limited to 'media')
-rwxr-xr-x | media/java/android/media/videoeditor/VideoEditor.java | 32 | ||||
-rw-r--r-- | media/java/android/media/videoeditor/VideoEditorTestImpl.java | 10 |
2 files changed, 27 insertions, 15 deletions
diff --git a/media/java/android/media/videoeditor/VideoEditor.java b/media/java/android/media/videoeditor/VideoEditor.java index aa8f2cb..00143ad 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 ba84f49..60d3f23 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 { } /* |