示例#1
0
        public VSPipeProcessor(VideoInfoJob j) : base()
        {
            // 获取VSPipe路径
            RegistryKey key    = Registry.LocalMachine;
            RegistryKey vskey  = key.OpenSubKey("software\\vapoursynth");
            string      vscore = vskey.GetValue("Path") as string;

            if (vscore == null)
            {
                throw new Exception("can't get vs install path");
            }

            FileInfo vspipeInfo = new FileInfo(new DirectoryInfo(vscore).FullName + "\\core64\\vspipe.exe");

            if (vspipeInfo.Exists)
            {
                this.executable = vspipeInfo.FullName;
            }

            videoInfo = new VSVideoInfo();

            StringBuilder sb = new StringBuilder();

            sb.Append("--info ");
            sb.Append("\"" + j.Input + "\" ");
            sb.Append("-");

            commandLine = sb.ToString();
        }
示例#2
0
        public VSPipeInfo(string vsScriptPath, List <string> args)
        {
            VideoInfoJob j = new VideoInfoJob(vsScriptPath, args);

            VSPipeProcessor processor = new VSPipeProcessor(j);

            processor.start();

            videoInfo = processor.VideoInfo;
            UpdateVideoInfo();
        }
示例#3
0
        public VSPipeInfo(string vsScriptPath)
        {
            VideoInfoJob j = new VideoInfoJob(vsScriptPath);

            IJobProcessor processor = VSPipeProcessor.NewVSPipeProcessor(j);

            processor.start();

            videoInfo = (processor as VSPipeProcessor).VideoInfo;

            UpdateVideoInfo();
        }
示例#4
0
        public VSPipeProcessor(VideoInfoJob j) : base()
        {
            // 获取VSPipe路径
            executable = Initializer.Config.vspipePath;
            videoInfo  = new VSVideoInfo();

            StringBuilder sb = new StringBuilder();

            sb.Append("--info");
            foreach (string arg in j.Args)
            {
                sb.Append($" --arg \"{arg}\"");
            }
            sb.Append(" \"" + j.Input + "\"");
            sb.Append(" -");

            commandLine = sb.ToString();
        }