コード例 #1
0
        public static CommandStage WithInput <TStreamType>(this FFmpegCommand command, string fileName, SettingsCollection settings)
            where TStreamType : class, IStream
        {
            command.AddInput(fileName, settings);

            return(command.Select(command.LastInputStream <TStreamType>()));
        }
コード例 #2
0
        public static CommandStage WithInput <TStreamType>(this FFmpegCommand command, List <string> files)
            where TStreamType : class, IStream
        {
            if (files == null || files.Count == 0)
            {
                throw new ArgumentException("Files cannot be null or empty.", "files");
            }

            var streamIds = files.Select(fileName =>
            {
                command.AddInput(fileName);

                return(command.LastInputStream <TStreamType>());
            }).ToList();

            return(command.Select(streamIds));
        }
コード例 #3
0
        public static CommandStage WithInputNoLoad(this FFmpegCommand command, string fileName)
        {
            command.AddInputNoLoad(fileName);

            return(command.Select(command.LastInputStream()));
        }