-
-
Notifications
You must be signed in to change notification settings - Fork 896
Concurrent Execution Support
v4.3.1 introduces concurrent execution support for both FFmpeg and FFprobe. You can start running multiple commands at the same time without waiting for other executions to finish.
Return code
For synchronous executions, integer returned by the method call is the return code of that execution.
On async API methods, ExecuteCallback interface on Android and ExecuteDelegate on iOS/tvOS includes returnCode field, which represents the completion status.
Cancel
cancel() method can be used to cancel all ongoing executions.
If you need to cancel a specific execution, start a new execution using the new Async API introduced in v4.4, get the executionId of that execution and invoke the cancel method with that id.
-
Android
long executionId = FFmpeg.executeAsync(ffmpegCommand, ...); FFmpeg.cancel(executionId); -
iOS/tvOS
long executionId = [MobileFFmpeg executeAsync:ffmpegCommand withCallback:self]; [MobileFFmpeg cancel:executionId];
Command Output
LogCallback interface on Android and ExecuteDelegate on iOS/tvOS, both include a field named executionId. This field is the id of execution that log call belongs to. You can use this field to get/collect logs for a specific execution. Note that for synchronous executions, executionId is always 0.
Unfortunately, Config.getLastCommandOutput() method does not support concurrent executions. It returns output from all commands being executed at that moment.
Copyright (c) 2018-2021 MobileFFmpeg