Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public Result doWork() {
- shellCommand = new ShellCommand();
- ffmpegBinary = new String[] {
- FileUtils.getFFmpeg(context).getAbsolutePath()
- };
- command = concatenate(ffmpegBinary, command);
- CommandResult commandResult = getCommandResult(command);
- if (command`enter code here`Result.success) {
- onSuccess(videoPath);
- } else {
- onFailure(videoPath);
- }
- }
- //getCommandResult
- private CommandResult getCommandResult(String[] command) {
- try {
- process = shellCommand.run(command, null);
- if (process == null) {
- return CommandResult.getDummyFailureResponse();
- }
- checkAndUpdateProcess();
- return CommandResult.getOutputFromProcess(process);
- } catch(Exception e) {} finally {
- Util.destroyProcess(process);
- }`enter code here`
- return CommandResult.getDummyFailureResponse();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement