execute method

Future<int> execute(
  1. String command
)

Executes FFprobe synchronously with command provided. This method returns when execution completes.

Returns zero on successful execution, 255 on user cancel and non-zero on error.

Implementation

Future<int> execute(String command) async {
  try {
    final Map<dynamic, dynamic> result = await _methodChannel.invokeMethod(
        'executeFFprobeWithArguments',
        {'arguments': FlutterFFmpeg.parseArguments(command)});
    return result['rc'];
  } on PlatformException catch (e, stack) {
    print("Plugin execute error: ${e.message}");
    return Future.error("execute failed for $command.", stack);
  }
}