public class MediaTranscoderEngine
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
MediaTranscoderEngine.ProgressCallback |
| Constructor and Description |
|---|
MediaTranscoderEngine()
Do not use this constructor unless you know what you are doing.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getProgress()
NOTE: This method is thread safe.
|
MediaTranscoderEngine.ProgressCallback |
getProgressCallback() |
void |
setDataSource(java.io.FileDescriptor fileDescriptor) |
void |
setMaxVideoDuration(long maxVideoDuration) |
void |
setProgressCallback(MediaTranscoderEngine.ProgressCallback progressCallback) |
void |
transcodeVideo(java.lang.String outputPath,
MediaFormatStrategy formatStrategy)
Run video transcoding.
|
public MediaTranscoderEngine()
public void setDataSource(java.io.FileDescriptor fileDescriptor)
public void setMaxVideoDuration(long maxVideoDuration)
public MediaTranscoderEngine.ProgressCallback getProgressCallback()
public void setProgressCallback(MediaTranscoderEngine.ProgressCallback progressCallback)
public double getProgress()
public void transcodeVideo(java.lang.String outputPath,
MediaFormatStrategy formatStrategy)
throws java.io.IOException,
java.lang.InterruptedException
outputPath - File path to output transcoded video file.formatStrategy - Output format strategy.java.io.IOException - when input or output file could not be opened.InvalidOutputFormatException - when output format is not supported.java.lang.InterruptedException - when cancel to transcode.