Beispiel #1
0
        public Boolean demux(SortedList<String, String[]> fileDetails, SortedList<String, Track[]> tracks)
        {
            LogBookController.Instance.addLogLine("Analysing AVS file", LogMessageCategories.Video);

            AviSynthScriptEnvironment environment = new AviSynthScriptEnvironment();
            AviSynthClip clip = environment.OpenScriptFile(fileDetails["fileName"][0]);
            fileDetails.Add("width", clip.VideoWidth.ToString().Split(Convert.ToChar("~")));
            fileDetails.Add("height", clip.VideoHeight.ToString().Split(Convert.ToChar(" ")));
            fileDetails.Add("avsfile", fileDetails["fileName"][0].Split(Char.Parse("\n")));
            fileDetails["fileName"][0] = getAvsSource(fileDetails["fileName"][0]);

            LogBookController.Instance.addLogLine("Retrieved source: " + fileDetails["fileName"][0], LogMessageCategories.Video);

            clip = null;
            environment = null;

            return true;
        }
Beispiel #2
0
        private Boolean checkAvs()
        {
            try
            {
                AviSynthScriptEnvironment environment = new AviSynthScriptEnvironment();

                AviSynthClip temp = environment.OpenScriptFile(EncOpts["avsfile"]);
                temp = null;
                return true;

            }
            catch (AviSynthException er)
            {
                LogBookController.Instance.addLogLine("Error checking AVS file: " + er.Message, LogMessageCategories.Error);
                MessageBox.Show("Error in AVS File: " + er.Message);
                return false;
            }
        }
Beispiel #3
0
        public AviSynthClip(string func, string arg, AviSynthColorspace forceColorspace, AviSynthScriptEnvironment env)
        {

            _vi = new AVSDLLVideoInfo();
            _avs = new IntPtr(0);
            _colorSpace = AviSynthColorspace.Unknown;
            _sampleType = AudioSampleType.Unknown;
            if (0 != dimzon_avs_init_2(ref _avs, func, arg, ref _vi, ref _colorSpace, ref _sampleType, forceColorspace.ToString()))
            {
                string err = getLastError();
                cleanup(false);
                throw new AviSynthException(err);
            }
        }