createFFprobeSessionFromMap static method

FFprobeSession createFFprobeSessionFromMap(
  1. Map sessionMap
)

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

Returns FFprobe session created.

Implementation

static FFprobeSession createFFprobeSessionFromMap(
    Map<dynamic, dynamic> sessionMap) {
  final session = new FFprobeSession();

  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;
}