/// <summary> /// Constructs a new FFMPEG Process object with the provided settings /// </summary> /// <param name="settings">The process settings</param> /// <param name="byteChunkCallback">The callback to put the raw bytes from ffmpeg</param> /// <param name="cancellationToken">The cancellation token to listen to</param> /// <param name="shouldThrowOnErrorCode">Whether this should throw when the ffmpeg process exits with an error code</param> public FFMPEGProcess( FFMPEGProcessVideoSettings settings, Action <byte[], int> byteChunkCallback, bool shouldThrowOnErrorCode ) { _settings = settings; _process = new Process(); _isDisposed = false; _hasStartedExecuting = false; _hasFinishedExecuting = false; _stdErrorStream = new StringBuilder(); _byteChunkCallback = byteChunkCallback; _shouldThrowOnErrorCode = shouldThrowOnErrorCode; }
/// <summary> /// Constructs a new FFMPEG Process object with the provided settings /// </summary> /// <param name="settings">The process settings</param> public FFMPEGProcess( FFMPEGProcessVideoSettings settings, Action <byte[], int> byteChunkCallback ) : this(settings, byteChunkCallback, true) { }