public interface CommandHandler
命令行管理器接口
Fast Forward Moving Picture Experts Group命令行操作管理器
可执行Fast Forward Moving Picture Experts Group命令/停止/查询任务信息
该包需要配合对应系统版本的Fast Forward Moving Picture Experts Group
下载编译好的对应的系统版本:https://ffmpeg.zeranoe.com/builds/
2020-02-24 17:11
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy()
销毁一些后台资源和保活线程
|
CommandTask |
get(String taskId)
通过id查询任务信息
|
Collection<CommandTask> |
getAll()
获取全部任务信息
|
void |
setCommandAssemble(CommandAssemble commandAssemble)
注入ffmpeg命令组装器
|
void |
setTaskDao(TaskDao taskDao)
注入自己实现的任务信息持久层接口
|
void |
setTaskHandler(TaskHandler taskHandler)
注入ffmpeg命令处理器
|
String |
start(Map<String,String> map)
通过组装命令发布任务
|
String |
start(String taskId,
CommandBuilder commandBuilder)
通过流式命令构建器发布任务
|
String |
start(String taskId,
String command)
通过命令发布任务(默认命令前不加FFmpeg路径)
|
String |
start(String taskId,
String command,
boolean hasPath)
通过命令发布任务
|
boolean |
stop(String taskId)
停止任务
|
int |
stopAll()
停止全部任务
|
void setTaskDao(TaskDao taskDao)
taskDao - 任务信息持久层接口void setTaskHandler(TaskHandler taskHandler)
taskHandler - 任务执行接口void setCommandAssemble(CommandAssemble commandAssemble)
commandAssemble - 命令组装器接口String start(String taskId, String command)
taskId - 任务标识command - FFmpeg命令String start(String taskId, String command, boolean hasPath)
taskId - 任务标识command - FFmpeg命令hasPath - 命令中是否包含FFmpeg执行文件的绝对路径String start(String taskId, CommandBuilder commandBuilder)
taskId - 任务标识commandBuilder - 流式命令行构建器boolean stop(String taskId)
taskId - 任务idint stopAll()
CommandTask get(String taskId)
taskId - 任务idCollection<CommandTask> getAll()
void destroy()
Copyright © 2021. All rights reserved.