public static FileItem NewSourceVideoFileItem(FileContainer fileContainer, string sourceFilePath) { FileItem fileItem = new FileItem(fileContainer, sourceFilePath, TypeFile.SourceVideo); fileItem.VideoSize = VideoSize.Source; return(fileItem); }
public static FileItem NewSourceImageFileItem(FileContainer fileContainer) { FileItem fileItem = new FileItem(fileContainer, fileContainer.OriginFilePath, TypeFile.SourceImage); fileItem.IpfsProcess = new ProcessItem(fileItem); return(fileItem); }
public static FileItem NewSpriteVideoFileItem(FileContainer fileContainer) { FileItem fileItem = new FileItem(fileContainer, null, TypeFile.SpriteVideo); fileItem.VideoSize = VideoSize.Source; return(fileItem); }
public static FileItem NewSpriteVideoFileItem(FileContainer fileContainer) { FileItem fileItem = new FileItem(fileContainer, null, false); fileItem.ModeSprite = true; fileItem.VideoSize = VideoSize.Source; return(fileItem); }
public static FileContainer NewImageContainer(string sourceFilePath) { FileContainer fileContainer = new FileContainer(TypeContainer.Image); fileContainer.SourceFileItem = FileItem.NewSourceImageFileItem(fileContainer, sourceFilePath); return(fileContainer); }
public static FileContainer NewOverlayContainer(string sourceFilePath) { FileContainer fileContainer = new FileContainer(TypeContainer.Overlay); fileContainer.SourceFileItem = FileItem.NewSourceImageFileItem(fileContainer, sourceFilePath); fileContainer.OverlayFileItem = FileItem.NewOverlayImageFileItem(fileContainer); // TMP cancel overlay return(fileContainer); }
public static FileItem NewSpriteVideoFileItem(FileContainer fileContainer) { FileItem fileItem = new FileItem(fileContainer, fileContainer.OriginFilePath, TypeFile.SpriteVideo); fileItem.VideoSize = VideoSize.Source; fileItem.SpriteEncodeProcess = new ProcessItem(fileItem); fileItem.IpfsProcess = new ProcessItem(fileItem); return(fileItem); }
public static FileContainer NewSubtitleContainer() { FileContainer fileContainer = new FileContainer(TypeContainer.Subtitle, null); fileContainer.SubtitleFileItem = FileItem.NewSubtitleFileItem(fileContainer); ProgressManager.RegisterProgress(fileContainer); return(fileContainer); }
public static FileContainer NewOverlayContainer(string originFilePath) { FileContainer fileContainer = new FileContainer(TypeContainer.Overlay, originFilePath); fileContainer.SourceFileItem = FileItem.NewSourceImageFileItem(fileContainer); fileContainer.OverlayFileItem = FileItem.NewOverlayImageFileItem(fileContainer); ProgressManager.RegisterProgress(fileContainer); return(fileContainer); }
public static FileItem NewEncodedVideoFileItem(FileContainer fileContainer, VideoSize videoSize) { if (videoSize == VideoSize.Undefined) { throw new InvalidOperationException("VideoSize inconnu"); } FileItem fileItem = new FileItem(fileContainer, null, TypeFile.EncodedVideo); fileItem.VideoSize = videoSize; return(fileItem); }
public static FileContainer NewVideoContainer(string sourceFilePath, params VideoSize[] videoSizes) { FileContainer fileContainer = new FileContainer(TypeContainer.Video); fileContainer.SourceFileItem = FileItem.NewSourceVideoFileItem(fileContainer, sourceFilePath); fileContainer.EncodedFileItems = new List <FileItem>(); foreach (VideoSize videoSize in videoSizes) { fileContainer.EncodedFileItems.Add(FileItem.NewEncodedVideoFileItem(fileContainer, videoSize)); } return(fileContainer); }
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.GpuEncodeMode) { fileItem.AudioVideoCpuEncodeProcess = new ProcessItem(fileItem); } fileItem.IpfsProcess = new ProcessItem(fileItem); return(fileItem); }
public static FileItem NewSourceVideoFileItem(FileContainer fileContainer) { FileItem fileItem = new FileItem(fileContainer, fileContainer.OriginFilePath, TypeFile.SourceVideo); fileItem.VideoSize = VideoSize.Source; fileItem.InfoSourceProcess = new ProcessItem(fileItem); if (VideoSettings.GpuEncodeMode) { fileItem.AudioCpuEncodeProcess = new ProcessItem(fileItem); fileItem.VideoGpuEncodeProcess = new ProcessItem(fileItem); } if (IpfsSettings.AddVideoSource) { fileItem.AddIpfsProcess(fileItem.SourceFilePath); } return(fileItem); }
public static FileContainer NewVideoContainer(string originFilePath, bool sprite, params VideoSize[] videoSizes) { FileContainer fileContainer = new FileContainer(TypeContainer.Video, originFilePath); fileContainer.SourceFileItem = FileItem.NewSourceVideoFileItem(fileContainer); // si sprite demandé if (sprite) { fileContainer.SpriteVideoFileItem = FileItem.NewSpriteVideoFileItem(fileContainer); } var list = new List <FileItem>(); foreach (VideoSize videoSize in videoSizes) { list.Add(FileItem.NewEncodedVideoFileItem(fileContainer, videoSize)); } fileContainer.EncodedFileItems = list; ProgressManager.RegisterProgress(fileContainer); return(fileContainer); }
private FileItem(FileContainer fileContainer, string sourceFilePath, TypeFile typeFile) { FileContainer = fileContainer; FilesToDelete = new List <string>(); CreationDate = DateTime.UtcNow; SetSourceFilePath(sourceFilePath); TypeFile = typeFile; switch (typeFile) { case TypeFile.EncodedVideo: case TypeFile.SourceVideo: SetTempFilePath(Path.ChangeExtension(TempFileManager.GetNewTempFilePath(), ".mp4")); break; case TypeFile.SpriteVideo: SetTempFilePath(Path.ChangeExtension(TempFileManager.GetNewTempFilePath(), ".jpeg")); break; case TypeFile.SourceImage: case TypeFile.OverlayImage: SetTempFilePath(Path.ChangeExtension(TempFileManager.GetNewTempFilePath(), ".png")); break; } }
public static FileItem NewAttachedImageFileItem(FileContainer fileContainer, string filePath) { FileItem fileItem = new FileItem(fileContainer, filePath, false); return(fileItem); }
private FileItem(FileContainer fileContainer, string filePath, TypeFile typeFile) { FileContainer = fileContainer; FilePath = filePath; TypeFile = typeFile; }
public static FileItem NewOverlayImageFileItem(FileContainer fileContainer) { FileItem fileItem = new FileItem(fileContainer, null, TypeFile.OverlayImage); return(fileItem); }
public static FileItem NewSourceImageFileItem(FileContainer fileContainer, string sourceFilePath) { FileItem fileItem = new FileItem(fileContainer, sourceFilePath, TypeFile.SourceImage); return(fileItem); }
private FileItem(FileContainer fileContainer, string filePath, bool isSource) { IsSource = isSource; FileContainer = fileContainer; FilePath = filePath; }