public interface AliyunIThumbnailFetcher
限定符和类型 | 接口和说明 |
---|---|
static class |
AliyunIThumbnailFetcher.CropMode |
static interface |
AliyunIThumbnailFetcher.OnThumbnailCompletion |
限定符和类型 | 方法和说明 |
---|---|
int |
addImageSource(java.lang.String path,
long durationMills,
long overlapDurationMills)
Adds an image source.
|
int |
addVideoSource(java.lang.String path)
已过时。
Replaced by
addVideoSource(String, long, long, long) . |
int |
addVideoSource(java.lang.String path,
long startTimeMills,
long endTimeMills,
long overlapDurationMills)
Adds a video source.
|
int |
fromConfigJson(java.lang.String jsonPath)
Gets video information from a configuration file.
|
long |
getTotalDuration()
Gets the total video duration.
|
void |
release()
Releases resources.
|
int |
requestThumbnailImage(long[] time,
AliyunIThumbnailFetcher.OnThumbnailCompletion callback)
Gets thumbnail images at specific time points.
|
int |
setParameters(int width,
int height,
AliyunIThumbnailFetcher.CropMode mode,
VideoDisplayMode scaleMode,
int cacheSize)
Sets output resolution.
|
int addVideoSource(java.lang.String path, long startTimeMills, long endTimeMills, long overlapDurationMills)
path
- The path of the video file.startTimeMills
- The start time of the video in milliseconds.endTimeMills
- The end time of the video in milliseconds.overlapDurationMills
- The transition duration in milliseconds.AliyunErrorCode.OK
if the invocation is successful.
AliyunErrorCode.ERROR_INVALID_ARGUMENTS
if invalid parameters are found, such as incorrect or invalid file path, and invalid startTime or endTime.int addVideoSource(java.lang.String path)
addVideoSource(String, long, long, long)
.path
- The path of the video file.int addImageSource(java.lang.String path, long durationMills, long overlapDurationMills)
path
- The path of the image file.durationMills
- The display duration of the image in milliseconds.overlapDurationMills
- The transition duration in milliseconds.AliyunErrorCode.OK
if the invocation is successful.int fromConfigJson(java.lang.String jsonPath)
jsonPath
- The path of the configuration file.AliyunErrorCode.OK
if the invocation is successful.
AliyunErrorCode.ERROR_INVALID_ARGUMENTS
if invalid parameters are found, such as empty JSON file path, invalid JSON file, incorrect paths of video or image files in the JSON file, and invalid startTime or endTime.int setParameters(int width, int height, AliyunIThumbnailFetcher.CropMode mode, VideoDisplayMode scaleMode, int cacheSize)
requestThumbnailImage(long[], OnThumbnailCompletion)
.
Otherwise, an IllegalStateException
will be thrown.width
- The output image width.height
- The output image height.mode
- The image display mode. VideoDisplayMode
cacheSize
- The cache size.int requestThumbnailImage(long[] time, AliyunIThumbnailFetcher.OnThumbnailCompletion callback)
time
- The time points. Unit: milliseconds.callback
- The callback that outputs the results.void release()
long getTotalDuration()
addVideoSource(String, long, long, long)
.