Main class to run FFmpeg
commands. Supports executing commands both synchronously and
* asynchronously.
*
* auto session = FFmpegKit::execute:("-i file1.mp4 -c:v libxvid file1.avi"); * * auto asyncSession = FFmpegKit::executeAsync:("-i file1.mp4 -c:v libxvid file1.avi", [](auto session){ ... }); **
Provides overloaded execute
methods to define session specific callbacks.
*
* auto asyncSession = FFmpegKit::executeAsync:("-i file1.mp4 -c:v libxvid file1.avi, [](auto session){ ... }, [](auto log){ ... }, [](auto statistics){ ... }); **/ class FFmpegKit { public: /** *
Synchronously executes FFmpeg with arguments provided.
*
* @param arguments FFmpeg command options/arguments as string list
* @return FFmpeg session created for this execution
*/
static std::shared_ptr Starts an asynchronous FFmpeg execution with arguments provided.
*
* Note that this method returns immediately and does not wait the execution to complete.
* You must use an FFmpegSessionCompleteCallback if you want to be notified about the result.
*
* @param arguments FFmpeg command options/arguments as string list
* @param completeCallback callback that will be called when the execution has completed
* @return FFmpeg session created for this execution
*/
static std::shared_ptr Starts an asynchronous FFmpeg execution with arguments provided.
*
* Note that this method returns immediately and does not wait the execution to complete.
* You must use an FFmpegSessionCompleteCallback if you want to be notified about the result.
*
* @param arguments FFmpeg command options/arguments as string list
* @param completeCallback callback that will be called when the execution has completed
* @param logCallback callback that will receive logs
* @param statisticsCallback callback that will receive statistics
* @return FFmpeg session created for this execution
*/
static std::shared_ptr Synchronously executes FFmpeg command provided. Space character is used to split command
* into arguments. You can use single or double quote characters to specify arguments inside
* your command.
*
* @param command FFmpeg command
* @return FFmpeg session created for this execution
*/
static std::shared_ptr Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* Note that this method returns immediately and does not wait the execution to complete. You must use an
* FFmpegSessionCompleteCallback if you want to be notified about the result.
*
* @param command FFmpeg command
* @param completeCallback callback that will be called when the execution has completed
* @return FFmpeg session created for this execution
*/
static std::shared_ptr Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command
* into arguments. You can use single or double quote characters to specify arguments inside your command.
*
* Note that this method returns immediately and does not wait the execution to complete. You must use an
* FFmpegSessionCompleteCallback if you want to be notified about the result.
*
* @param command FFmpeg command
* @param completeCallback callback that will be called when the execution has completed
* @param logCallback callback that will receive logs
* @param statisticsCallback callback that will receive statistics
* @return FFmpeg session created for this execution
*/
static std::shared_ptr Cancels all running sessions.
*
* This method does not wait for termination to complete and returns immediately.
*/
static void cancel();
/**
* Cancels the session specified with This method does not wait for termination to complete and returns immediately.
*
* @param sessionId id of the session that will be cancelled
*/
static void cancel(const long sessionId);
/**
* Lists all FFmpeg sessions in the session history.
*
* @return all FFmpeg sessions in the session history
*/
static std::shared_ptrsessionId
.
*
*