public static FileItem NewEncodedVideoFileItem(FileContainer fileContainer, VideoSize videoSize) { if (videoSize == null) { throw new ArgumentNullException(nameof(videoSize)); } FileItem fileItem = new FileItem(fileContainer, fileContainer.SourceFileItem.SourceFilePath, TypeFile.EncodedVideo); fileItem.VideoSize = videoSize; fileItem.IpfsProcess = new ProcessItem(fileItem, LogManager.IpfsLogger); return(fileItem); }
public static FileItem NewEncodedVideoFileItem(FileContainer fileContainer, VideoSize videoSize) { if (videoSize == VideoSize.Undefined) { throw new InvalidOperationException("VideoSize inconnu"); } FileItem fileItem = new FileItem(fileContainer, fileContainer.SourceFileItem.SourceFilePath, TypeFile.EncodedVideo); fileItem.VideoSize = videoSize; if (!VideoSettings.Instance.GpuEncodeMode) { fileItem.AudioVideoCpuEncodeProcess = new ProcessItem(fileItem, LogManager.FfmpegLogger); } fileItem.IpfsProcess = new ProcessItem(fileItem, LogManager.IpfsLogger); return(fileItem); }