getLastFFmpegReturnCode method

Future<int?> getLastFFmpegReturnCode()

Get the error code returned by executeFFmpegWithArguments().

We use here our own ffmpeg "getLastReturnCode" procedure instead of the one provided by the flutter_ffmpeg plugin, so that the developers not interested by ffmpeg can use Flutter Sound without the flutter_ffmpeg plugin and without any complain from the link-editor.

This simple verb is used to get the result of the last FFmpeg command.

Implementation

Future<int?> getLastFFmpegReturnCode() async {
  if (!isFFmpegAvailable()) {
    return 0;
  }
  return _flutterFFmpegConfig!.getLastReturnCode();
}