コード例 #1
0
        private static bool StartRendering(Job job)
        {
            string parameters = JobPathHelper.GetDeadlineJobFile(job);

            parameters += " " + Settings.LocalFusionPluginPath;
            parameters += " " + JobPathHelper.GetJobCompPath(job);

            VCProcess process = new VCProcess(job);

            process.StartInfo.FileName               = Settings.LocalDeadlineExePath;
            process.StartInfo.CreateNoWindow         = true;
            process.StartInfo.UseShellExecute        = false;
            process.StartInfo.RedirectStandardError  = true;
            process.StartInfo.RedirectStandardOutput = true;
            process.StartInfo.Arguments              = parameters;
            process.EnableRaisingEvents              = true;
            process.StartInfo.WindowStyle            = System.Diagnostics.ProcessWindowStyle.Minimized;

            process.Execute();
            string output = process.StandardOutput.ReadToEnd();

            job.RenderID = RenderIDParser.Parse(output);
            process.WaitForExit();
            process.Close();

            return(job.RenderID != null);
        }
コード例 #2
0
        private static void Encode(Job job, string parameters)
        {
            VCProcess ConcatenateProcess = new VCProcess(job);

            ConcatenateProcess.StartInfo.FileName               = Settings.LocalFfmpegExePath;
            ConcatenateProcess.StartInfo.CreateNoWindow         = true;
            ConcatenateProcess.StartInfo.UseShellExecute        = false;
            ConcatenateProcess.StartInfo.RedirectStandardError  = false;
            ConcatenateProcess.StartInfo.RedirectStandardOutput = false;
            ConcatenateProcess.StartInfo.Arguments              = parameters;
            ConcatenateProcess.Execute();
            ConcatenateProcess.WaitForExit();
            ConcatenateProcess.Close();
        }