invokeSync method
Implementation
FFmpegRawResponse invokeSync({
String? pathFFmpeg,
FFmpegArgs? fFmpegArgs,
String? workingDirectory,
Map<String, String>? environment,
bool includeParentEnvironment = true,
bool runInShell = false,
}) {
fFmpegArgs ??= FFmpegArgs([]);
pathFFmpeg ??= path_ffmpeg;
ProcessResult res = Process.runSync(
pathFFmpeg,
fFmpegArgs.toList(),
workingDirectory: workingDirectory,
environment: environment,
includeParentEnvironment: includeParentEnvironment,
runInShell: runInShell,
);
if (res.exitCode == 0) {
return FFmpegRawResponse(
rawData: {"@type": "ok", "message": res.stdout},
processResult: res,
);
} else {
return FFmpegRawResponse(
rawData: {"@type": "error", "message": res.stderr},
processResult: res,
);
}
}