Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }