private static void postprocess(MainForm mainForm, Job ajob) { if (!(ajob is IndexJob)) { return; } IndexJob job = (IndexJob)ajob; if (job.PostprocessingProperties != null) { return; } StringBuilder logBuilder = new StringBuilder(); VideoUtil vUtil = new VideoUtil(mainForm); Dictionary <int, string> audioFiles = vUtil.getAllDemuxedAudio(job.Output, 8); if (job.LoadSources) { if (job.DemuxMode != 0) { string[] files = new string[audioFiles.Values.Count]; audioFiles.Values.CopyTo(files, 0); Util.ThreadSafeRun(mainForm, new MethodInvoker( delegate { mainForm.Audio.openAudioFile(files); })); } AviSynthWindow asw = new AviSynthWindow(mainForm, job.Output); asw.OpenScript += new OpenScriptCallback(mainForm.Video.openVideoFile); asw.Show(); } }
private static LogItem postprocess(MainForm mainForm, Job ajob) { if (!(ajob is DGMIndexJob)) { return(null); } DGMIndexJob job = (DGMIndexJob)ajob; StringBuilder logBuilder = new StringBuilder(); Dictionary <int, string> audioFiles = new Dictionary <int, string>(); if ((job.AudioTracks != null && job.AudioTracks.Count > 0) || job.DemuxMode > 0) { List <string> arrFilesToDelete = new List <string>(); audioFiles = AudioUtil.GetAllDemuxedAudioFromDGI(job.AudioTracks, out arrFilesToDelete, job.Output, null); job.FilesToDelete.AddRange(arrFilesToDelete); } if (!job.OneClickProcessing) { job.FilesToDelete.Add(Path.ChangeExtension(job.Output, ".log")); } if (!Path.ChangeExtension(job.Output, ".log").Equals(Path.ChangeExtension(job.Input, ".log"))) { job.FilesToDelete.Add(Path.ChangeExtension(job.Input, ".log")); } if (job.LoadSources) { if (audioFiles.Count > 0) { string[] files = new string[audioFiles.Values.Count]; audioFiles.Values.CopyTo(files, 0); Util.ThreadSafeRun(mainForm, new MethodInvoker( delegate { mainForm.Audio.openAudioFile(files); })); } // if the above needed delegation for openAudioFile this needs it for openVideoFile? // It seems to fix the problem of ASW dissapearing as soon as it appears on a system (Vista X64) Util.ThreadSafeRun(mainForm, new MethodInvoker( delegate { AviSynthWindow asw = new AviSynthWindow(mainForm, job.Output); asw.OpenScript += new OpenScriptCallback(mainForm.Video.openVideoFile); asw.Show(); })); } return(null); }
private static LogItem postprocess(MainForm mainForm, Job ajob) { if (!(ajob is IndexJob)) { return(null); } IndexJob job = (IndexJob)ajob; if (job.PostprocessingProperties != null) { return(null); } StringBuilder logBuilder = new StringBuilder(); VideoUtil vUtil = new VideoUtil(mainForm); Dictionary <int, string> audioFiles = vUtil.getAllDemuxedAudio(job.AudioTracks, job.Output, 8); if (job.LoadSources) { if (job.DemuxMode != 0 && audioFiles.Count > 0) { string[] files = new string[audioFiles.Values.Count]; audioFiles.Values.CopyTo(files, 0); Util.ThreadSafeRun(mainForm, new MethodInvoker( delegate { mainForm.Audio.openAudioFile(files); })); } // if the above needed delegation for openAudioFile this needs it for openVideoFile? // It seems to fix the problem of ASW dissapearing as soon as it appears on a system (Vista X64) Util.ThreadSafeRun(mainForm, new MethodInvoker( delegate { AviSynthWindow asw = new AviSynthWindow(mainForm, job.Output); asw.OpenScript += new OpenScriptCallback(mainForm.Video.openVideoFile); asw.Show(); })); } return(null); }
private static void postprocess(MainForm mainForm, Job ajob) { if (!(ajob is IndexJob)) { return; } IndexJob job = (IndexJob)ajob; if (job.PostprocessingProperties != null) { return; } StringBuilder logBuilder = new StringBuilder(); VideoUtil vUtil = new VideoUtil(mainForm); Dictionary <int, string> audioFiles = vUtil.getAllDemuxedAudio(job.Output, 8); if (job.LoadSources) { if (job.DemuxMode != 0) { int counter = 0; foreach (int i in audioFiles.Keys) { mainForm.setAudioTrack(counter, audioFiles[i]); if (counter >= 2) { break; } counter++; } } AviSynthWindow asw = new AviSynthWindow(mainForm, job.Output); asw.OpenScript += new OpenScriptCallback(mainForm.Video.openVideoFile); asw.Show(); } }