createFFmpegSessionFromMap static method

FFmpegSession createFFmpegSessionFromMap(
  1. Map sessionMap
)

Creates a new FFmpeg session from sessionMap, which includes session fields as map keys.

Returns FFmpeg session created.

Implementation

static FFmpegSession createFFmpegSessionFromMap(
    Map<dynamic, dynamic> sessionMap) {
  final session = new FFmpegSession();

  session._sessionId = sessionMap["sessionId"];
  session._createTime = FFmpegKitFactory.validDate(sessionMap["createTime"]);
  session._startTime = FFmpegKitFactory.validDate(sessionMap["startTime"]);
  session._command = sessionMap["command"];
  session._argumentsArray =
      FFmpegKitConfig.parseArguments(sessionMap["command"]);
  session._logRedirectionStrategy =
      FFmpegKitFactory.getLogRedirectionStrategy(session._sessionId);

  return session;
}