Loading media/java/android/media/videoeditor/VideoEditor.java +29 −1 Original line number Diff line number Diff line Loading @@ -97,6 +97,31 @@ public interface VideoEditor { public void onProgress(VideoEditor videoEditor, String filename, int progress); } /** * This listener interface is used by the VideoEditor to emit export status * notifications. * {@link #generatePreview(MediaProcessingProgressListener listener)} */ public interface MediaProcessingProgressListener { // Values used for the action parameter public static final int ACTION_ENCODE = 1; public static final int ACTION_DECODE = 2; /** * This method notifies the listener of the progress status of * processing a media object such as a Transition, AudioTrack or a * media image item (when Ken Burns effect is applied). * This method may be called maximum 100 times for one operation. * * @param object The object that is being processed such as a * Transition or AudioTrack * @param action The type of processing being performed * @param progress The progress in %. At the beginning of the operation, * this value is set to 0; at the end, the value is set to 100. */ public void onProgress(Object item, int action, int progress); } /** * @return The path where the VideoEditor stores all files related to the * project Loading Loading @@ -496,8 +521,11 @@ public interface VideoEditor { * This method must be called after the aspect ratio of the project changes * and before startPreview is called. Note that this method may block for * an extensive period of time. * * @param listener The listener interface which will be used to notify * the caller of the progress of each storyboard item being processed. */ public void generatePreview(); public void generatePreview(MediaProcessingProgressListener listener); /** * Start the preview of all the storyboard items applied on all MediaItems Loading media/java/android/media/videoeditor/VideoEditorFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ public class VideoEditorFactory { final VideoEditor videoEditor = (VideoEditor)ct.newInstance(arglist); if (generatePreview) { videoEditor.generatePreview(); videoEditor.generatePreview(null); } return videoEditor; } Loading media/java/android/media/videoeditor/VideoEditorTestImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -1055,7 +1055,7 @@ public class VideoEditorTestImpl implements VideoEditor { /* * {@inheritDoc} */ public void generatePreview() { public void generatePreview(MediaProcessingProgressListener listener) { // Generate all the needed transitions for (Transition transition : mTransitions) { if (!transition.isGenerated()) { Loading Loading
media/java/android/media/videoeditor/VideoEditor.java +29 −1 Original line number Diff line number Diff line Loading @@ -97,6 +97,31 @@ public interface VideoEditor { public void onProgress(VideoEditor videoEditor, String filename, int progress); } /** * This listener interface is used by the VideoEditor to emit export status * notifications. * {@link #generatePreview(MediaProcessingProgressListener listener)} */ public interface MediaProcessingProgressListener { // Values used for the action parameter public static final int ACTION_ENCODE = 1; public static final int ACTION_DECODE = 2; /** * This method notifies the listener of the progress status of * processing a media object such as a Transition, AudioTrack or a * media image item (when Ken Burns effect is applied). * This method may be called maximum 100 times for one operation. * * @param object The object that is being processed such as a * Transition or AudioTrack * @param action The type of processing being performed * @param progress The progress in %. At the beginning of the operation, * this value is set to 0; at the end, the value is set to 100. */ public void onProgress(Object item, int action, int progress); } /** * @return The path where the VideoEditor stores all files related to the * project Loading Loading @@ -496,8 +521,11 @@ public interface VideoEditor { * This method must be called after the aspect ratio of the project changes * and before startPreview is called. Note that this method may block for * an extensive period of time. * * @param listener The listener interface which will be used to notify * the caller of the progress of each storyboard item being processed. */ public void generatePreview(); public void generatePreview(MediaProcessingProgressListener listener); /** * Start the preview of all the storyboard items applied on all MediaItems Loading
media/java/android/media/videoeditor/VideoEditorFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ public class VideoEditorFactory { final VideoEditor videoEditor = (VideoEditor)ct.newInstance(arglist); if (generatePreview) { videoEditor.generatePreview(); videoEditor.generatePreview(null); } return videoEditor; } Loading
media/java/android/media/videoeditor/VideoEditorTestImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -1055,7 +1055,7 @@ public class VideoEditorTestImpl implements VideoEditor { /* * {@inheritDoc} */ public void generatePreview() { public void generatePreview(MediaProcessingProgressListener listener) { // Generate all the needed transitions for (Transition transition : mTransitions) { if (!transition.isGenerated()) { Loading